feat: give the listing its own header and footer
It read as a page of green-tea's site, closing with a breadcrumb back to a parent. It is not one: it has its own review loop, its own contributors and its own deploy day, so it closes itself instead of handing the reader off. A sticky header with the wordmark "Green Tea. / plugins" — family name, then what this one is — and a footer with its own columns and colophon. Both are lifted from green-tea-site so the family is recognisable without this being a subpage of it. `.wrap` is horizontal padding only now. The header and footer share that container, so vertical rhythm belongs to each section rather than to the box they have in common. Also adds the "Add your plugin" section the nav points at, which is what the README described and the site never said out loud, and the favicon, which was missing entirely. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
7 files changed
+593
-47
No files matched your search
@@ -0,0 +1,206 @@
|
||||
---
|
||||
import logoUrl from '../assets/logo.svg?url';
|
||||
import Icon from './Icon.astro';
|
||||
|
||||
// This is its own site, not a page of green-tea's. The wordmark says so: the family name, then
|
||||
// what this one is. The logo links out to green-tea rather than to `/`, because a reader who
|
||||
// clicks a brand mark is asking for the project, and the project lives elsewhere.
|
||||
const navLinks = [
|
||||
{ label: 'Add your plugin', href: '#contribute', external: false },
|
||||
{ label: 'Docs', href: 'https://green-tea.expressive-tea.io/docs', external: true },
|
||||
{ label: 'green-tea', href: 'https://green-tea.expressive-tea.io', external: true },
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/Expressive-Tea/green-tea-marketplace',
|
||||
external: true,
|
||||
icon: 'github' as const,
|
||||
},
|
||||
];
|
||||
---
|
||||
|
||||
<header class="site-header">
|
||||
<div class="wrap site-header__inner">
|
||||
<a class="wordmark" href="/plugins" aria-label="Green Tea. plugins — home">
|
||||
<img class="wordmark__logo" src={logoUrl} alt="" width="24" height="24" />
|
||||
<span class="wordmark__text">Green Tea<span class="wordmark__dot">.</span></span>
|
||||
<span class="wordmark__sep" aria-hidden="true">/</span>
|
||||
<span class="wordmark__section">plugins</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}
|
||||
aria-label={link.icon ? link.label : undefined}
|
||||
class={link.icon ? 'site-nav__mark' : undefined}
|
||||
>
|
||||
{link.icon && <Icon name={link.icon} />}
|
||||
<span class={link.icon ? 'site-nav__mark-text' : undefined}>{link.label}</span>
|
||||
</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: baseline;
|
||||
gap: 0.5rem;
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wordmark__logo {
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
flex-shrink: 0;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
.wordmark__sep {
|
||||
color: var(--dim);
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.wordmark__section {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 500;
|
||||
font-size: 1.05rem;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.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;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site-nav a:hover,
|
||||
.site-nav a:focus-visible {
|
||||
color: var(--matcha);
|
||||
}
|
||||
|
||||
.site-nav__mark {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
/* The mark carries the meaning on desktop, where the row is short. The label stays in the DOM:
|
||||
it is the accessible name, and the collapsed menu shows it back. */
|
||||
.site-nav__mark-text {
|
||||
display: 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: 720px) {
|
||||
.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;
|
||||
}
|
||||
|
||||
.site-nav__mark-text {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.nav-toggle:checked ~ .site-nav {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.site-header__inner {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.wordmark__sep,
|
||||
.wordmark__section {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user