diff --git a/public/css/default.css b/public/css/default.css index 84e02f1..d5e19b8 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -526,34 +526,27 @@ a#previous_photo:hover, a#next_photo:hover { #sub_photo h2, #sub_photo 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; +#sub_photo .tag-list > li { + display: inline-block; + margin-bottom: 0.75em; + margin-right: 0.75em; } -#tag_list .delete-tag { - opacity: 0.25; +#sub_photo .tag-list .input-group-text { + color: inherit; } -#tag_list .delete-tag:hover { - opacity: 1.0; +[data-bs-theme=light] #sub_photo .tag-list .btn-danger { + background-color: rgba(175, 0, 0, 0.5); + border-color: rgba(175, 0, 0, 0.5); } -.photo_meta { - background-color: var(--bs-body-bg); - box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1); -} -.photo_meta li { - padding: 0.6rem 1rem; -} -.photo_meta h4 { - font-family: 'Coda', sans-serif; - font-size: inherit; - font-weight: bold; - margin: 0; +[data-bs-theme=dark] #sub_photo .tag-list .btn-danger { + background-color: rgba(100, 0, 0, 0.5); + border-color: rgb(100, 0, 0); } diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php index 3f34e3d..b74e420 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -32,8 +32,8 @@ class PhotoPage extends Template echo '

', $this->photo->getTitle(), '

'; - $this->taggedPeople(); - $this->linkNewTags(); + $this->printTags('Album', 'Album', false); + $this->printTags('Tagged People', 'Person', true); echo ' @@ -118,91 +118,111 @@ class PhotoPage extends Template '; } - private function taggedPeople() + private function printTags($header, $tagKind, $allowLinkingNewTags) { + static $nextTagListId = 1; + $tagListId = 'tagList' . ($nextTagListId++); + echo ' -

Tags

-