eaef3f8e84
Replace the narrow 720px column layout with a three-width breakout system: - Reading width (--width-prose, 720px): prose paragraphs, lists, blockquotes - Wide width (--width-code, 840px): code blocks, inline SVGs, figures, .wide/.breakout - Full width (--width-container, 1100px): hero diagrams, .full elements The outer container is wide; individual content blocks self-constrain via max-width + margin: auto. This creates the narrow-wide-narrow rhythm. Changes: - prose.css: Add .prose > * breakout pattern for three widths, SVG styling - BaseLayout.astro: Remove max-width from main (children handle their own widths) - [...slug].astro: Remove --width-prose constraint from .prose-wrapper - prose.css: Remove old left:50%/translateX(-50%) code block hack
98 lines
2.0 KiB
Plaintext
98 lines
2.0 KiB
Plaintext
---
|
|
import '../styles/tokens.css';
|
|
import '../styles/fonts.css';
|
|
|
|
interface Props {
|
|
title: string;
|
|
description?: string;
|
|
}
|
|
|
|
const { title, description } = Astro.props;
|
|
|
|
const siteTitle = title === 'Crash Test Dev' ? title : `${title} — Crash Test Dev`;
|
|
const base = import.meta.env.BASE_URL;
|
|
---
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
{description && <meta name="description" content={description} />}
|
|
<title>{siteTitle}</title>
|
|
<link rel="alternate" type="application/rss+xml" title="Crash Test Dev" href={`${base.replace(/\/?$/, '/')}rss.xml`} />
|
|
</head>
|
|
<body>
|
|
<a href="#main-content" class="skip-link">Skip to content</a>
|
|
<slot name="nav" />
|
|
<main id="main-content">
|
|
<slot />
|
|
</main>
|
|
</body>
|
|
</html>
|
|
|
|
<style is:global>
|
|
/* CSS Reset */
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html {
|
|
font-size: 100%;
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-prose);
|
|
font-size: var(--type-base);
|
|
line-height: var(--leading-prose);
|
|
color: var(--text-primary);
|
|
background-color: var(--surface-base);
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
a {
|
|
color: var(--accent-primary);
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration: underline;
|
|
color: var(--accent-primary-hover);
|
|
}
|
|
|
|
a:focus-visible {
|
|
outline: 2px solid var(--focus-ring);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.skip-link {
|
|
position: absolute;
|
|
top: -100%;
|
|
left: var(--space-1);
|
|
z-index: 100;
|
|
padding: var(--space-1) var(--space-2);
|
|
background: var(--surface-card);
|
|
font-family: var(--font-structure);
|
|
font-size: var(--type-sm);
|
|
}
|
|
|
|
.skip-link:focus {
|
|
top: var(--space-1);
|
|
}
|
|
|
|
main {
|
|
padding-left: var(--gutter);
|
|
padding-right: var(--gutter);
|
|
}
|
|
|
|
::selection {
|
|
background-color: var(--accent-primary);
|
|
color: var(--surface-card);
|
|
}
|
|
</style> |