From 949a45ff8fe2969d0a10fa26db9d897f61c55753 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 11 Jan 2024 21:53:44 +0100 Subject: [PATCH] PhotoPage: simplify tag html nodes --- public/css/default.css | 4 +++- templates/PhotoPage.php | 33 +++++++++++++++------------------ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/public/css/default.css b/public/css/default.css index 66d93aa..f1f0ba0 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -536,7 +536,9 @@ a#previous_photo:hover, a#next_photo:hover { margin-bottom: 0.75em; margin-right: 0.75em; } - +#sub_photo .tag-list .input-group-text { + color: inherit; +} #photo_exif_box dt { font-weight: bold; diff --git a/templates/PhotoPage.php b/templates/PhotoPage.php index b713677..07ba061 100644 --- a/templates/PhotoPage.php +++ b/templates/PhotoPage.php @@ -170,21 +170,21 @@ class PhotoPage extends Template echo '
  • - -
    - ', $tag->tag, ''; +
    + + ', $tag->tag, ' + '; if ($tag->kind === 'Person') { echo ' - - - '; + + + '; } echo ' -
    - +
  • '; } @@ -238,19 +238,16 @@ class PhotoPage extends Template const newListItem = document.createElement("li"); newListItem.id = "tag-" + item.id_tag; - const newLink = document.createElement("a"); - newLink.href = item.url; - newLink.title = "View all posts tagged " + item.label; - newListItem.appendChild(newLink); - const newInputGroup = document.createElement("div"); newInputGroup.className = "input-group"; - newLink.appendChild(newInputGroup); + newListItem.appendChild(newInputGroup); - const newLabel = document.createElement("span"); - newLabel.className = "input-group-text"; - newLabel.textContent = item.label; - newInputGroup.appendChild(newLabel); + const newLink = document.createElement("a"); + newLink.className = "input-group-text"; + newLink.href = item.url; + newLink.title = "View all posts tagged " + item.label; + newLink.textContent = item.label; + newInputGroup.appendChild(newLink); const removeLink = document.createElement("a"); removeLink.className = "delete-tag btn btn-danger px-1";