Skip to content

Commit 4d38902

Browse files
committed
adjust nav and index page
1 parent bd485e1 commit 4d38902

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

src/components/CommonNav.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</CommonNavItem>
1313
{/if}
1414
<li>
15-
<h2>portfolio</h2>
15+
<h2>introduction</h2>
1616
<ul>
1717
<CommonNavItem href="/index/about/" icon="fluent:hand-wave-24-regular">
1818
about me

src/routes/+layout.svelte

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,21 @@
217217
clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
218218
pointer-events: none;
219219
}
220+
221+
.main-container.home .nav-bar :global(nav li a:hover span) {
222+
background: linear-gradient(90deg, #f55, #dd0, #1e1, #0dd, #88f, #e1e, #f55);
223+
background-size: 5em 0.07em;
224+
background-repeat: repeat-x;
225+
animation: nav-item-hover 1s linear infinite;
226+
}
220227
}
221228
222229
223230
@media (min-width: 50em) {
224231
225232
.main-container.home {
226233
--inset-block: max(0px, calc(50dvh - 20em));
227-
--inset-inline: max(0px, calc(50vw - 40em));
234+
--inset-inline: max(0px, calc(50vw - 42em));
228235
inset-block: var(--inset-block);
229236
height: calc(100dvh - var(--inset-block) * 2);
230237
inset-inline: var(--inset-inline);
@@ -258,6 +265,12 @@
258265
.main-container.home .nav-bar :global(nav li.nav-item) {
259266
--outset: 0px;
260267
}
268+
.main-container.home .nav-bar :global(nav li a:hover span) {
269+
background: linear-gradient(90deg, #f55, #dd0, #1e1, #0dd, #88f, #e1e, #f55);
270+
background-size: 5em 0.07em;
271+
background-repeat: repeat-x;
272+
animation: nav-item-hover 1s linear infinite;
273+
}
261274
262275
263276
.main-container:not(.home) .nav-bar {
@@ -414,4 +427,12 @@
414427
transform: translateX(0);
415428
}
416429
}
430+
431+
@keyframes nav-item-hover {
432+
from {
433+
background-position: 0 calc(100% - 0.14em);
434+
} to {
435+
background-position: 5em calc(100% - 0.14em);
436+
}
437+
}
417438
</style>

0 commit comments

Comments
 (0)