summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-09-20 06:40:43 +0200
committerczaks <marcin@6irc.net>2014-09-20 06:40:43 +0200
commitac888a769d9112a36918eb2e8b3d6b6c2642f2d1 (patch)
tree5c2755a140bc401d4280418852efdcb5c6f5d528
parent56e55d157a0e5477c3eb4bc1ae70d09844d19700 (diff)
add a very small image size for catalog
-rw-r--r--js/catalog.js9
-rw-r--r--stylesheets/style.css10
-rw-r--r--templates/themes/catalog/catalog.html1
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 @@
<span>{% trans 'Image size' %}: </span>
<select id="image_size" style="display: inline-block">
+ <option value="vsmall">{% trans 'Very small' %}</option>
<option selected value="small">{% trans 'Small' %}</option>
<option value="large">{% trans 'Large' %}</option>
</select>