chore: scaffold Astro site + brand shell (header, footer, layout, motif)
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
commit
6e1888b8ff
14 files changed
+7000
No files matched your search
@@ -0,0 +1,136 @@
|
||||
---
|
||||
const linkColumns = [
|
||||
{
|
||||
heading: 'Learn',
|
||||
links: [
|
||||
{ label: 'Docs', href: 'https://docs.green-tea.dev', external: true },
|
||||
{ label: 'Blog', href: '/blog', external: false },
|
||||
],
|
||||
},
|
||||
{
|
||||
heading: 'Code',
|
||||
links: [
|
||||
{ label: 'GitHub', href: 'https://github.com/expressive-tea/green-tea', external: true },
|
||||
{ label: 'npm', href: 'https://www.npmjs.com/package/@expressive-tea/core', external: true },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const year = new Date().getFullYear();
|
||||
---
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="wrap site-footer__inner">
|
||||
<div class="site-footer__brand">
|
||||
<span class="site-footer__wordmark">Green Tea<span class="site-footer__dot">.</span></span>
|
||||
<p class="site-footer__tagline">A zen, opinionated, type-safe framework.</p>
|
||||
</div>
|
||||
|
||||
<nav class="site-footer__columns" aria-label="Footer">
|
||||
{
|
||||
linkColumns.map((column) => (
|
||||
<div class="site-footer__column">
|
||||
<p class="site-footer__heading">{column.heading}</p>
|
||||
<ul>
|
||||
{column.links.map((link) => (
|
||||
<li>
|
||||
<a href={link.href} target={link.external ? '_blank' : undefined} rel={link.external ? 'noopener noreferrer' : undefined}>
|
||||
{link.label}
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="wrap site-footer__bottom">
|
||||
<p>© {year} · MIT · That's the tea. 🍵</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<style>
|
||||
.site-footer {
|
||||
border-top: 1px solid color-mix(in srgb, var(--panel) 80%, var(--base));
|
||||
background: var(--panel);
|
||||
padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
|
||||
}
|
||||
|
||||
.site-footer__inner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: 2.5rem;
|
||||
}
|
||||
|
||||
.site-footer__wordmark {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 700;
|
||||
font-size: 1.15rem;
|
||||
color: var(--matcha);
|
||||
}
|
||||
|
||||
.site-footer__dot {
|
||||
color: var(--violet);
|
||||
}
|
||||
|
||||
.site-footer__tagline {
|
||||
color: var(--dim);
|
||||
margin: 0.6em 0 0;
|
||||
max-width: 26ch;
|
||||
}
|
||||
|
||||
.site-footer__columns {
|
||||
display: flex;
|
||||
gap: 3.5rem;
|
||||
}
|
||||
|
||||
.site-footer__heading {
|
||||
color: var(--ink);
|
||||
font-weight: 600;
|
||||
margin: 0 0 0.75em;
|
||||
font-size: 0.9rem;
|
||||
letter-spacing: 0.02em;
|
||||
text-transform: uppercase;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.site-footer__column ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.6em;
|
||||
}
|
||||
|
||||
.site-footer__column a {
|
||||
color: var(--dim);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.site-footer__column a:hover,
|
||||
.site-footer__column a:focus-visible {
|
||||
color: var(--matcha);
|
||||
}
|
||||
|
||||
.site-footer__bottom {
|
||||
margin-top: 2.5rem;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 1px solid color-mix(in srgb, var(--base) 60%, var(--panel));
|
||||
}
|
||||
|
||||
.site-footer__bottom p {
|
||||
margin: 0;
|
||||
color: var(--dim);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.site-footer__columns {
|
||||
gap: 2rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,64 @@
|
||||
---
|
||||
/**
|
||||
* GraphMotif — ambient section decoration.
|
||||
*
|
||||
* A subtle venation-graph: matcha lines fan out from a midrib to small
|
||||
* matcha nodes, with a single violet node standing in for the "one
|
||||
* dependency that matters" accent used across the brand's video assets.
|
||||
*
|
||||
* Purely decorative — hidden from assistive tech.
|
||||
*/
|
||||
interface Props {
|
||||
class?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
opacity?: number;
|
||||
}
|
||||
|
||||
const { class: className = '', width = 420, height = 360, opacity = 0.35 } = Astro.props;
|
||||
---
|
||||
|
||||
<svg
|
||||
class:list={['graph-motif', className]}
|
||||
viewBox="0 0 420 360"
|
||||
width={width}
|
||||
height={height}
|
||||
fill="none"
|
||||
style={`opacity: ${opacity}`}
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
>
|
||||
<!-- midrib -->
|
||||
<path d="M40 320 C 120 260 160 220 210 180 C 260 140 300 90 360 40" stroke="#5FB88A" stroke-width="2" stroke-linecap="round" opacity="0.7"></path>
|
||||
|
||||
<!-- branch veins -->
|
||||
<g stroke="#5FB88A" stroke-width="1.5" stroke-linecap="round" opacity="0.55">
|
||||
<path d="M90 288 Q 60 268 30 264"></path>
|
||||
<path d="M130 254 Q 150 220 140 190"></path>
|
||||
<path d="M180 210 Q 210 200 232 176"></path>
|
||||
<path d="M235 165 Q 250 130 240 100"></path>
|
||||
<path d="M285 118 Q 320 112 340 90"></path>
|
||||
<path d="M310 95 Q 300 65 312 40"></path>
|
||||
</g>
|
||||
|
||||
<!-- matcha nodes -->
|
||||
<g fill="#5FB88A">
|
||||
<circle cx="40" cy="320" r="5"></circle>
|
||||
<circle cx="30" cy="264" r="4"></circle>
|
||||
<circle cx="140" cy="190" r="4"></circle>
|
||||
<circle cx="232" cy="176" r="4"></circle>
|
||||
<circle cx="240" cy="100" r="4"></circle>
|
||||
<circle cx="340" cy="90" r="4"></circle>
|
||||
<circle cx="360" cy="40" r="5"></circle>
|
||||
</g>
|
||||
|
||||
<!-- the one violet node -->
|
||||
<circle cx="312" cy="40" r="6" fill="#7C6CF0"></circle>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.graph-motif {
|
||||
display: block;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,159 @@
|
||||
---
|
||||
import logoUrl from '../assets/logo.svg?url';
|
||||
|
||||
const navLinks = [
|
||||
{ label: 'Docs', href: 'https://docs.green-tea.dev', external: true },
|
||||
{ label: 'Blog', href: '/blog', external: false },
|
||||
{ label: 'GitHub', href: 'https://github.com/expressive-tea/green-tea', external: true },
|
||||
{ label: 'npm', href: 'https://www.npmjs.com/package/@expressive-tea/core', external: true },
|
||||
];
|
||||
---
|
||||
|
||||
<header class="site-header">
|
||||
<div class="wrap site-header__inner">
|
||||
<a class="wordmark" href="/" aria-label="Green Tea. — home">
|
||||
<img class="wordmark__logo" src={logoUrl} alt="" width="24" height="24" />
|
||||
<span class="wordmark__text">Green Tea<span class="wordmark__dot">.</span></span>
|
||||
</a>
|
||||
|
||||
<input type="checkbox" id="nav-toggle" class="nav-toggle" aria-hidden="true" />
|
||||
<label for="nav-toggle" class="nav-toggle__label" aria-label="Toggle navigation menu">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</label>
|
||||
|
||||
<nav class="site-nav" aria-label="Primary">
|
||||
<ul>
|
||||
{
|
||||
navLinks.map((link) => (
|
||||
<li>
|
||||
<a href={link.href} target={link.external ? '_blank' : undefined} rel={link.external ? 'noopener noreferrer' : undefined}>
|
||||
{link.label}
|
||||
</a>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<style>
|
||||
.site-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 40;
|
||||
background: color-mix(in srgb, var(--base) 88%, transparent);
|
||||
backdrop-filter: blur(8px);
|
||||
border-bottom: 1px solid color-mix(in srgb, var(--panel) 80%, var(--base));
|
||||
}
|
||||
|
||||
.site-header__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1.5rem;
|
||||
padding-block: 1rem;
|
||||
}
|
||||
|
||||
.wordmark {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.55rem;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.wordmark:hover,
|
||||
.wordmark:focus-visible {
|
||||
text-decoration: none;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.wordmark__logo {
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.wordmark__text {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 700;
|
||||
font-size: 1.15rem;
|
||||
color: var(--matcha);
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
.wordmark__dot {
|
||||
color: var(--violet);
|
||||
}
|
||||
|
||||
.site-nav ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.75rem;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.site-nav a {
|
||||
color: var(--dim);
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.site-nav a:hover,
|
||||
.site-nav a:focus-visible {
|
||||
color: var(--matcha);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nav-toggle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav-toggle__label {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nav-toggle__label span {
|
||||
display: block;
|
||||
height: 2px;
|
||||
background: var(--ink);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.nav-toggle__label {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.site-nav {
|
||||
display: none;
|
||||
width: 100%;
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.site-nav ul {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
padding-block: 1rem;
|
||||
}
|
||||
|
||||
.nav-toggle:checked ~ .site-nav {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-header__inner {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user