Skip to content

Commit dbf2a1d

Browse files
committed
fix: navbar in front on mobile devices
1 parent d6388ea commit dbf2a1d

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/features/navbar/components/Navbar.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
};
1414
</script>
1515

16-
<nav id="navbar" class="flex h-16 items-center bg-base-300 px-4">
16+
<nav
17+
id="navbar"
18+
class="sticky top-0 z-50 flex h-16 items-center bg-base-300 px-4"
19+
>
1720
<a class="font-rocket-rinder text-xl text-secondary" href="/">
1821
Neal Wang
1922
</a>

src/lib/components/Banner.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
interface Props {
55
title: string;
66
image: string;
7+
smallerText: boolean;
78
}
89
9-
const { title, image }: Props = $props();
10+
const { title, image, smallerText }: Props = $props();
1011
</script>
1112

1213
<div
@@ -18,7 +19,10 @@
1819
<div class="hero-content text-center text-neutral-content">
1920
<div class="max-w-md">
2021
<a href="/">
21-
<h1 id="name" class="mb-4 text-5xl md:text-6xl">
22+
<h1
23+
id="name"
24+
class={`mb-4 ${smallerText ? "text-4xl" : "text-5xl"} md:text-6xl`}
25+
>
2226
<MetallicText>{title}</MetallicText>
2327
</h1>
2428
</a>

src/routes/experience/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
const works = yaml.load(worksRaw) as Work[];
1111
</script>
1212

13-
<Banner title="Experience" image="gears" />
13+
<Banner title="Experience" image="gears" smallerText />
1414

1515
<div class="mt-12 flex p-4 sm:p-8 md:justify-center">
1616
<article class="prose max-w-none md:w-2/3 lg:prose-xl">

0 commit comments

Comments
 (0)