Something went wrong. Try again.
Large file storage for AT Protocol: an IPFS server & gateway with XRPC upload & admin. atfs.dev
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105<script lang="ts"> // The mdsvex `layout` (svelte.config.js) — every compiled .md file under // web/src/routes/docs/ is wrapped in this, receiving its frontmatter as // ordinary props. Not to be confused with the SvelteKit route layout // (docs/+layout.svelte), which provides the sidebar/TOC/toggle chrome // around this one and knows nothing about frontmatter. import type { Snippet } from "svelte"; import TypeBadge from "./TypeBadge.svelte"; import type { DocType, DocRelevance } from "./nav";
let { title, type, objective = "", relevance = "common", children, }: { title: string; type: DocType; objective?: string; relevance?: DocRelevance; children: Snippet; } = $props();
const relevanceLabel: Record<Exclude<DocRelevance, "common">, string> = { "sd-card": "an SD-card device", docker: "Docker", };</script>
<svelte:head> <title>{title} · atfs docs</title> {#if objective} <meta name="description" content={objective} /> {/if}</svelte:head>
<article class="doc" data-pagefind-body> {#if type} <TypeBadge {type} /> {/if} <h1>{title}</h1> {#if objective} <p class="doc-objective">{objective}</p> {/if} {#if relevance !== "common"} <p class="platform-relevance-note" data-relevance={relevance}> This page only applies when you deploy to {relevanceLabel[relevance]}. </p> {:else if objective} <!-- Keeps the same vertical rhythm below the objective line on a "common" page as a platform-exclusive one gets from the note above — a page with no objective has nothing to divide from what follows, so it gets neither. DocMeta requires every page to set objective now, so in practice this is always true. --> <hr class="doc-divider" /> {/if} {@render children()}</article>
<style> .doc-objective { color: var(--text-dim); }
.doc-divider { border: none; border-top: 1px solid var(--border); margin: 0 0 1.5rem; }
.doc :global(h2) { font-size: 1.15rem; margin: 2.5rem 0 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.doc :global(h2:first-of-type) { border-top: none; padding-top: 0; }
/* Used for a reference page split into one section per item (e.g. Settings reference) rather than a table — narrow-viewport friendly, where a wide table just gets unreadable. */ .doc :global(h3) { font-size: 1rem; margin: 1.75rem 0 0.15rem; }
/* The "Default: ... — Applies to: ..." line straight after such a heading reads as metadata, not body prose. */ .doc :global(h3 + p) { margin-top: 0; margin-bottom: 0.5rem; font-size: 0.9em; color: var(--text-dim); }
.doc :global(p) { margin: 0 0 1rem; }</style>