From 3b3db91337976e90137d04694da0a009ec3951e7 Mon Sep 17 00:00:00 2001 From: fatchan Date: Mon, 27 Apr 2020 18:07:13 +1000 Subject: [PATCH] compact catalog and images better scaled --- gulp/res/css/style.css | 14 ++++++++------ views/mixins/catalogtile.pug | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index 27719272..b2a26496 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -253,13 +253,13 @@ object { padding: 5px; margin: 5px; text-align: center; - height: 250px; - width: 250px; + height: 220px; + width: 180px; overflow: hidden; border: 1px solid var(--post-outline-color); box-sizing: border-box; flex-grow: 1; - max-width: 300px; + max-width: 250px; } .catalog-tile:hover { @@ -278,10 +278,12 @@ p { .catalog-thumb { display: block; box-shadow: 0 0 3px black; - width: 64px !important; - height: 64px !important; + width: auto; + max-height: 64px; + box-sizing: border-box; object-fit: cover; - margin: 5px auto; + margin: 0 auto 5px; + padding: 2px; } .upload-list { diff --git a/views/mixins/catalogtile.pug b/views/mixins/catalogtile.pug index 17c0383e..6c68ab82 100644 --- a/views/mixins/catalogtile.pug +++ b/views/mixins/catalogtile.pug @@ -24,8 +24,8 @@ mixin catalogtile(board, post, index) else if file.mimetype.startsWith('audio') div.audioimg.catalog-thumb else if file.hasThumb - img.catalog-thumb(src=`/file/thumb-${file.hash}${file.thumbextension}` width='64' height='64' loading='lazy') + img.catalog-thumb(src=`/file/thumb-${file.hash}${file.thumbextension}` width=file.geometry.thumbwidth height=file.geometry.thumbheight loading='lazy') else - img.catalog-thumb(src=`/file/${file.filename}` width='64' height='64' loading='lazy') + img.catalog-thumb(src=`/file/${file.filename}` width=file.geometry.width height=file.geometry.height loading='lazy') if post.message pre.no-m-p.post-message !{post.message}