feat(andamiaje): fase 1, tokens, fuentes, layouts, Header/Footer e Inicio
- BRIEF.md y CLAUDE.md como fuente de verdad y reglas del repositorio - Astro 7 estático con Tailwind 4; tokens en src/styles/tokens.css (claro/oscuro) - Fuentes propias en public/fonts (Fraunces, Instrument Sans, JetBrains Mono) - Layout Base con SEO y Open Graph; Header con menú accesible; Footer - Componentes Stat (cifra con método) y Video (fondo/captura/externo) - Colección cifras con esquema zod; esquemas de proyectos y equipo - Página de inicio; referencia/ con el borrador y los chats originales Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
commit
aa0fcc5691
40 files changed
+12854
No files matched your search
@@ -0,0 +1,127 @@
|
||||
---
|
||||
import { NAV, SITIO, esActual } from '../lib/sitio';
|
||||
const ruta = Astro.url.pathname;
|
||||
---
|
||||
|
||||
<header class="cabecera">
|
||||
<div class="wrap nav">
|
||||
<a class="marca" href="/" aria-label={`${SITIO.nombre}, inicio`}>Collina <small>Systems</small></a>
|
||||
<button class="burger" type="button" aria-expanded="false" aria-controls="menu" data-burger>Menú</button>
|
||||
<nav aria-label="Principal">
|
||||
<ul class="menu" id="menu" data-menu>
|
||||
{
|
||||
NAV.map((item) => (
|
||||
<li>
|
||||
<a href={item.href} aria-current={esActual(item.href, ruta) ? 'page' : undefined}>
|
||||
{item.texto}
|
||||
</a>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<style>
|
||||
.cabecera {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
background: var(--bg);
|
||||
border-bottom: 1px solid var(--line);
|
||||
padding-top: env(safe-area-inset-top, 0px);
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding-block: 0.9rem;
|
||||
position: relative;
|
||||
}
|
||||
.marca {
|
||||
font-family: var(--font-display);
|
||||
font-weight: 700;
|
||||
font-size: 1.3rem;
|
||||
letter-spacing: 0.02em;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 0.5rem;
|
||||
font-variation-settings: 'opsz' 48;
|
||||
}
|
||||
.marca small {
|
||||
font-family: var(--font-body);
|
||||
font-weight: 600;
|
||||
font-size: 0.62rem;
|
||||
letter-spacing: 0.2em;
|
||||
text-transform: uppercase;
|
||||
color: var(--fg-3);
|
||||
}
|
||||
.menu {
|
||||
display: flex;
|
||||
gap: 1.6rem;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.menu a[aria-current='page'] {
|
||||
color: var(--accent);
|
||||
box-shadow: inset 0 -2px 0 var(--accent);
|
||||
}
|
||||
.burger {
|
||||
display: none;
|
||||
background: none;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 4px;
|
||||
padding: 0.4rem 0.7rem;
|
||||
color: var(--fg);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
@media (max-width: 759px) {
|
||||
.menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 100%;
|
||||
background: var(--bg);
|
||||
border-bottom: 1px solid var(--line);
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
padding: 0.5rem var(--gutter-r) 0.5rem var(--gutter-l);
|
||||
}
|
||||
.menu.abierto {
|
||||
display: flex;
|
||||
}
|
||||
.menu li a {
|
||||
display: block;
|
||||
padding: 0.75rem 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
.burger {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
const boton = document.querySelector<HTMLButtonElement>('[data-burger]');
|
||||
const menu = document.querySelector<HTMLElement>('[data-menu]');
|
||||
if (boton && menu) {
|
||||
const fijar = (abierto: boolean) => {
|
||||
menu.classList.toggle('abierto', abierto);
|
||||
boton.setAttribute('aria-expanded', String(abierto));
|
||||
};
|
||||
boton.addEventListener('click', () => fijar(!menu.classList.contains('abierto')));
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && menu.classList.contains('abierto')) {
|
||||
fijar(false);
|
||||
boton.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user