refactor(reader): remove test font, move settings panel to right sidebar
- Remove Playwrite NZ Guides test font and all references (FONT_MAP, FONT_FILES, reader-fonts.css, dropdown option, font files) - Move settings panel from left sidebar to right sidebar (left sidebar now only contains TOC) - Move Restore Defaults button from top bar icon to a styled button inside the settings panel, side by side with Done button
This commit is contained in:
+19
-24
@@ -23,17 +23,17 @@ templ Reader(user User, metadata ReaderMetadata, progress ReadingProgress, bookm
|
||||
@ReaderChrome(user, metadata, progress)
|
||||
<!-- Dockable Panels Container -->
|
||||
<div id="reader-panels" class="fixed inset-0 pointer-events-none z-30">
|
||||
<!-- Left Sidebar (TOC, Settings) -->
|
||||
<!-- Left Sidebar (TOC) -->
|
||||
<div id="left-sidebar" class="absolute left-0 top-0 bottom-0 pointer-events-auto flex flex-col">
|
||||
<div id="toc-panel" x-show="tocOpen" x-transition class="panel-container pointer-events-auto" data-panel="toc">
|
||||
@ReaderTOCPanel(metadata)
|
||||
</div>
|
||||
</div>
|
||||
<!-- Right Sidebar (Settings, Navigator, Bookmarks) -->
|
||||
<div id="right-sidebar" class="absolute right-0 top-0 bottom-0 pointer-events-auto flex flex-col">
|
||||
<div id="settings-panel" x-show="settingsOpen" x-transition class="panel-container pointer-events-auto" data-panel="settings">
|
||||
@ReaderSettingsPanel()
|
||||
</div>
|
||||
</div>
|
||||
<!-- Right Sidebar (Navigator, Bookmarks) -->
|
||||
<div id="right-sidebar" class="absolute right-0 top-0 bottom-0 pointer-events-auto flex flex-col">
|
||||
<div id="navigator-panel" x-show="navigatorOpen" x-transition class="panel-container pointer-events-auto" data-panel="navigator">
|
||||
@ReaderNavigatorPanel()
|
||||
</div>
|
||||
@@ -59,22 +59,13 @@ templ ReaderChrome(user User, metadata ReaderMetadata, progress ReadingProgress)
|
||||
← Back
|
||||
</a>
|
||||
<h1 class="text-lg font-semibold">{ metadata.Title }</h1>
|
||||
<div class="flex flex-col items-center gap-0.5">
|
||||
<button
|
||||
@click="toggleSettings()"
|
||||
class="p-2 rounded-lg hover:bg-gray-700"
|
||||
title="Settings"
|
||||
>
|
||||
⚙️
|
||||
</button>
|
||||
<button
|
||||
@click="restoreDefaults()"
|
||||
class="p-1 rounded-lg hover:bg-gray-700 text-xs"
|
||||
title="Restore Defaults"
|
||||
>
|
||||
↩️
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
@click="toggleSettings()"
|
||||
class="p-2 rounded-lg hover:bg-gray-700"
|
||||
title="Settings"
|
||||
>
|
||||
⚙️
|
||||
</button>
|
||||
</div>
|
||||
</div> <!-- Bottom bar -->
|
||||
<div class="fixed bottom-0 left-0 right-0 bg-opacity-95 backdrop-blur border-t z-40" style="background-color: var(--bg-primary);">
|
||||
@@ -258,7 +249,6 @@ templ ReaderSettingsPanel() {
|
||||
<option value="noto-serif">Noto Serif</option>
|
||||
<option value="charis-sil">Charis SIL</option>
|
||||
<option value="ibm-plex">IBM Plex Serif</option>
|
||||
<option value="playwrite">Playwrite NZ Guides (Test)</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="block mb-2">
|
||||
@@ -280,9 +270,14 @@ templ ReaderSettingsPanel() {
|
||||
Double Page Spread
|
||||
</label>
|
||||
</div>
|
||||
<button @click="toggleSettings()" class="w-full py-2 bg-blue-600 text-white rounded hover:bg-blue-700">
|
||||
Done
|
||||
</button>
|
||||
<div class="flex gap-2 mt-6">
|
||||
<button @click="restoreDefaults()" class="flex-1 py-2 border rounded hover:opacity-80" style="border-color: var(--border);">
|
||||
Restore Defaults
|
||||
</button>
|
||||
<button @click="toggleSettings()" class="flex-1 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">
|
||||
Done
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user