tweak css for responsive

This commit is contained in:
r888888888
2017-09-06 13:32:32 -07:00
parent 5cbe47676d
commit b9b38ca25e
2 changed files with 13 additions and 7 deletions

View File

@@ -107,10 +107,11 @@ namespace :images do
desc "Generate thumbnail-sized images of posts"
task :generate_preview => :environment do
Post.where("image_width > ?", Danbooru.config.small_image_width).find_each do |post|
if post.is_image? && !File.exists?(post.preview_file_path)
width = 200
Post.where("image_width > ?", width).find_each do |post|
if post.is_image? #&& !File.exists?(post.preview_file_path)
puts "resizing preview #{post.id}"
Danbooru.resize(post.file_path, post.preview_file_path, Danbooru.config.small_image_width, Danbooru.config.small_image_width, 90)
Danbooru.resize(post.file_path, post.preview_file_path, width, width, 90)
end
end
end