Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.
Merged
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
77 changes: 77 additions & 0 deletions src/components/content/ContentCard.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
import type { HTMLAttributes } from 'astro/types';

interface Props extends Omit<HTMLAttributes<'a'>, 'title'> {
title: string;
description?: string;
eyebrow?: string;
href: string;
}

const { title, description, eyebrow, href, ...attributes } = Astro.props;
---

<a class="content-card" href={href} {...attributes}>
{eyebrow && <p class="content-card-eyebrow">{eyebrow}</p>}
<h3>{title}</h3>
{description && <p class="content-card-description">{description}</p>}
<slot />
<span class="content-card-arrow" aria-hidden="true">→</span>
</a>

<style>
.content-card {
position: relative;
display: flex;
min-height: 11.5rem;
flex-direction: column;
padding: 1.2rem;
border: 1px solid var(--sl-color-gray-5);
border-radius: 0.5rem;
color: inherit;
text-decoration: none;
background: var(--sl-color-black);
transition: border-color 160ms ease, background-color 160ms ease;
}

.content-card:hover {
border-color: #2fbf5b;
background: color-mix(in srgb, var(--sl-color-black) 92%, #2fbf5b);
}

.content-card-eyebrow {
margin: 0 2.25rem 0.7rem 0;
color: #2fbf5b;
font-size: 0.76rem;
font-weight: 800;
letter-spacing: 0;
text-transform: uppercase;
}

.content-card h3 {
margin: 0 2.25rem 0.55rem 0;
color: var(--sl-color-white);
font-size: 1.35rem;
line-height: 1.2;
}

.content-card-description {
margin: 0;
color: var(--sl-color-gray-2);
line-height: 1.55;
}

.content-card-arrow {
position: absolute;
top: 1rem;
right: 1.15rem;
color: var(--sl-color-gray-3);
font-size: 1.35rem;
line-height: 1;
transition: color 160ms ease;
}

.content-card:hover .content-card-arrow {
color: #2fbf5b;
}
</style>
25 changes: 25 additions & 0 deletions src/components/content/ContentCardGrid.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
interface Props {
label?: string;
}

const { label } = Astro.props;
---

<section class="content-card-grid" aria-label={label}>
<slot />
</section>

<style>
.content-card-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}

@media (max-width: 42rem) {
.content-card-grid {
grid-template-columns: 1fr;
}
}
</style>
48 changes: 48 additions & 0 deletions src/components/content/ContentTitleBar.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
interface Props {
label?: string;
title: string;
description?: string;
}

const { label, title, description } = Astro.props;
---

<section class="content-titlebar">
{label && <p class="content-titlebar-label">{label}</p>}
<h2>{title}</h2>
{description && <p class="content-titlebar-description">{description}</p>}
</section>

<style>
.content-titlebar {
padding: 1.25rem 0 1.75rem;
margin-bottom: 1.5rem;
border-bottom: 1px solid var(--sl-color-gray-5);
}

.content-titlebar-label {
margin: 0 0 0.35rem;
color: #2fbf5b;
font-size: 0.78rem;
font-weight: 800;
letter-spacing: 0;
text-transform: uppercase;
}

.content-titlebar h2 {
max-width: 15ch;
margin: 0;
color: var(--sl-color-white);
font-size: clamp(2.2rem, 4.8vw, 3.6rem);
line-height: 1;
}

.content-titlebar-description {
max-width: 46rem;
margin: 1rem 0 0;
color: var(--sl-color-gray-2);
font-size: 1.05rem;
line-height: 1.65;
}
</style>
133 changes: 0 additions & 133 deletions src/components/content/LinkCard.astro

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/content/MechanismCardGrid.astro
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const { cards } = Astro.props;
.mechanism-card-meta {
display: block;
margin: 0;
color: var(--sl-color-accent-high);
color: #2fbf5b;
font-size: var(--sl-text-xs);
font-weight: 700;
letter-spacing: 0;
Expand Down
20 changes: 19 additions & 1 deletion src/components/content/MechanismExamplesLanding.astro
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const categories = [
<div class="section-heading">
<p class="mechanism-eyebrow">Browse by mechanism</p>
<h2>Mechanism library</h2>
<p>Each section collects in-depth pages first, followed by CAD references when available.</p>
<p>Each section displays in-depth writeups first followed by CAD references when available.</p>
</div>

<div class="library-grid">
Expand Down Expand Up @@ -287,6 +287,10 @@ const categories = [
text-transform: uppercase;
}

.category-label {
color: #2fbf5b;
}

.section-heading h2 {
margin: 0;
color: var(--sl-color-white);
Expand Down Expand Up @@ -323,6 +327,10 @@ const categories = [
font-size: var(--sl-text-lg);
}

.mechanism-hero .mechanism-eyebrow {
color: var(--mechanism-green);
}

.mechanism-hero .hero-copy {
max-width: 62ch;
}
Expand Down Expand Up @@ -452,6 +460,11 @@ const categories = [
color: var(--sl-color-gray-3);
}

.section-heading .mechanism-eyebrow {
color: #2fbf5b;
line-height: 1.2;
}

.featured-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
Expand Down Expand Up @@ -552,6 +565,11 @@ const categories = [
line-height: 1.5;
}

.featured-body .category-label {
color: #2fbf5b;
line-height: 1.2;
}

.library-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
Expand Down
4 changes: 2 additions & 2 deletions src/components/homepage/Countdown.astro
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const { targetDate, label = "Countdown" } = Astro.props;
.countdown-label {
font-size: 1.1rem;
font-weight: 600;
color: #43A047;
color: #2fbf5b;
margin-bottom: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.1em;
Expand Down Expand Up @@ -92,7 +92,7 @@ const { targetDate, label = "Countdown" } = Astro.props;
.countdown-separator {
font-size: 2rem;
font-weight: 700;
color: #43A047;
color: #2fbf5b;
margin: 0 0.25rem;
}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading