the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
@@ -0,0 +1,77 @@
|
||||
---
|
||||
const pages = [
|
||||
{ href: "/", label: "Home" },
|
||||
{ href: "/about", label: "About" },
|
||||
];
|
||||
// Markdown pages hand their frontmatter to the layout as `frontmatter`.
|
||||
const { title } = Astro.props.frontmatter ?? Astro.props;
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{title}</title>
|
||||
<style is:global>
|
||||
:root {
|
||||
--ink: #1f2937;
|
||||
--muted: #6b7280;
|
||||
--accent: #4f46e5;
|
||||
--line: #e5e7eb;
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
||||
color: var(--ink);
|
||||
line-height: 1.65;
|
||||
}
|
||||
nav {
|
||||
display: flex;
|
||||
gap: 1.25rem;
|
||||
align-items: center;
|
||||
padding: 0.9rem 2rem;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
nav .brand { font-weight: 700; margin-right: auto; }
|
||||
nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
|
||||
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
|
||||
main { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
|
||||
main :is(h1, h2, h3) { line-height: 1.25; }
|
||||
main h1 { font-size: 2.1rem; margin: 0 0 1.25rem; }
|
||||
main h2 { font-size: 1.45rem; margin-top: 2.25rem; }
|
||||
main img { max-width: 100%; height: auto; border-radius: 0.5rem; }
|
||||
main blockquote {
|
||||
margin: 1.5rem 0;
|
||||
padding: 0.5rem 1.25rem;
|
||||
border-left: 3px solid var(--accent);
|
||||
color: var(--muted);
|
||||
}
|
||||
main ul, main ol { padding-inline-start: 1.5rem; }
|
||||
footer {
|
||||
border-top: 1px solid var(--line);
|
||||
color: var(--muted);
|
||||
font-size: 0.85rem;
|
||||
padding: 1.25rem 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<span class="brand">{title}</span>
|
||||
{pages.map((p) => (
|
||||
<a href={p.href} aria-current={Astro.url.pathname === p.href ? "page" : undefined}>
|
||||
{p.label}
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
<footer>
|
||||
This page is editable in the browser at
|
||||
<a href="/admin/">/admin/</a> — no git knowledge required.
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: ../layouts/Site.astro
|
||||
title: About
|
||||
---
|
||||
<h1>About this site</h1>
|
||||
<p>A static <a href="https://astro.build">Astro</a> site whose content is edited by a <a href="/admin/">browser-based visual editor</a>, with <strong>no git knowledge needed</strong>.</p>
|
||||
<blockquote>
|
||||
Behind every save is a normal git commit in an auditable repository on this server — editors never see that part.
|
||||
</blockquote>
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
layout: ../layouts/Site.astro
|
||||
title: Home
|
||||
---
|
||||
<h1>Welcome</h1>
|
||||
<p><strong>An editable static site.</strong> This page is a plain astro page — everything below this line is written by a <em>non-technical person in a browser</em> at <a href="/admin/">/admin/</a> and committed to the site's git repository behind the scenes.</p>
|
||||
Reference in new issue
Block a user