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:
@@ -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>
|
||||||
}
|
}
|
||||||
|
|||||||
+65
-52
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user