Skip to content

Commit 29aa7b4

Browse files
committed
feat: update header links to conditionally render dashboard and login buttons
1 parent b7be65a commit 29aa7b4

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed

src/routes/+page.svelte

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
6666
<div class="header-container">
6767
<a href="/" class="header-logo">OpenBoot</a>
6868
<div class="header-right">
69-
{#if $auth.user}
70-
<a href="/dashboard" class="header-link">Dashboard</a>
71-
{:else}
72-
<a href="/login" class="header-link">Sign in</a>
73-
{/if}
74-
<a href="/docs" class="header-link">Docs</a>
7569
<ThemeToggle />
7670
</div>
7771
</div>
@@ -93,17 +87,24 @@
9387
<div class="feature-item">100% open source, zero telemetry</div>
9488
</div>
9589

96-
<div class="cta-buttons">
97-
{#if $auth.user}
98-
<a href="/dashboard" class="btn-outlined">
99-
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
100-
<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" />
101-
<rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />
102-
</svg>
103-
Dashboard
104-
</a>
105-
{/if}
106-
<a href="/docs" class="btn-outlined">
90+
<div class="cta-buttons">
91+
{#if $auth.user}
92+
<a href="/dashboard" class="btn-outlined">
93+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
94+
<rect x="3" y="3" width="7" height="7" /><rect x="14" y="3" width="7" height="7" />
95+
<rect x="14" y="14" width="7" height="7" /><rect x="3" y="14" width="7" height="7" />
96+
</svg>
97+
Dashboard
98+
</a>
99+
{:else}
100+
<a href="/login" class="btn-outlined">
101+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
102+
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/>
103+
</svg>
104+
Sign in
105+
</a>
106+
{/if}
107+
<a href="/docs" class="btn-outlined">
107108
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
108109
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/>
109110
</svg>
@@ -326,18 +327,7 @@
326327
.header-right {
327328
display: flex;
328329
align-items: center;
329-
gap: 16px;
330-
}
331-
332-
.header-link {
333-
font-size: 0.85rem;
334-
font-weight: 500;
335-
color: var(--text-secondary);
336-
transition: color 0.2s;
337-
}
338-
339-
.header-link:hover {
340-
color: var(--text-primary);
330+
gap: 12px;
341331
}
342332
343333
/* ── Main ──────────────────────────────────────────── */

0 commit comments

Comments
 (0)