From 9922cd083371a72b42c99e7801aad572d38059c2 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 11 Jan 2024 20:47:41 +0100 Subject: [PATCH] PhotoPage: update and refactor tagging script slightly --- public/css/default.css | 15 +++---- templates/PhotoPage.php | 86 +++++++++++++++++++++++------------------ 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/public/css/default.css b/public/css/default.css index c119c9d..66d93aa 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -526,20 +526,15 @@ a#previous_photo:hover, a#next_photo:hover { #sub_photo h2, #sub_photo h3, #photo_exif_box h3, #user_actions_box h3 { margin-bottom: 1rem; } -#sub_photo #tag_list { +#sub_photo .tag-list { list-style: none; margin: 1em 0; padding: 0; } -#sub_photo #tag_list li { - display: inline; - padding-right: 0.75em; -} -#tag_list .delete-tag { - opacity: 0.25; -} -#tag_list .delete-tag:hover { - opacity: 1.0; +#sub_photo .tag-list > li { + display: inline-block; + margin-bottom: 0.75em; + margin-right: 0.75em; } diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php index e9d9fec..b713677 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -156,9 +156,12 @@ class PhotoPage extends Template private function printTags($header, $tagKind, $allowLinkingNewTags) { + static $nextTagListId = 1; + $tagListId = 'tagList' . ($nextTagListId++); + echo '

', $header, '

-