Skip to content

Commit c3a56b1

Browse files
committed
Move pin previews and theme toggle into navbar help group
1 parent e95ac9d commit c3a56b1

1 file changed

Lines changed: 18 additions & 21 deletions

File tree

src/routes/+page.svelte

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,24 @@
11721172

11731173
<!-- Help -->
11741174
<div class="toolbar-group">
1175+
<button
1176+
class="toolbar-btn"
1177+
class:active={showPinnedPreviews}
1178+
onclick={() => pinnedPreviewsStore.toggle()}
1179+
use:tooltip={{ text: "Pin Previews", shortcut: "P" }}
1180+
aria-label="Pin Previews"
1181+
>
1182+
<Icon name={showPinnedPreviews ? "pin-filled" : "pin"} size={16} />
1183+
</button>
1184+
<button
1185+
class="toolbar-btn"
1186+
bind:this={themeToggleBtn}
1187+
onclick={(e) => toggleThemeWithTransition(e)}
1188+
use:tooltip={{ text: currentTheme === 'dark' ? 'Light mode' : 'Dark mode', shortcut: "T" }}
1189+
aria-label="Toggle theme"
1190+
>
1191+
<Icon name={currentTheme === 'dark' ? 'sun' : 'moon'} size={16} />
1192+
</button>
11751193
<button class="toolbar-btn" onclick={() => showKeyboardShortcuts = true} use:tooltip={{ text: "Shortcuts", shortcut: "?" }} aria-label="Keyboard shortcuts">
11761194
<Icon name="keyboard" size={16} />
11771195
</button>
@@ -1263,27 +1281,6 @@
12631281
</button>
12641282
</div>
12651283

1266-
<!-- UI preferences -->
1267-
<div class="toggle-group">
1268-
<button
1269-
class="toggle-btn"
1270-
class:active={showPinnedPreviews}
1271-
onclick={() => pinnedPreviewsStore.toggle()}
1272-
use:tooltip={{ text: "Pin Previews", shortcut: "P", position: "right" }}
1273-
aria-label="Pin Previews"
1274-
>
1275-
<Icon name={showPinnedPreviews ? "pin-filled" : "pin"} size={18} />
1276-
</button>
1277-
<button
1278-
class="toggle-btn"
1279-
bind:this={themeToggleBtn}
1280-
onclick={(e) => toggleThemeWithTransition(e)}
1281-
use:tooltip={{ text: currentTheme === 'dark' ? 'Light mode' : 'Dark mode', shortcut: "T", position: "right" }}
1282-
aria-label="Toggle theme"
1283-
>
1284-
<Icon name={currentTheme === 'dark' ? 'sun' : 'moon'} size={18} />
1285-
</button>
1286-
</div>
12871284
</div>
12881285

12891286
<!-- Simulation Settings Panel (floating right) -->

0 commit comments

Comments
 (0)