Fragment shortcode + session log template (garden#6)
New shortcode: {{< fragment type="dialogue" label="..." >}}...{{< /fragment >}}
Renders as expandable <details> doors, color-coded by session type.
Full CSS for fragments in garden.css: dot, door label, session ID,
tinted background on open.
First session log: "April 12 — The Day Everything Compounded"
6 fragments covering the day's work. The context.html format
made reusable as a Hugo writing pattern.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1fff255420
commit
7ab1eb8933
21 changed files with 549 additions and 50 deletions
14
layouts/shortcodes/fragment.html
Normal file
14
layouts/shortcodes/fragment.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{{- $type := .Get "type" | default "dialogue" -}}
|
||||
{{- $session := .Get "session" | default "" -}}
|
||||
{{- $label := .Get "label" | default "" -}}
|
||||
{{- $open := .Get "open" | default false -}}
|
||||
<details class="fragment" data-type="{{ $type }}"{{ with $session }} data-session="{{ . }}"{{ end }}{{ if $open }} open{{ end }}>
|
||||
<summary>
|
||||
<span class="dot"></span>
|
||||
<span class="door">{{ $label }}</span>
|
||||
{{ with $session }}<span class="session-id">S{{ . }}</span>{{ end }}
|
||||
</summary>
|
||||
<div class="fragment-content">
|
||||
{{ .Inner | markdownify }}
|
||||
</div>
|
||||
</details>
|
||||
Loading…
Add table
Add a link
Reference in a new issue