diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index bd83a9e57c..5d73fa7ccd 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -1671,29 +1671,52 @@ textarea.comment-edit-text:focus + .comment-edit-form .preview { display: inline-block; } -.photo-top-image-wrapper .jg-caption { +/* ALT badge for photos with descriptions in justified gallery */ +.photo-top-image-wrapper:has(img.has-alt-description)::after { + background: rgba(0, 0, 0, 0.69); + border-radius: 4px; + color: #eee; + content: "ALT"; + font-size: 12px; + font-weight: bold; + padding: 4px 5px; position: absolute; - bottom: 0; - left: 0; - right: 0; - background-color: rgba(0, 0, 0, 0.7); - color: #fff; - padding: 8px 12px; - font-size: 14px; - text-align: center; + bottom: 8px; + right: 8px; + z-index: 1; + pointer-events: none; +} + +.photo-top-image-wrapper .jg-caption, +#photo-album-contents .photo-top-image-wrapper .jg-caption, +.justified-gallery > .photo-top-image-wrapper > .jg-caption, +#photo-album-contents.justified-gallery > .photo-top-image-wrapper > .jg-caption { + display: block !important; + position: absolute !important; + bottom: 0 !important; + left: 0 !important; + right: 0 !important; + background-color: rgba(0, 0, 0, 0.7) !important; + color: #fff !important; + padding: 8px 12px !important; + font-size: 14px !important; + text-align: center !important; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; pointer-events: none; } -.photo-top-image-wrapper:hover .jg-caption { - opacity: 1; - visibility: visible; +.photo-top-image-wrapper:hover .jg-caption, +#photo-album-contents .photo-top-image-wrapper:hover .jg-caption, +.justified-gallery > .photo-top-image-wrapper:hover > .jg-caption, +#photo-album-contents.justified-gallery > .photo-top-image-wrapper:hover > .jg-caption { + opacity: 1 !important; + visibility: visible !important; } .photo-top-image-wrapper .jg-caption a { - color: #fff; + color: #fff !important; text-decoration: none; } .fbrowser .profile-rotator-wrapper { diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 69e85937bf..f1583aa076 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -510,6 +510,7 @@ function justifyPhotos() { .justifiedGallery({ margins: 3, border: 0, + captions: false, sizeRangeSuffixes: { lt48: "-6", lt80: "-5", diff --git a/view/theme/frio/templates/photo_top.tpl b/view/theme/frio/templates/photo_top.tpl index 9163378c03..945dde1e2e 100644 --- a/view/theme/frio/templates/photo_top.tpl +++ b/view/theme/frio/templates/photo_top.tpl @@ -5,8 +5,10 @@ * SPDX-License-Identifier: AGPL-3.0-or-later *}}
- - {{if $photo.album.name}}{{$photo.album.name}}{{elseif $photo.desc}}{{$photo.desc}}{{elseif $photo.alt}}{{$photo.alt}}{{else}}{{$photo.unknown}}{{/if}} + + {{if $photo.desc}}{{$photo.desc}}{{elseif $photo.alt}}{{$photo.alt}}{{else}}{{$photo.unknown}}{{/if}} + {{if $photo.album.name}}
{{$photo.album.name}}
+ {{/if}}