Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@
::selection {
background-color: rgba(120, 120, 120, 0.25);
}

/* Reserve room for the mobile floating dock (rendered by NavBar) so
nothing — including the footer — hides behind it. Disabled at sm+
where the dock is replaced by the in-nav links. */
@media (max-width: 639.98px) {
body {
padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 5rem);
}
}
}

/* Vote button pop */
Expand Down
17 changes: 9 additions & 8 deletions src/lib/NavBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
</script>

<!-- The header's priority order, expressed as layout rather than hoped for: the
nav never shrinks, the wordmark does. A fourth link took the row to exactly
the available width at 320px, and the thing that should give way when a
phone gets narrower than that is the name — it is decoration next to a set
of links that are the only way around the site. `min-w-0` is what lets it. -->
nav never shrinks (`ul.shrink-0`), the wordmark does (`min-w-0` + truncate).
A fourth link took the row to exactly the available width at 320px, and the
thing that should give way when a phone gets narrower than that is the name
— it is decoration next to a set of links that are the only way around the
site. Type stays the same size; the wordmark truncates instead of shrinking. -->
<div class="flex items-center justify-between gap-3">
<a
href="/"
Expand All @@ -45,27 +46,27 @@
>
<span class="relative block min-w-0">
<span
class="block truncate font-sans text-xl font-medium tracking-tight will-change-auto group-hover:opacity-0 group-hover:blur-sm sm:text-2xl
class="block truncate font-sans text-2xl font-medium tracking-tight will-change-auto group-hover:opacity-0 group-hover:blur-sm
{mounted ? 'transition-[opacity,filter,transform] duration-200 ease-out' : ''}
{showName ? 'translate-y-0 opacity-100' : 'translate-y-1 opacity-0'}"
>
Injoon Oh
</span>
<span
class="pointer-events-none absolute inset-0 block truncate font-sans text-xl font-semibold tracking-tight opacity-0 blur-sm transition-[opacity,filter] duration-200 ease-out will-change-auto group-hover:opacity-100 group-hover:blur-none sm:text-2xl"
class="pointer-events-none absolute inset-0 block truncate font-sans text-2xl font-semibold tracking-tight opacity-0 blur-sm transition-[opacity,filter] duration-200 ease-out will-change-auto group-hover:opacity-100 group-hover:blur-none"
>
오인준
</span>
</span>
</a>

<ul class="flex shrink-0 items-center gap-3 sm:gap-4">
{#each navItems as item}
{#each navItems as item (item.href)}
<li>
<a
href={item.href}
onclick={() => trigger([{ duration: 25 }], { intensity: 0.7 })}
class="p-0 text-sm font-medium transition-colors duration-150 sm:text-base {isActive(
class="p-0 text-base font-medium transition-colors duration-150 {isActive(
item.href
)
? 'text-neutral-900 dark:text-neutral-100'
Expand Down
Loading