Skip to content

Commit a57115e

Browse files
committed
header improvements
1 parent 8702d56 commit a57115e

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/lib/components/Header.svelte

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script>
22
import { t, language } from "$lib/stores/language.js";
33
import { theme } from "$lib/stores/theme.js";
4-
import { onMount } from "svelte";
54
65
function toggleTheme() {
76
theme.setTheme($theme === "light" ? "dark" : "light");
@@ -12,56 +11,56 @@
1211
}
1312
</script>
1413

15-
<header class="bg-ctp-base/80 sticky top-0 z-50 transition-colors duration-300 relative">
14+
<header class="bg-ctp-base/80 sticky top-0 z-50 transition-colors duration-300 relative pt-0 h-fit overflow-hidden">
1615
<div class="container mx-auto px-4">
1716
<nav
18-
class="flex justify-between items-center py-4 border-b border-ctp-surface1"
17+
class="flex justify-between items-baseline transform -translate-y-8"
1918
>
2019
<a href="#hero" class="text-xl font-bold text-ctp-text"
2120
>{$t("name")}</a
2221
>
2322
<ul
24-
class="hidden md:flex items-center space-x-8 text-sm font-medium"
23+
class="hidden md:flex items-center space-x-8 text-sm font-medium px-4"
2524
>
2625
<li>
2726
<a
2827
href="#about"
29-
class="inline-block text-ctp-subtext0 hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-95"
28+
class="inline-flex flex-col items-center justify-end w-24 h-36 p-2 bg-ctp-surface0 rounded-lg shadow-md text-ctp-text hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-110 active:-translate-y-1 active:rotate-1 active:shadow-lg rotate-1"
3029
>{$t("nav.about")}</a
3130
>
3231
</li>
3332
<li>
3433
<a
3534
href="#skills"
36-
class="inline-block text-ctp-subtext0 hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-95"
35+
class="inline-flex flex-col items-center justify-end w-24 h-36 p-2 bg-ctp-surface0 rounded-lg shadow-md text-ctp-text hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-110 active:-translate-y-1 active:rotate-1 active:shadow-lg rotate-[-1]"
3736
>{$t("nav.skills")}</a
3837
>
3938
</li>
4039
<li>
4140
<a
4241
href="#experience"
43-
class="inline-block text-ctp-subtext0 hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-95"
42+
class="inline-flex flex-col items-center justify-end w-24 h-36 p-2 bg-ctp-surface0 rounded-lg shadow-md text-ctp-text hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-110 active:-translate-y-1 active:rotate-1 active:shadow-lg rotate-2"
4443
>{$t("nav.experience")}</a
4544
>
4645
</li>
4746
<li>
4847
<a
4948
href="#projects"
50-
class="inline-block text-ctp-subtext0 hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-95"
49+
class="inline-flex flex-col items-center justify-end w-24 h-36 p-2 bg-ctp-surface0 rounded-lg shadow-md text-ctp-text hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-110 active:-translate-y-1 active:rotate-1 active:shadow-lg rotate-[-2]"
5150
>{$t("nav.projects")}</a
5251
>
5352
</li>
5453
<li>
5554
<a
5655
href="#education"
57-
class="inline-block text-ctp-subtext0 hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-95"
56+
class="inline-flex flex-col items-center justify-end w-24 h-36 p-2 bg-ctp-surface0 rounded-lg shadow-md text-ctp-text hover:text-ctp-green transition-colors transform transition-all duration-200 ease-in-out hover:scale-105 active:scale-110 active:-translate-y-1 active:rotate-1 active:shadow-lg rotate-1"
5857
>{$t("nav.education")}</a
5958
>
6059
</li>
6160
</ul>
6261
</nav>
6362
</div>
64-
<div class="absolute top-4 right-4 flex items-center gap-4" dir="ltr">
63+
<div class="absolute top-[-16] right-4 flex items-center gap-4" dir="ltr">
6564
<button
6665
on:click={toggleLanguage}
6766
class="text-sm font-bold text-ctp-subtext0 transform transition-transform duration-200 hover:scale-110 active:scale-95"

0 commit comments

Comments
 (0)