Skip to content
Merged
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
15 changes: 14 additions & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ const primaryLinks = [
</a>
<div class="nav-links">
{primaryLinks.map((link) => (
<a href={link.href} class="nav-link" aria-current={link.active ? "page" : undefined}>
<a
href={link.href}
class:list={["nav-link", link.href === "/" && "nav-link--home"]}
aria-current={link.active ? "page" : undefined}>
{link.label}
</a>
))}
<a href="https://app.scientfactory.com" class="nav-link">Sign in</a>
</div>
</nav>

Expand Down Expand Up @@ -399,6 +403,7 @@ const primaryLinks = [
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 1.75rem clamp(3rem, 3.4vw, 3.25rem);
}

Expand Down Expand Up @@ -448,6 +453,7 @@ const primaryLinks = [
border-bottom: 1px solid transparent;
color: var(--ink);
font-size: 1rem;
white-space: nowrap;
transition: border-color 220ms var(--ease-out), color 220ms var(--ease-out);
}

Expand Down Expand Up @@ -587,6 +593,13 @@ const primaryLinks = [
opacity: 0.6;
}

/* The brand already links home; this leaves room for Sign in on phones. */
@media (max-width: 480px) {
.nav-link--home {
display: none;
}
}

@media (max-width: 640px) {
.nav {
min-height: 5.5rem;
Expand Down