PhotoPage: simplify tag html nodes
This commit is contained in:
parent
e3d481caa1
commit
e671b7da30
@ -536,19 +536,8 @@ a#previous_photo:hover, a#next_photo:hover {
|
||||
margin-bottom: 0.75em;
|
||||
margin-right: 0.75em;
|
||||
}
|
||||
|
||||
.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;
|
||||
#sub_photo .tag-list .input-group-text {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
|
||||
|
@ -134,21 +134,21 @@ class PhotoPage extends Template
|
||||
|
||||
echo '
|
||||
<li id="tag-', $tag->id_tag, '">
|
||||
<a href="', $tag->getUrl(), '" title="View all posts tagged ', $tag->tag, '">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">', $tag->tag, '</span>';
|
||||
<div class="input-group">
|
||||
<a class="input-group-text" href="', $tag->getUrl(), '" title="View all posts tagged ', $tag->tag, '">
|
||||
', $tag->tag, '
|
||||
</a>';
|
||||
|
||||
if ($tag->kind === 'Person')
|
||||
{
|
||||
echo '
|
||||
<a class="delete-tag btn btn-danger px-1" title="Unlink this tag from this photo" href="#" data-id="', $tag->id_tag, '">
|
||||
<i class="bi bi-x"></i>
|
||||
</a>';
|
||||
<a class="delete-tag btn btn-danger px-1" title="Unlink this tag from this photo" href="#" data-id="', $tag->id_tag, '">
|
||||
<i class="bi bi-x"></i>
|
||||
</a>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</li>';
|
||||
}
|
||||
|
||||
@ -202,19 +202,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";
|
||||
|
Loading…
Reference in New Issue
Block a user