From ac888a769d9112a36918eb2e8b3d6b6c2642f2d1 Mon Sep 17 00:00:00 2001 From: czaks Date: Sat, 20 Sep 2014 06:40:43 +0200 Subject: [PATCH] add a very small image size for catalog --- js/catalog.js | 9 +++------ stylesheets/style.css | 10 ++++++++++ templates/themes/catalog/catalog.html | 1 + 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/js/catalog.js b/js/catalog.js index 4a4eae37..768845f6 100644 --- a/js/catalog.js +++ b/js/catalog.js @@ -7,12 +7,9 @@ if (active_page == 'catalog') $(function(){ $("#image_size").change(function(){ var value = this.value, old; - if (value == "small") { - old = "large"; - } else { - old = "small"; - } - $(".grid-li").removeClass("grid-size-"+old); + $(".grid-li").removeClass("grid-size-vsmall"); + $(".grid-li").removeClass("grid-size-small"); + $(".grid-li").removeClass("grid-size-large"); $(".grid-li").addClass("grid-size-"+value); }); diff --git a/stylesheets/style.css b/stylesheets/style.css index 6128ead3..0dcd7388 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -533,6 +533,16 @@ form.ban-appeal textarea { margin-left: -20px; } +.theme-catalog div.grid-size-vsmall img { + max-width: 100%; +} + +.theme-catalog div.grid-size-vsmall { + width: 100px; + max-width: 100px; + max-height: 150px; +} + .theme-catalog div.grid-size-small { width: 200px; max-width: 200px; diff --git a/templates/themes/catalog/catalog.html b/templates/themes/catalog/catalog.html index a4cb3933..441e3a0a 100644 --- a/templates/themes/catalog/catalog.html +++ b/templates/themes/catalog/catalog.html @@ -33,6 +33,7 @@ {% trans 'Image size' %}: