diff --git a/cmstabs/templates/cms/plugins/group-P.html b/cmstabs/templates/cms/plugins/group-P.html index ff4dcb7168cf65663145a4437b8bdcf91c87aefd..d11286867e753a418d0c33aa3d003ae72818e8a9 100644 --- a/cmstabs/templates/cms/plugins/group-P.html +++ b/cmstabs/templates/cms/plugins/group-P.html @@ -4,7 +4,7 @@

{{ instance.source }}

-
+
{% for user in users %}
diff --git a/elections/templates/elections/election_detail.html b/elections/templates/elections/election_detail.html index 86f1c2d989d9520e60fc402808fcdc2e14c402ce..f40ba1f2a277c81802f068f653db7d30ec6c8100 100644 --- a/elections/templates/elections/election_detail.html +++ b/elections/templates/elections/election_detail.html @@ -221,9 +221,9 @@ {% elif state.code == 'F' %} {% with log=object.get_log %}

{% trans "Results" %}

-
+
{% for user in log.candidates %} -
+

{{ user }}

{% if user.winner %} diff --git a/inkscape/context_processors.py b/inkscape/context_processors.py index 907e05c879292f5a83742f08811abeee12e8290f..1f4f8f2af4362e05860ca091f7bed2199633b199 100644 --- a/inkscape/context_processors.py +++ b/inkscape/context_processors.py @@ -25,7 +25,7 @@ import logging from os.path import isfile, join from collections import OrderedDict - +from menus.utils import DefaultLanguageChanger from django.conf import settings def tracker_data(request): @@ -35,6 +35,34 @@ def tracker_data(request): 'TRACKER_SIDE_ID': getattr(settings, 'PIWIK_SIDE_ID', 1), } +def englishslug(request): + if hasattr(request, "_language_changer"): + try: + url = request._language_changer("en") + except NoReverseMatch: + url = DefaultLanguageChanger(request)("en") + else: + # use the default language changer + url = DefaultLanguageChanger(request)("en") + url_parts = url.split('/') + return { + 'englishslug': url_parts[len(url_parts)-2], + } + +def englishslug(request): + if hasattr(request, "_language_changer"): + try: + url = request._language_changer("en") + except NoReverseMatch: + url = DefaultLanguageChanger(request)("en") + else: + # use the default language changer + url = DefaultLanguageChanger(request)("en") + url_parts = url.split('/') + return { + 'englishslug': url_parts[len(url_parts)-2], + } + PATH = settings.PROJECT_PATH INKSCAPE_VERSION = '' WEBSITE_VERSION = '' diff --git a/inkscape/settings.py b/inkscape/settings.py index a52c6d38f4f5b75d2a42057ff45c30bfca71809d..9c59baa510f5b2abee70d812eba3c243d6f491d2 100644 --- a/inkscape/settings.py +++ b/inkscape/settings.py @@ -108,6 +108,7 @@ TEMPLATES = [{ 'django.template.loaders.app_directories.Loader', ], 'context_processors': ( + 'inkscape.context_processors.englishslug', 'inkscape.context_processors.version', 'inkscape.context_processors.tracker_data', 'social_django.context_processors.backends', diff --git a/inkscape/static/css/main.css b/inkscape/static/css/main.css index eeddeb8495b1fa63458a5947ffbc08b71fb3e9b9..5c45f65d34f3d832aec7b0576855a35dbe308f01 100644 --- a/inkscape/static/css/main.css +++ b/inkscape/static/css/main.css @@ -667,9 +667,6 @@ div.toc ol, list-style: none; text-align: left; } -#menu > li { - margin: 0 -3px 0 0; -} #menu :link, #menu :link:hover, #menu :link:active, @@ -695,13 +692,13 @@ div.toc ol, #menu > li > a { background: #4d4d4d; background-image: linear-gradient(to bottom, #4d4d4d 0%, #1a1a1a 100%); - border-radius: 10px; + border-radius: 4px; padding: 17px 8px; white-space: nowrap; border-left: 1px solid #5a5a5a; border-right: 1px solid #333333; font-size: 14px; - margin: 0 3px 3px 0; + margin: 0 4px 4px 0; text-transform: uppercase; text-align: center; } @@ -721,16 +718,14 @@ div.toc ol, } #menu > li:last-child > a { border-right: 0; - border-top-right-radius: 10px; } #menu > li:first-child > a { border-left: 0; - border-top-left-radius: 10px; } #menu li ul { display: none; position: absolute; - top: 52px; + top: 100%; left: 0; z-index: 1; margin: 0; @@ -768,6 +763,9 @@ div.toc ol, border-radius: 10px 10px 0 0; border-bottom: 1px solid #262626; } + #menu > li { + margin: 0 -3px 0 0; + } #menu > li > a { border-radius: 0; margin: 0; @@ -778,6 +776,12 @@ div.toc ol, background: #333333; background-image: linear-gradient(to bottom, #333, #444, #333); } + #menu > li:first-child > a { + border-top-left-radius: 10px; + } + #menu > li:last-child > a { + border-top-right-radius: 10px; + } } /* Content wrappers */ @@ -798,8 +802,8 @@ div.toc ol, margin-bottom: 10px; } #content > div.wrapper { - margin: -20px; - padding: 20px; + margin: 0 -20px -20px -20px; + padding: 0 20px 20px 20px; min-height: 500px; } @@ -1724,3 +1728,4 @@ li#tab_hackfest p a:hover { text-decoration: none; background-image: linear-gradient(to bottom, #ff4646, #cc1d1d); } + diff --git a/inkscape/static/css/mobile-device.css b/inkscape/static/css/mobile-device.css index d09a38775b17302aca3342fe1a765e09fa0f8491..8b3163ff6ae89826f046464bfedaa6da7a62703d 100644 --- a/inkscape/static/css/mobile-device.css +++ b/inkscape/static/css/mobile-device.css @@ -42,6 +42,7 @@ div.cms .cms-toolbar-trigger { position: absolute; top: 30px; margin: 0; + display:block; right: 0; opacity: .8; } @@ -74,9 +75,6 @@ div.cms .cms-toolbar-trigger { padding: 9px 14px; border: 1px solid #5a5a5a; } -#menu > li:last-child > a { - border-radius: 0; -} #menu li li.main { display: list-item; } @@ -152,7 +150,7 @@ ol { #content { margin-bottom: 0; - padding: 20px 12px; + padding: 0px 12px; background: transparent; word-wrap: break-word; } @@ -309,12 +307,13 @@ div.toc, position: relative; height: 172px; text-align: center; + } #logo { display: inline-block; float: none; margin: 0; - padding-top: 44px; + padding-top: 58px; white-space: nowrap; text-align: left; } @@ -329,14 +328,26 @@ div.toc, position: static; float: none; margin-left: -5px; + /*HACKFEST*/ + margin-top:26px; + /*HACKFEST*/ } #tabs > li.dropdown > div { text-align: left; + } - #tabs > #tab_hackfest { + #tab_hackfest { + position:absolute !important; + white-space: normal; - left: 4px; - right: 4px; + top:0; + left: 0px; + right: -10px; + display:block; + border-radius:0 !important;; + } + #tab_hackfest p { + border-radius:0 !important;; } #tabs > #tab_languages > div { left: 0; @@ -443,3 +454,5 @@ div.toc, border-radius: 0 0 5px 5px; } } + + diff --git a/inkscape/static/mime/banner/code.svg b/inkscape/static/mime/banner/code.svg index d3532c2673abc43d12d6dce790bcc29d00c47369..f06440a3888373e702660df51548cfbcf291d21d 100644 --- a/inkscape/static/mime/banner/code.svg +++ b/inkscape/static/mime/banner/code.svg @@ -1,29 +1,109 @@ - - + + - + image/svg+xml - + - - - + + + - - - - - - - - - - + + + + + + diff --git a/inkscape/static/mime/banner/copy.svg b/inkscape/static/mime/banner/copy.svg index 1049ba9e2011e12d556be407af20834a9d3c65ea..d4d08d33dc788db1e77719ae20bfc6a566ec2edd 100644 --- a/inkscape/static/mime/banner/copy.svg +++ b/inkscape/static/mime/banner/copy.svg @@ -13,16 +13,16 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg2" sodipodi:version="0.32" - inkscape:version="0.91+devel r" - width="54" + inkscape:version="0.92.1 r15371" + width="20" height="20" version="1.0" - sodipodi:docname="move (copy).svg" + sodipodi:docname="copy.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-filename="/home/doctormo/Desktop/small-pd.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" - viewBox="0 0 54 20"> + viewBox="0 0 20 20"> @@ -31,7 +31,7 @@ image/svg+xml - + @@ -124,8 +124,8 @@ - - + inkscape:document-units="px" + inkscape:pagecheckerboard="true" /> + transform="matrix(0.66475649,0,0,0.66475649,-10.860329,4.0862703)"> + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5c3566;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" /> + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5c3566;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="m 42.879956,6.6464844 c -3.042745,-0.043051 -3.042745,4.5430506 0,4.4999996 h 0.154297 c 3.042744,0.04305 3.042744,-4.5430507 0,-4.4999996 z" + id="path4249" + sodipodi:nodetypes="ccccc" /> diff --git a/inkscape/static/mime/banner/delete.svg b/inkscape/static/mime/banner/delete.svg index e166ba376906498490d7628a4e60a8acdd78803c..cce58841e2c89e9dda91bf142e529500b7ac8f00 100644 --- a/inkscape/static/mime/banner/delete.svg +++ b/inkscape/static/mime/banner/delete.svg @@ -13,15 +13,16 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg2" sodipodi:version="0.32" - inkscape:version="0.91+devel r" - width="54" + inkscape:version="0.92.1 r15371" + width="20" height="20" version="1.0" sodipodi:docname="delete.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-filename="/home/doctormo/Desktop/small-pd.png" inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> + inkscape:export-ydpi="90" + viewBox="0 0 20 20"> @@ -30,7 +31,7 @@ image/svg+xml - + @@ -48,8 +49,8 @@ - - + inkscape:snap-others="false" + inkscape:pagecheckerboard="true" /> X + x="3.92854" + y="16.474779" + style="font-size:17.76335716px;line-height:1.25;fill:#cc0000;stroke:#cc0000;stroke-width:1.70000005;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none">X diff --git a/inkscape/static/mime/banner/edit.svg b/inkscape/static/mime/banner/edit.svg index bcd8e0e70aef8aee9ddfeacacc5eec0bac71a9ed..09c6d07c98bfa3efd407f5ad1828fda303a1ce47 100644 --- a/inkscape/static/mime/banner/edit.svg +++ b/inkscape/static/mime/banner/edit.svg @@ -13,15 +13,16 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg2" sodipodi:version="0.32" - inkscape:version="0.91+devel r" - width="54" + inkscape:version="0.92.1 r15371" + width="20" height="20" version="1.0" sodipodi:docname="edit.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-filename="/home/doctormo/Desktop/small-pd.png" inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> + inkscape:export-ydpi="90" + viewBox="0 0 20 20"> @@ -30,7 +31,7 @@ image/svg+xml - + @@ -59,22 +60,22 @@ - - + inkscape:snap-others="false" + inkscape:pagecheckerboard="true" /> diff --git a/inkscape/static/mime/banner/image.svg b/inkscape/static/mime/banner/image.svg index 4d7171d5022187807eb9597ef46ea2d79893a629..0d8505daec468cbcb861614502c09dfddaa9dedc 100644 --- a/inkscape/static/mime/banner/image.svg +++ b/inkscape/static/mime/banner/image.svg @@ -1,28 +1,112 @@ - - + + - + image/svg+xml - + - - - + + + - - - - - - - - - + + + + + diff --git a/inkscape/static/mime/banner/move.svg b/inkscape/static/mime/banner/move.svg index ea14853b3a57684c98d619d8ca64754a614f1f8d..f851ec2acab8d422e0f606b26f63a6759d8d8be6 100644 --- a/inkscape/static/mime/banner/move.svg +++ b/inkscape/static/mime/banner/move.svg @@ -13,15 +13,16 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg2" sodipodi:version="0.32" - inkscape:version="0.91+devel r" - width="54" + inkscape:version="0.92.1 r15371" + width="20" height="20" version="1.0" sodipodi:docname="move.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-filename="/home/doctormo/Desktop/small-pd.png" inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> + inkscape:export-ydpi="90" + viewBox="0 0 20 20"> @@ -30,7 +31,7 @@ image/svg+xml - + @@ -39,72 +40,77 @@ + d="M 5.77,0 -2.88,5 V -5 Z" + style="fill:#75507b;fill-opacity:1;fill-rule:evenodd;stroke:#5c3566;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.2)" + inkscape:connector-curvature="0" /> + d="M 5.77,0 -2.88,5 V -5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" + inkscape:connector-curvature="0" /> + d="M 5.77,0 -2.88,5 V -5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="scale(0.4)" + inkscape:connector-curvature="0" /> + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + inkscape:connector-curvature="0" /> + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> - - + inkscape:snap-others="false" + inkscape:pagecheckerboard="true" /> diff --git a/inkscape/static/mime/banner/svg.svg b/inkscape/static/mime/banner/svg.svg index df2fb95466fe0618ce387d24d1bbbd0130f5762f..4a7385f0fc6178b1bdd3a9448b516f06bda83b23 100644 --- a/inkscape/static/mime/banner/svg.svg +++ b/inkscape/static/mime/banner/svg.svg @@ -1,26 +1,108 @@ - - + + - + image/svg+xml - + - - - + + + - - - - - - - + + + + + diff --git a/inkscape/static/mime/banner/text.svg b/inkscape/static/mime/banner/text.svg index d453dbca5e5536cb23393793c29b22fc534b7185..af8716baa0b3da92313aa8fa260205faba284899 100644 --- a/inkscape/static/mime/banner/text.svg +++ b/inkscape/static/mime/banner/text.svg @@ -1,25 +1,93 @@ - - + + - + image/svg+xml - + - - - + + + - - - - - + + + diff --git a/inkscape/static/mime/banner/unknown.svg b/inkscape/static/mime/banner/unknown.svg index 9abc3dc6d99598ec6be8aa666deb825909962b2b..e1db59d4166d0acea7bb2cc97fce3ca163f29982 100644 --- a/inkscape/static/mime/banner/unknown.svg +++ b/inkscape/static/mime/banner/unknown.svg @@ -1,23 +1,96 @@ - - + + - + image/svg+xml - + - - - + + + - - - - ? + + ? diff --git a/inkscape/templates/base.html b/inkscape/templates/base.html index 39b4a05a63366a2496b832dc23383a70f4657102..e46b5f83792481c640584a7661500cb98c38449c 100644 --- a/inkscape/templates/base.html +++ b/inkscape/templates/base.html @@ -43,7 +43,7 @@ - + {% cms_toolbar %}
@@ -56,6 +56,7 @@

{% trans "Draw Freely." %}

{% endblock %}
+
    @@ -64,7 +65,6 @@

    {{ DONATE_NOW|safe }}

    {% endif %} - {% language_chooser "languages.html" %} {% if not request.user.is_authenticated %} @@ -121,10 +121,10 @@ {% block supercontent %} {% block "precontent" %}{% endblock %}
    -
    {% 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" %}

    -