Skip to content

Commit 4e17488

Browse files
committed
ui: isolate theme toggle to top-right corner
- Split header into header-left and header-right groups - header-left: logo, nav, GitHub, auth (compact left side) - header-right: theme toggle only (isolated top-right) - Use space-between to push theme toggle to far right - Creates clear visual separation for global UI control
1 parent ce8b626 commit 4e17488

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed

src/lib/components/SiteHeader.svelte

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,27 @@
1212

1313
<header class="site-header">
1414
<div class="header-container">
15-
<a href="/" class="header-logo">OpenBoot</a>
16-
<nav class="header-nav">
17-
<a href="/explore" class:active={currentPath === '/explore' || currentPath.startsWith('/explore')}>Explore</a>
18-
<a href="/docs" class:active={currentPath === '/docs' || currentPath.startsWith('/docs')}>Docs</a>
19-
</nav>
15+
<div class="header-left">
16+
<a href="/" class="header-logo">OpenBoot</a>
17+
<nav class="header-nav">
18+
<a href="/explore" class:active={currentPath === '/explore' || currentPath.startsWith('/explore')}>Explore</a>
19+
<a href="/docs" class:active={currentPath === '/docs' || currentPath.startsWith('/docs')}>Docs</a>
20+
</nav>
21+
<div class="header-actions">
22+
{#if children}{@render children()}{/if}
23+
<GitHubStarBadge />
24+
{#if $auth.loading}
25+
26+
{:else if $auth.user}
27+
<a href="/dashboard" class="header-dashboard-link">Dashboard</a>
28+
<span class="header-separator">/</span>
29+
<a href="/api/auth/logout" class="header-logout-link">Logout</a>
30+
{:else}
31+
<a href="/login" class="header-login-link">Sign in</a>
32+
{/if}
33+
</div>
34+
</div>
2035
<div class="header-right">
21-
{#if children}{@render children()}{/if}
22-
<GitHubStarBadge />
23-
{#if $auth.loading}
24-
25-
{:else if $auth.user}
26-
<a href="/dashboard" class="header-dashboard-link">Dashboard</a>
27-
<span class="header-separator">/</span>
28-
<a href="/api/auth/logout" class="header-logout-link">Logout</a>
29-
{:else}
30-
<a href="/login" class="header-login-link">Sign in</a>
31-
{/if}
3236
<ThemeToggle />
3337
</div>
3438
</div>
@@ -52,7 +56,12 @@
5256
margin: 0 auto;
5357
padding: 14px 24px;
5458
display: flex;
55-
justify-content: flex-start;
59+
justify-content: space-between;
60+
align-items: center;
61+
}
62+
63+
.header-left {
64+
display: flex;
5665
align-items: center;
5766
gap: 20px;
5867
}
@@ -108,12 +117,17 @@
108117
transform: scaleX(1);
109118
}
110119
111-
.header-right {
120+
.header-actions {
112121
display: flex;
113122
align-items: center;
114123
gap: 16px;
115124
}
116125
126+
.header-right {
127+
display: flex;
128+
align-items: center;
129+
}
130+
117131
.header-dashboard-link,
118132
.header-login-link,
119133
.header-logout-link {

0 commit comments

Comments
 (0)