fix(reader): use proper templ expression for back link href and clean up formatting

The back link in ReaderChrome used literal curly braces inside the href
attribute string (href="/media-items/{ metadata.MediaItemID }") which
doesn't interpolate the variable in templ. Changed to use the correct
templ expression syntax: href={ "/media/" + metadata.MediaItemID }.

Also fixed minor formatting issues:
- Normalize whitespace in comment after closing div
- Collapse empty navigator-viewport div to single line
This commit is contained in:
2026-04-23 17:01:01 -04:00
parent 72c8ba7a4f
commit 5cdae6cc4b
2 changed files with 68 additions and 56 deletions
+2 -3
View File
@@ -55,7 +55,7 @@ templ ReaderChrome(user User, metadata ReaderMetadata, progress ReadingProgress)
<!-- Top bar --> <!-- Top bar -->
<div class="fixed top-0 left-0 right-0 bg-opacity-95 backdrop-blur border-b z-40" style="background-color: var(--bg-primary);"> <div class="fixed top-0 left-0 right-0 bg-opacity-95 backdrop-blur border-b z-40" style="background-color: var(--bg-primary);">
<div class="flex items-center justify-between px-4 py-3"> <div class="flex items-center justify-between px-4 py-3">
<a href="/media-items/{ metadata.MediaItemID }" class="text-lg hover:underline"> <a href={ "/media/" + metadata.MediaItemID } class="text-lg hover:underline">
Back Back
</a> </a>
<h1 class="text-lg font-semibold">{ metadata.Title }</h1> <h1 class="text-lg font-semibold">{ metadata.Title }</h1>
@@ -325,8 +325,7 @@ templ ReaderNavigatorPanel() {
</div> </div>
</div> </div>
<div class="panel-content p-2 overflow-hidden"> <div class="panel-content p-2 overflow-hidden">
<div id="navigator-viewport" class="relative w-full h-full"> <div id="navigator-viewport" class="relative w-full h-full"></div>
</div>
</div> </div>
</div> </div>
} }
File diff suppressed because one or more lines are too long