mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 14:33:17 -10:00
- Heading icons: a heading's icon attribute ({icon="rocket"}) puts a pixel
icon before its text, through a heading render hook in place of Hextra's;
the anchor stays the text's. The home page's five section headings get
rocket, view-grid, shield, speech-balloon-question and prompt, lime at
24px (2px per icon pixel, as Departure Mono's at 22px).
- A 404 page (layouts/404.html) on the site's navbar and footer: a VM's
terminal (assets/home/not-found.svg) answering cd ./this-page with "no
such page" and the blink cursor, Hextra's search box, and links to
Getting started and the docs.
- Callouts: GitHub's > [!NOTE], [!TIP] and [!WARNING] alerts, drawn by a
blockquote alert render hook in the site's palette with
information-circled, a new light-bulb icon and warning; other types fail
the build. Used for keeping network policy on (Your first VM), Docker's
isolation (Docker), --unsafe-folder (Settings) and the VM boundary note
(Staying safe), each moving the existing text.
- Contributing > Writing docs: heading icons, callouts, the 404 page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
19 lines
833 B
HTML
19 lines
833 B
HTML
{{- /* Callouts: GitHub's alert syntax, a blockquote whose first line is [!NOTE], [!TIP] or [!WARNING], drawn
|
|
in the site's palette with a pixel icon. In place of Hextra's alerts. Other types fail the build. */ -}}
|
|
{{- $types := dict
|
|
"note" (dict "icon" "information-circled" "title" "Note")
|
|
"tip" (dict "icon" "light-bulb" "title" "Tip")
|
|
"warning" (dict "icon" "warning" "title" "Warning")
|
|
-}}
|
|
{{- $type := index $types .AlertType -}}
|
|
{{- if not $type -}}
|
|
{{- errorf "callout: %q isn't note, tip or warning (%s)" .AlertType .Position -}}
|
|
{{- end -}}
|
|
<div class="devvm-callout devvm-callout-{{ .AlertType }}">
|
|
<p class="devvm-callout-title">
|
|
{{- partial "icon.html" (dict "name" $type.icon "position" .Position) }} {{ or .AlertTitle $type.title -}}
|
|
</p>
|
|
{{- .Text -}}
|
|
</div>
|
|
{{- /* Drop trailing newlines */ -}}
|