{% block "breadcrumbs" %}
{% include "breadcrumbs.html" %}
{% endblock %}
+
{% block content %}{% endblock %}
{% block "pagination" %}{% include "pagination.html" %}{% endblock %}
diff --git a/inkscape/templates/cms/withside.html b/inkscape/templates/cms/withside.html
index 135c098b5284f7639ec1226d6d49688e1fa47f39..7801d229a67ad6649351abb752263f83fade83fd 100644
--- a/inkscape/templates/cms/withside.html
+++ b/inkscape/templates/cms/withside.html
@@ -6,7 +6,7 @@
{% block headerdesc %}{% page_attribute meta_description %}{% endblock %}
{% block content %}
-
+
{% placeholder header_template_content %}
{% placeholder normal_template_content %}
diff --git a/inkscape/templates/pageclasses.html b/inkscape/templates/pageclasses.html
new file mode 100644
index 0000000000000000000000000000000000000000..1daa9ed6e640ad2d6daa85f7c79db485c2325ca9
--- /dev/null
+++ b/inkscape/templates/pageclasses.html
@@ -0,0 +1 @@
+{% load menu_tags cms_tags i18n %}{{ englishslug }}{% if current_language != 'en' %} {% page_attribute 'slug' %}{% endif %}
diff --git a/resources/fixtures/media/license/banner/agpl3.svg b/resources/fixtures/media/license/banner/agpl3.svg
index 9a4d8e04a8f77db8826f37256d35ed8d0b8b16c3..2914d63008bab1cf1bc4c7960dd800c9eafdf3e1 100644
--- a/resources/fixtures/media/license/banner/agpl3.svg
+++ b/resources/fixtures/media/license/banner/agpl3.svg
@@ -1,23 +1,95 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
- AGPL3
+
+ AGPL3
diff --git a/resources/fixtures/media/license/banner/c.svg b/resources/fixtures/media/license/banner/c.svg
index aa61d158bfc378c82adcb76b9c39771f6f73a3c1..64247e98c5c442df8baab868f2493d62452e03df 100644
--- a/resources/fixtures/media/license/banner/c.svg
+++ b/resources/fixtures/media/license/banner/c.svg
@@ -1,25 +1,106 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
-
-
- C
+
+
+
+ C
diff --git a/resources/fixtures/media/license/banner/cc-by-nc-sa.svg b/resources/fixtures/media/license/banner/cc-by-nc-sa.svg
index afe31fb3432196ba81e1f8ffa29eb153f6b2288b..4cef534cf577c0371c9b83793b6e358cf2a00aaa 100644
--- a/resources/fixtures/media/license/banner/cc-by-nc-sa.svg
+++ b/resources/fixtures/media/license/banner/cc-by-nc-sa.svg
@@ -1,29 +1,117 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
diff --git a/resources/fixtures/media/license/banner/cc-by-nc.svg b/resources/fixtures/media/license/banner/cc-by-nc.svg
index f05b5245e60162b36a23166912ef3f1c32c6a014..11d362566827f6acf3a3fa118c1ac6712d3e7bbe 100644
--- a/resources/fixtures/media/license/banner/cc-by-nc.svg
+++ b/resources/fixtures/media/license/banner/cc-by-nc.svg
@@ -1,28 +1,109 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/resources/fixtures/media/license/banner/cc-by-nd.svg b/resources/fixtures/media/license/banner/cc-by-nd.svg
index 26fdd82b765148f44382ff7ff1459b47ffc76df1..592847685ea0cd7f0b0e34b6bb3cb430ba4c140e 100644
--- a/resources/fixtures/media/license/banner/cc-by-nd.svg
+++ b/resources/fixtures/media/license/banner/cc-by-nd.svg
@@ -1,32 +1,112 @@
-
-
+
+
-
+
image/svg+xml
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
diff --git a/resources/fixtures/media/license/banner/cc-by-sa.svg b/resources/fixtures/media/license/banner/cc-by-sa.svg
index b176625ada6c67660d7ff4562bdb93c3faec4745..3384a84b5069c0b36735a15a510d22343f50d940 100644
--- a/resources/fixtures/media/license/banner/cc-by-sa.svg
+++ b/resources/fixtures/media/license/banner/cc-by-sa.svg
@@ -1,26 +1,100 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
diff --git a/resources/fixtures/media/license/banner/cc-by.svg b/resources/fixtures/media/license/banner/cc-by.svg
index 27ce35e0d38ac1c5c9cba86a625877e55d153396..0620f6a277f98e0998bde9f958af5367f55a5850 100644
--- a/resources/fixtures/media/license/banner/cc-by.svg
+++ b/resources/fixtures/media/license/banner/cc-by.svg
@@ -1,27 +1,104 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/resources/fixtures/media/license/banner/cc0.svg b/resources/fixtures/media/license/banner/cc0.svg
index 3819ef911e676fc2aebdd4e8eb278be6b5ae3765..4af7f93e8c6d19de0675ef0b6f49b13676354769 100644
--- a/resources/fixtures/media/license/banner/cc0.svg
+++ b/resources/fixtures/media/license/banner/cc0.svg
@@ -1,26 +1,100 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
-
+
diff --git a/resources/fixtures/media/license/banner/gplv2.svg b/resources/fixtures/media/license/banner/gplv2.svg
index 1b97be6ecfb676f1729d4110e55d7b4a4ccb430b..f8273a99a4f5803cfe32faec0cb308028c618521 100644
--- a/resources/fixtures/media/license/banner/gplv2.svg
+++ b/resources/fixtures/media/license/banner/gplv2.svg
@@ -1,23 +1,95 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
- GPLv2
+
+ GPLv2
diff --git a/resources/fixtures/media/license/banner/gplv3.svg b/resources/fixtures/media/license/banner/gplv3.svg
index 383d38377fef418663da6ecad4fc48f8577e6092..85442268e358ecb781dc8bf8886946ba391b32e5 100644
--- a/resources/fixtures/media/license/banner/gplv3.svg
+++ b/resources/fixtures/media/license/banner/gplv3.svg
@@ -1,23 +1,95 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
- GPLv3
+
+ GPLv3
diff --git a/resources/fixtures/media/license/banner/lgpl2.svg b/resources/fixtures/media/license/banner/lgpl2.svg
index 8882ea34f4eff2df350f9e3402329d0ecb21c120..4534a492577f5dcf8a1f41c74f5a3573008de336 100644
--- a/resources/fixtures/media/license/banner/lgpl2.svg
+++ b/resources/fixtures/media/license/banner/lgpl2.svg
@@ -1,23 +1,95 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
- LGPL2
+
+ LGPL2
diff --git a/resources/fixtures/media/license/banner/lgpl3.svg b/resources/fixtures/media/license/banner/lgpl3.svg
index 26ed87598789c439165e9e67f2a9c8ee31257b67..570ed3d4b9445aae630be513b4318a920e07c40e 100644
--- a/resources/fixtures/media/license/banner/lgpl3.svg
+++ b/resources/fixtures/media/license/banner/lgpl3.svg
@@ -1,23 +1,95 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
- LGPL3
+
+ LGPL3
diff --git a/resources/fixtures/media/license/banner/pd.svg b/resources/fixtures/media/license/banner/pd.svg
index 200eb2b414f5db6846c2d8cd453b85a29000a278..ca2788247b99259e84d7cd6ab8f4696520ada847 100644
--- a/resources/fixtures/media/license/banner/pd.svg
+++ b/resources/fixtures/media/license/banner/pd.svg
@@ -1,23 +1,95 @@
-
-
+
+
-
+
image/svg+xml
-
+
-
-
-
+
+
+
-
-
-
- PD
+
+ PD
diff --git a/resources/static/css/gallery.css b/resources/static/css/gallery.css
index ddfc5ee34624dcc543681a48e20b32a56ea50a3e..837caaa7a9b2771de21ef123a14e648f0680950b 100644
--- a/resources/static/css/gallery.css
+++ b/resources/static/css/gallery.css
@@ -1,90 +1,226 @@
/* License: AGPLv3 or later (http://www.gnu.org/licenses/), Copyright 2013, Martin Owens */
+/* See https://gitlab.com/inkscape/inkscape-web/issues/162#note_57927689 for multicolumn and so on*/
+/*.normal 4 columns */
+.page .imagelist{
+ column-width: 180px;
+ column-gap: 10px;
+ width: 100%;
+ margin-top: 10px;
+}
+/*.gallery 3 columns */.page .imagelist.max3col{
+ column-width: 260px;
+}
+.page .imagelist.max2col{
+ column-width: 295px;
+.page.gallery .imagelist{
+ column-width: 270px;
+}
+.wrapper{
+ position:relative;
+ margin-top:42px;
+}
+.gallerysidebar{
+ visibility:hidden !important;
+ z-index:200;
+ float:none;
+ position:absolute;
+ background-color:rgba(255,255,255,0.9);
+ padding:20px 45px 20px 20px !important;
+ width:194px !important;
+ top:0;
+ right:0;
+ z-index:0;
+
+}
+.wrapper .gallerycontent{
+ width:100% !important;
+ margin:0px;
+}
+
+.gallery.page .wrapper #right-sidebar:hover,
+.gallery.page .wrapper #right-sidebar:focus{
+ visibility:visible !important;
+}
+.gallerysidebar{
+ margin-top:-18px !important;
+ margin-right:0px;
+ padding-top:5px !important;
+}
+.gallerysidebar #sidetoggle:before{
+ content:"+";
+}
+.gallerysidebar:hover #sidetoggle:before{
+ content:"-";
+}
+
+.gallerysidebar #sidetoggle{
+ visibility:visible;
+ display:block;
+ width:100px;
+ position:sticky;
+ content:"+";
+ text-align:center !important;
+ border-radius:5px;
+ color:#333;
+ background-color:rgba(255,255,255,0.8);
+ font-size:28px;
+ padding:2px 4px 4px 4px;
+ font-weight:bold;
+ z-index:0;
+ margin-left:112px;
+ cursor:pointer;
+ line-height:1;
+ border-width:1px;
+ border-color:#ccc;
+ border-style:solid;
+ top:20px;
+}
.galleryitem {
- display: inline-block;
- padding: 4px;
- min-width: 150px;
- min-height: 150px;
- text-align: center;
- vertical-align: middle;
- margin: 5px 0px 25px 0px;
- border: 2px solid transparent;
+ background: #fff;
+ border: 0px;
+ margin: 3px;
+ padding: 0px;
+ padding-bottom: 1px;
+ transition: opacity .4s ease-in-out;
+ display: inline-block;
+ position:relative;
+ width:100%;
+
}
.galleryitem.unavailable {
opacity: 0.5;
}
.galleryitem:hover {
- border: 2px solid #cce;
- background-color: #eef;
}
-.galleryitem a.link img,
+.galleryitem a.link img,
a.link .galleryitem img {
- max-width: 150px;
- max-height: 150px;
- vertical-align: middle;
- display: inline-block;
+ width: 100%;
+ height: auto;
+ padding-bottom: 0;
+ margin-bottom: 0;
+ line-height:1;
+ border-width:1px 1px 0 1px;
+ border-style:solid;
+ border-color:#ccc;
+ border-radius:6px 6px 0 0 !important;
}
-a.link .galleryitem img {
- min-width: 150px;
- min-height: 150px;
+
+a.link .galleryitem > img {
+ width: 100% !important;
+ height: auto;
}
-.galleryitem a.link {
- min-width: 150px;
- min-height: 150px;
+.galleryitem a.link {
display: block;
- line-height: 147px;
outline: none;
+ line-height:1;
+ padding:0;
+ margin-bottom:-2px;
}
-.galleryitem > p {
- max-width: 150px;
-}
-.galleryitem .label {
- max-width: 150px;
- text-align: center;
- padding: 0px;
- margin: 0px;
- overflow: hidden;
- background-color: #eef;
- display:table-cell;
- margin: 2px;
- padding: 2px;
- height: 4em;
- width: 150px;
- word-wrap: break-word;
- border-radius: 16px;
- vertical-align: middle;
+
+.galleryitem .label,
+.galleryitem p {
+ text-align: center !important;
+ padding:4%;
+ margin:0 0 4px 0;
+ width:92%;
+ display:inline-block;
+ border-width:1px 1px 1px 1px;
+ border-style:dashed solid solid solid;
+ border-color:#ccc;
+ border-radius:0 0 6px 6px !important;
}
-.galleryitem .label:hover {
- border-radius: 0px;
+@media screen and (min-width: 960px) {
+.titlehover .galleryitem .label,
+.titlehover .galleryitem p {
+ position:absolute;
+ z-index:20;
+ top:0;
+ border:none;
+ background-color:rgba(255,255,255,0.6);
+ border-radius:0 !important;
+ width:96%;
+ padding:2%;
+ margin:0;
+ color:#333;
+ display:none;
+}
+.titlehover .galleryitem a.link img,
+.titlehover a.link .galleryitem img {
+ border:none;
+ border-radius:6px !important;
+}
+.wrapper #left-column{
+ width:98% !important;
+}
+.titlehover .galleryitem:hover .label,
+.titlehover .galleryitem:hover p {
+ display:block;
+
+}
+.titlehover .galleryitem .label a{
+ font-size:16px;
+}
+}
+.galleryitem > .label a {
+.galleryitem.nothing {
+ width:500px !important;
+ min-height:300px;
+
+}
+.galleryitem.nothing img{
+
+ width:100px !important;
+ float:left;
+ vertical-align:middle;
+ border-width:0 !important;
+ margin-top:-40px;
+
}
-.galleryitem .label a {
- color: #035;
- display: block;
- outline: none;
+
+.galleryitem.nothing p{
+ display:inline !important;
+ float:left;
+ text-align:left !important;
+ border-width:0;
+ width:200px;
+ font-size:20px;
+ margin-top:-30px;
}
-.galleryitem .label a:hover {
+
+.galleryitem .label a {
text-decoration: none;
+ color:#333;
+ font-size:18px;
}
-.galleryitem p.new a {
+.galleryitem p.new a {
background-color: #efe;
outline: none;
}
-.galleryitem progress {
+.galleryitem progress {
+.galleryitem > p.new a {
+ background-color: #efe;
+ outline: none;
+}
+.galleryitem progress {
height: 15px;
margin: 23px 0px;
width: 130px;
}
-.galleryitem div.link input {
- max-width: 150px;
- max-height: 150px;
+.galleryitem div.link input {
vertical-align: middle;
display: inline-block;
}
.galleryitem div.link {
- min-width: 150px;
- min-height: 150px;
+.galleryitem > div.link input {
+ vertical-align: middle;
+ display: inline-block;
+}
+
+.galleryitem div.link {
+
display: block;
line-height: 150px;
}
@@ -92,28 +228,24 @@ a.link .galleryitem img {
max-width: 140px;
text-align: center;
}
-.galleryitem div.input {
+.galleryitem adiv.input {
background-color: #EEF;
display: table-cell;
margin: 2px;
padding: 3px;
color: #035;
height: 4em;
- width: 150px;
vertical-align: middle;
}
.galleryitem.nothing {
color: #798488;
- width: 50%;
+ width: 100%;
text-align: left;
}
-.galleryitem.nothing:hover {
- border: 2px solid white;
- background-color: transparent;
-}
-.galleryitem.empty a.link > img {
+
+.galleryitem.empty a.link img {
opacity: 0.5;
}
.galleryitem.removed {
@@ -148,40 +280,149 @@ a.link .galleryitem img {
background-color: #cce;
border-radius: 0px;
}
+
.galleryitem .minitabs {
- width: 147px;
position: absolute;
+ top:0px;
+ left:0;
+ right:0;
text-align: right;
- margin-top: 2px;
z-index: -1;
}
-.galleryitem:hover .minitabs {
+
+.galleryitem .minitabs {
z-index: unset;
+ width:100%;
+}
+.galleryitem .minitabs img{
+ visibility: visible ;
+ height:18px;
+ margin:3px;
+ background-color:rgba(255,255,255,0.6);
+ display:inline-block;
+ border-radius:15%;
+ padding:3px;
+}
+.galleryitem .minitabs a ,
+.galleryitem .minitabs img
+{
+ visibility: visible;
+
}
-.galleryitem .minitabs > img,
-.galleryitem .minitabs > a {
- visibility: hidden;
+
+
+.galleryitem .minitabs img:nth-child(2),
+.galleryitem .minitabs a:nth-child(2) {
+ right:0;
+ left:auto;
}
-.galleryitem:hover .minitabs > img,
+
+@media screen and (min-width: 960px) {
+.titlehover .galleryitem .minitabs{
+ top:auto;
+ bottom:0;
+}
+ .galleryitem:hover span.ribbon{
+ display:none;
+ }
+ .galleryitem .minitabs > img,
+.galleryitem .minitabs > a {
+ visibility: hidden !important;
+ }
+ .galleryitem:hover .minitabs > img,
.galleryitem:hover .minitabs > a {
+ visibility:visible !important;
+ margin-bottom:5px;
+ }
+}
+.galleryitem > .minitabs {
+ z-index: unset;
+ width:100%;
+}
+.galleryitem .minitabs img{
+ visibility: visible ;
+ height:18px;
+ margin:3px;
+ background-color:rgba(255,255,255,0.6);
+ display:inline-block;
+ border-radius:15%;
+ padding:3px;
+}
+.galleryitem .minitabs a ,
+.galleryitem .minitabs img
+{
visibility: visible;
+
+}
+
+
+.galleryitem .minitabs img:nth-child(2),
+.galleryitem .minitabs a:nth-child(2) {
+ right:0;
+ left:auto;
}
-.galleryitem span.ribbon {
+.galleryitem span.ribbon {
visibility: visible;
- position: relative;
- top: -9px;
- left: -7px;
+ display:block;
+ text-align:center;
+ z-index:0 !important;
+ opacity:1;
+ margin-top:-12px !important;
+ margin-bottom:-15px;
+ filter:invert(0%);
+ background-color:transparent !important;
}
-.galleryitem:hover span.ribbon {
- display: none;
+.gallery.page .galleryitem span.ribbon {
+ margin-top:0px !important;
+ margin-bottom:-100px;
+}
+.gallery.page span.ribbon{
+ bottom:-18px;
}
-.galleryitem span.ribbon p {
+.galleryitem:hover span.ribbon {
+ filter:invert(100%);
+}
+
+.galleryitem span.ribbon p {
position: absolute;
- top: -29px;
- width: 165px;
+ top:-7px !important;
text-align: center;
color: white;
font-weight: bold;
+ padding: 0;
+ margin: 12px 0;
+ width: 100%;
+ display: block !important;
+ border-width: 0;
+ line-height:1.5;
+ color:#000 !important;
+ background-color:transparent !important;;
+}
+.gallery.page .galleryitem span.ribbon p{
+ top:-7px !important;
+}
+.galleryitem:hover span.ribbon{
+ opacity:1;
+ bottom:-20px;
+ margin-left:-75px !important;
+ z-index:300;
+ opacity:0.8;
+}
+
+.galleryitem span.ribbon p {
+ position: absolute;
+ top:-8px;
+ text-align: center;
+ color: white;
+ font-weight: bold;
+ padding: 0;
+ margin: 12px 0;
+ width: 100%;
+ display: block !important;
+ border-width: 0;
+ line-height:1.8;
+ color:#000 !important;
+ background-color:transparent !important;;
}
svg.ribbon path.part_a { fill:#7e7e7e; }
svg.ribbon path.part_b { fill:#a9a9a9; }
@@ -221,19 +462,19 @@ svg.ribbon path.part_c { fill:#494949; }
.galleryitem .blank .votebox.add:hover { color: #8ccaff; }
.galleryitem .blank .votebox.remove { color: #8ccaff; }
.galleryitem .blank .votebox.remove:hover { color: red; }
-.galleryitem .minitabs img,
-.galleryitem .minitabs .blank {
+.galleryitem > .minitabs > img,
+.galleryitem > .minitabs > .blank {
position: relative;
- right: -4px;
+ right: -1px;
float: left;
}
-.galleryitem .minitabs > img:last-child,
-.galleryitem .minitabs > a:last-child img,
-.galleryitem .minitabs .blank:last-child {
+.galleryitem > .minitabs img:last-child,
+.galleryitem > .minitabs a:last-child img,
+.galleryitem > .minitabs blank:last-child {
float: right;
- left: -4px;
+ left: 0;
}
-.galleryitem .minitabs a:hover {
+.galleryitem > .minitabs > a:hover {
text-decoration: none;
font-weight: bold;
}
@@ -261,3 +502,102 @@ div#category_desc {
display: inline-block;
}
+@media screen and (min-width: 960px) {
+.page.gallery .galleryitem .label,
+.page.gallery .galleryitem p {
+ position:absolute;
+ z-index:20;
+ top:0;
+ border:none;
+ background-color:rgba(255,255,255,0.6);
+ border-radius:0 !important;
+ width:96%;
+ padding:2%;
+ margin:0;
+ color:#333;
+ display:none;
+}
+.gallerysidebar #sidetoggle:before{
+ content:"+";
+}
+.gallerysidebar:hover #sidetoggle:before{
+ content:"+";
+}
+.page.gallery .galleryitem a.link > img,
+.page.gallery a.link > .galleryitem > img {
+ border:none;
+ border-radius:6px !important;
+}
+.wrapper .gallerycontent{
+ width:100% !important;
+}
+.page.gallery .galleryitem:hover .label,
+.page.gallery .galleryitem:hover p {
+ display:block;
+
+}
+.page.gallery .galleryitem .label a{
+ font-size:16px;
+}
+.page.gallery .galleryitem .minitabs{
+ top:auto;
+ bottom:0;
+}
+.galleryitem .minitabs img,
+.galleryitem .minitabs a {
+ visibility: hidden !important;
+}
+.galleryitem:hover .minitabs img,
+.galleryitem:hover .minitabs a {
+ visibility:visible !important;
+ margin-bottom:5px;
+ }
+
+
+@media screen and (min-width: 960px) {
+.page.gallery .galleryitem .label,
+.page.gallery .galleryitem p {
+ position:absolute;
+ z-index:20;
+ top:0;
+ border:none;
+ background-color:rgba(255,255,255,0.6);
+ border-radius:0 !important;
+ width:96%;
+ padding:2%;
+ margin:0;
+ color:#333;
+ display:none;
+}
+.page.gallery .galleryitem a.link > img,
+.page.gallery a.link > .galleryitem > img {
+ border:none;
+ border-radius:6px !important;
+}
+.wrapper #left-column{
+ width:100% !important;
+}
+.page.gallery .galleryitem:hover .label,
+.page.gallery .galleryitem:hover p {
+ display:block;
+
+}
+.page.gallery .galleryitem .label a{
+ font-size:16px;
+}
+.page.gallery .galleryitem .minitabs{
+ top:auto;
+ bottom:0;
+}
+.galleryitem .minitabs img,
+.galleryitem .minitabs a {
+ visibility: hidden !important;
+}
+.galleryitem:hover .minitabs img,
+.galleryitem:hover .minitabs a {
+ visibility:visible !important;
+ margin-bottom:5px;
+ }
+
+
+
diff --git a/resources/static/js/gallery.js b/resources/static/js/gallery.js
index 863d1646569e737065b4ff8d8914e27f6939c517..a7eac745efef6f4062741e5270133a07fdef06e4 100644
--- a/resources/static/js/gallery.js
+++ b/resources/static/js/gallery.js
@@ -436,6 +436,60 @@ function registerDropZone(drop_id, gallery_id, post_url, media_url, keep) {
}
+$(document).ready(function(){
+ $.fn.howMuchCols = function(){
+ return Math.round($(this).width()/$(this).find('div:last').width());
+ };
+ $('.imagelist').each(function() {
+ var ncols = $(this).howMuchCols();
+ var galleryitems = $(this).find('> div').detach();
+ var galleryitems_result = [];
+ var result = [];
+ var i = 0;
+ $(galleryitems).each(function(index,el) {
+ if (i == ncols) {
+ i = 0;
+ }
+ galleryitems_result.push({col:i,data:el})
+ i++;
+ })
+ galleryitems_result.sort(mycomparator);
+ function mycomparator(a, b) {
+ return a.col - b.col;
+ };
+ $(galleryitems_result).each(function(index,el) {
+ result.push(el.data)
+ })
+ $(result).appendTo($(this));
+ galleryitems_result=null;
+ galleryitems=null;
+ result=null;
+ })
+ $('#sidetoggle').click(function(){
+ var ss = $('.gallerysidebar').hasClass("showside");
+ var hs = $('.gallerysidebar').hasClass("hideside");
+ var closed = $('.gallerysidebar').css("visivility") == "hidden";
+ if (!ss && !hs) {
+ if (closed) {
+ $('.gallerysidebar').addClass("showside");
+ } else {
+ $('.gallerysidebar').addClass("hideside");
+ }
+ }
+ if ($('.gallerysidebar').hasClass("showside")) {
+ $('.gallerysidebar').removeClass("showside");
+ $('.gallerysidebar').addClass("hideside");
+ } else {
+ $('.gallerysidebar').removeClass("hideside");
+ $('.gallerysidebar').addClass("showside");
+ }
+ })
+ $('#sidetoggle').mouseleave(function(){
+ $('.gallerysidebar').removeClass("showside");
+ $('.gallerysidebar').removeClass("hideside");
+ })
+});
+
/* Guides sometimes show a status saying "your browser doesn't support this"
* but I reckon the html should assume non-support and the javascript should
* modify that as needed. Thus noscript and nofeature is covered.
diff --git a/resources/templates/resources/gallery_list.html b/resources/templates/resources/gallery_list.html
index 766d6fb6538f85020ab8726e1c9010ea9927abab..eeb917e3cd0c7bcc9704112c248ead6b730b6c11 100644
--- a/resources/templates/resources/gallery_list.html
+++ b/resources/templates/resources/gallery_list.html
@@ -8,7 +8,7 @@
{% block content %}
{% trans "Resources" %}
-
+
{% for gallery in object_list %}
diff --git a/resources/templates/resources/resource_icons.html b/resources/templates/resources/resource_icons.html
index 8b62a412e5a582d50881ec6c57bc72b1dd21b71b..a35bfe388d62b00b30afc71ed0cb8b1497e388bd 100644
--- a/resources/templates/resources/resource_icons.html
+++ b/resources/templates/resources/resource_icons.html
@@ -1,9 +1,9 @@
{% load i18n static %}
-
+
{% for item in resources %}
{% include "resources/resource_item.html" %}
{% empty %}
-
+
{% if object.contest_submit %}
{% trans "No Submissions Yet" %}
diff --git a/resources/templates/resources/resource_leftbar.html b/resources/templates/resources/resource_leftbar.html index da67c02f1afef7fea80507bc6256661a58f1784d..97ee795b5d09546b4a36714967a97a020c595458 100644 --- a/resources/templates/resources/resource_leftbar.html +++ b/resources/templates/resources/resource_leftbar.html @@ -1,5 +1,5 @@ {% load i18n static timers %} - + {% if object.contest_submit and object.category %}
{% if object.is_pending %}
diff --git a/resources/templates/resources/resource_rows.html b/resources/templates/resources/resource_rows.html
index 0ded7f8c987fdd924cdbc611345d583c083d1794..c99c660a72243d250b1843cdb5a33248438fe175 100644
--- a/resources/templates/resources/resource_rows.html
+++ b/resources/templates/resources/resource_rows.html
@@ -6,8 +6,9 @@
-
+
{% for item in object_list %}
+
{% if item.is_visible %}