diff --git a/core/static/sas/album.scss b/core/static/sas/album.scss index 6fcbb4f5..7b09ee3d 100644 --- a/core/static/sas/album.scss +++ b/core/static/sas/album.scss @@ -66,7 +66,9 @@ } } + > div > input, > input { + box-sizing: border-box; height: 40px; width: 100%; max-width: 300px; @@ -75,6 +77,16 @@ max-width: 100%; } } + + > div { + width: 100%; + max-width: 300px; + } + + > input[type=submit]:hover { + background-color: #287fb8; + color: white; + } } } @@ -136,8 +148,6 @@ > .photo, > .album { - border: none; - box-sizing: border-box; background-size: cover; background-repeat: no-repeat; @@ -156,8 +166,24 @@ width: 100%; } - > div { + &:hover > .text { + background-color: rgba(0, 0, 0, .5); + } + + &:hover > .overlay { + -webkit-backdrop-filter: blur(2px); + backdrop-filter: blur(2px); + + ~ .text { + background-color: transparent; + } + } + + > .text { + position: absolute; box-sizing: border-box; + top: 0; + left: 0; width: 100%; height: 100%; @@ -168,20 +194,22 @@ padding: 10px; color: white; - - &:hover { - background: rgba(0, 0, 0, .5); - } } - &.not_moderated { + > .overlay { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + &::before { - content: '⚠️'; position: absolute; top: 0; left: 0; width: 100%; height: 100%; + content: '⚠️'; color: white; display: flex; justify-content: center; @@ -191,11 +219,6 @@ -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); } - - &:hover::before { - -webkit-backdrop-filter: blur(2px); - backdrop-filter: blur(2px); - } } } @@ -205,5 +228,10 @@ text-align: left; word-break: break-word; } + + > .photo > .text { + align-items: center; + padding-bottom: 30px; + } } } \ No newline at end of file diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index b771c4b6..f8d34a5c 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -2644,6 +2644,11 @@ msgstr "Coller" msgid "Clipboard: " msgstr "Presse-papier : " +#: sas/templates/sas/album.jinja:69 +#: sas/templates/sas/album.jinja:97 +msgid "To be moderated" +msgstr "A modérer" + #: core/templates/core/file_detail.jinja:53 msgid "Real name: " msgstr "Nom réel : " diff --git a/sas/templates/sas/album.jinja b/sas/templates/sas/album.jinja index 75e74556..6e0799b8 100644 --- a/sas/templates/sas/album.jinja +++ b/sas/templates/sas/album.jinja @@ -64,9 +64,12 @@ class="album{% if not a.is_moderated %} not_moderated{% endif %}" style="background-image: url('{% if a.file %}{{ a.get_download_url() }}{% else %}{{ static('core/img/sas.jpg') }}{% endif %}');" > -
- {{ a.name }} -
+ {% if not a.is_moderated %} +
 
+
{% trans %}To be moderated{% endtrans %}
+ {% else %} +
{{ a.name }}
+ {% endif %} {% if edit_mode %} @@ -86,10 +89,15 @@ {% if p.can_be_viewed_by(user) %}
-
 
+ {% if not p.is_moderated %} +
 
+
{% trans %}To be moderated{% endtrans %}
+ {% else %} +
 
+ {% endif %}
{% if edit_mode %} @@ -188,7 +196,7 @@ let imagePool = []; while(images.length > 0 && imagePool.length < poolSize) { - var image = images.shift(); + let image = images.shift(); imagePool.push(image); sendImage(image); } @@ -210,20 +218,20 @@ .always(next.bind(undefined, image)); } - function next(image, status, jqXHR) { - let index; - if(index = imagePool.indexOf(image) !== -1) { - imagePool.splice(index, 1); - } - let nextImage; - if(nextImage = images.shift()) { - imagePool.push(nextImage); + function next(image, _, __) { + let index = imagePool.indexOf(image); + let nextImage = images.shift(); + if(index !== -1) + imagePool.splice(index, 1); + + if(nextImage) { + imagePool.push(nextImage); sendImage(nextImage); } } - function onSuccess(image, data, status, jqXHR) { + function onSuccess(image, data, _, __) { let errors = []; if ($(data.responseText).find('.errorlist.nonfield')[0]) @@ -234,7 +242,7 @@ progress.value = ++completeCount / imagesCount; if(progress.value === 1 && errorList.children.length === 0) - document.location.reload(true) + document.location.reload() } }); diff --git a/sas/templates/sas/main.jinja b/sas/templates/sas/main.jinja index d72d70dc..c4d7bab6 100644 --- a/sas/templates/sas/main.jinja +++ b/sas/templates/sas/main.jinja @@ -25,7 +25,7 @@ class="album" style="background-image: url('{{ img }}');" > -
+
{{ a.name }}