Files
plugins-marketplace/src/components/Header.astro
T
chrnx b26201ee06 feat: lead the home with an invitation to list a plugin
The home opened with a definition of a plugin and left 'Add your
plugin' for the end. It now says where to publish and how to be
listed, and the definition and review criteria move to CONTRIBUTING.
It also stops claiming automatic checks that do not run yet.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-24 09:57:03 -05:00

207 lines
4.7 KiB
Plaintext

---
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: '/plugins/#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>