forked from e621ng/e621ng
tweak css for responsive
This commit is contained in:
parent
5cbe47676d
commit
b9b38ca25e
@ -14,7 +14,7 @@
|
||||
}
|
||||
|
||||
div#page {
|
||||
padding: 0 2px;
|
||||
padding: 0 0.25vw;
|
||||
> div /* div#c-$controller */ {
|
||||
> div /* div#a-$action */ {
|
||||
display: flex;
|
||||
@ -89,17 +89,22 @@
|
||||
}
|
||||
|
||||
article.post-preview {
|
||||
margin: 0 0 10px 0;
|
||||
width: 48vw;
|
||||
margin: 0 0 0.5vw 0;
|
||||
width: 49.5vw;
|
||||
height: 48.5vw;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
border: none;
|
||||
a {
|
||||
width: 48vw;
|
||||
width: 49vw;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
img {
|
||||
object-fit: contain;
|
||||
width: 48.5vw;
|
||||
height: 48.5vw;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user