Skip to content

Commit b560258

Browse files
Prepare preview build, fix ScreenSize
1 parent da60b4a commit b560258

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

src/lib/components/ScreenSize.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
size: parseInt(configScreens[screen as keyof typeof configScreens].replace("px", ""))
1414
}))
1515
.sort((a, b) => a.size - b.size);
16-
let matchingScreen = $derived(screens.findLast(screen => screen.size <= width));
1716
1817
let width = $state(0);
1918
let height = $state(0);
2019
20+
let matchingScreen = $derived(screens.findLast(screen => screen.size <= width));
2121
let showAllScreens = $state(false);
2222
</script>
2323

src/routes/+layout.svelte

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
import { dev } from "$app/environment";
77
import { env } from "$env/dynamic/public";
88
import { page } from "$app/stores";
9-
import { ChevronDown, LoaderCircle, LogOut, Monitor, Moon, Sun, X } from "lucide-svelte";
9+
import {
10+
ArrowUpRight,
11+
ChevronDown,
12+
LoaderCircle,
13+
LogOut,
14+
Monitor,
15+
Moon,
16+
Sun,
17+
X
18+
} from "lucide-svelte";
1019
import { ModeWatcher, resetMode, setMode } from "mode-watcher";
1120
import { Octokit } from "octokit";
1221
import { persisted } from "svelte-persisted-store";
@@ -148,6 +157,11 @@
148157
<h2 class="hidden text-xl font-semibold xs:inline-block">
149158
Svelte
150159
<span class="text-primary">Changelog</span>
160+
<span
161+
class="ml-2 rounded-lg p-1.5 text-xs font-light outline outline-[0.5] outline-primary"
162+
>
163+
Preview
164+
</span>
151165
</h2>
152166
</a>
153167

@@ -173,6 +187,16 @@
173187
<!-- Right part -->
174188
<div class="flex flex-1 items-center justify-end space-x-2 sm:space-x-4">
175189
<nav class="flex items-center space-x-1">
190+
<Button
191+
href="https://svelte-changelog.vercel.app"
192+
variant="ghost"
193+
class="group mr-6 text-muted-foreground max-md:hidden"
194+
>
195+
Main website
196+
<ArrowUpRight
197+
class="ml-2 size-4 transition-transform duration-300 group-hover:-translate-y-1 group-hover:translate-x-1 group-hover:text-primary"
198+
/>
199+
</Button>
176200
{#if isAuthenticating}
177201
<Button variant="outline" size="icon" disabled>
178202
<LoaderCircle class="size-4 animate-spin" />

0 commit comments

Comments
 (0)