Files
jcoffey-dev 56d6dbbfc3
ci / editor-ui (pull_request) Successful in 31s
ci / go (pull_request) Successful in 2m11s
Nine packs: the rest of the list
reviews (star ratings with the average, as a section or under a product,
which then gets AggregateRating), glossary (A to Z with a letter row, each
term linkable, DefinedTermSet), logo-wall (a still grid, muted logos become
light outlines in dark mode, white tiles on request), videos (a library from
your own files: page per video with captions and transcript, list, feed,
Latest videos section, VideoObject), directory (entries grouped by category
with a page each), link-in-bio (one page of big buttons, no menu),
status-page (components from data/status.yaml, incidents with a feed),
coming-soon (a holding page with a launch date and a form, no menu) and
timeline (dates down a line).

Template functions: sortBy, ratings and stars. formatDate takes a date with
a time, as front matter's date: does, and now is in the site's timezone.

A layout can leave out the site's menu by redefining nav, but only with a
non-empty body: Go keeps the old template when the new one is empty.
2026-10-14 13:40:50 -07:00

38 lines
1.5 KiB
HTML

{{/* section
label: Timeline
about: Dates down a line, with what happened at each.
fields:
- { name: heading, type: text }
- { name: intro, type: markdown }
- name: items
type: list
label: Moments
fields:
- { name: when, type: text, required: true, help: "As you'd write it: 2019, Spring 2021, 9:30am." }
- { name: title, type: text, required: true }
- { name: text, type: markdown }
- { name: image, type: image }
- { name: image_alt, type: text, label: What the picture shows }
- { name: from, type: data, label: Moments from, help: A file in data/ that holds the moments. Leave empty to use the ones above. }
*/}}
{{ $items := .Data.items }}{{ with .Data.from }}{{ $items = data . }}{{ end }}
<link rel="stylesheet" href="{{ asset "packs/timeline/timeline.css" }}">
<section class="block timeline">
<div class="wrap">
{{ with .Data.heading }}<h2>{{ . }}</h2>{{ end }}
{{ with .Data.intro }}<div class="intro">{{ markdownify . }}</div>{{ end }}
<ol class="tl-list">
{{ range $it := $items }}
<li class="tl-item">
<p class="tl-when">{{ .when }}</p>
<div class="tl-body">
<h3 class="tl-title">{{ .title }}</h3>
{{ with .text }}<div class="tl-text">{{ markdownify . }}</div>{{ end }}
{{ with .image }}<img class="tl-image" src="{{ . }}" alt="{{ default "" $it.image_alt }}" loading="lazy">{{ end }}
</div>
</li>
{{ end }}
</ol>
</div>
</section>