63 lines
No EOL
2.3 KiB
HTML
63 lines
No EOL
2.3 KiB
HTML
{{ define "body" }}
|
|
<body class="layout-_default-list">
|
|
<main class="h-feed hfeed" id="main">
|
|
{{ "<!-- the main header contains list metadata -->" | safeHTML }}
|
|
<header class="list-header section">
|
|
<div class="container">
|
|
<h1 class="list-title p-name">{{.Title}}</h1>
|
|
{{ with .Summary }}<p class="list-summary p-summary">{{ . }}</p>{{ end }}
|
|
{{- with (index .Site.Data.people "trwnh.com").a }}{{/* TODO: make author a variable instead of assuming it's always me */}}
|
|
<p class="list-author p-author">
|
|
{{- partial "mf2/h-card.html" . }}
|
|
</p>
|
|
{{ end -}}{{/* end with author h-card */ -}}
|
|
<div class="list-content e-content hugo-content">
|
|
{{- .Content }}
|
|
</div>
|
|
<p class="list-permalink">h-feed URL: <a href="{{.Permalink}}" rel="self" class="u-url">{{.Permalink}}</a></p>
|
|
</div>
|
|
<hr>
|
|
</header>
|
|
{{ "<!-- list the pages in this section/taxonomy/term/etc -->" | safeHTML }}
|
|
<section class="list-pages section">
|
|
<div class="container">
|
|
<ol class="pages-list">
|
|
{{- range .Pages }}
|
|
{{- if .Title }}{{/* indieweb post kind is probably article */}}
|
|
<li class="pages-list__item">
|
|
<article class="h-entry hentry">
|
|
<header style="display: contents">
|
|
<span><time class="dt-published published" datetime="{{.Date.Format "2006-01-02T15:04:05Z"}}">{{.Date.Format "2006-01-02"}}</time>: <a class="u-url url" href="{{.Permalink}}"><h2 class="p-name entry-title">{{.Title}}</h2></a></span>
|
|
{{- if isset .Params "summary" }}{{/* only use explicitly-set summaries, not auto-generated ones */ -}}
|
|
<br>
|
|
<span class="p-summary entry-summary">{{.Summary}}</span>
|
|
{{- end }}{{/* end if isset .Params "summary" */ -}}
|
|
</header>
|
|
</article>
|
|
</li>
|
|
{{- else }}{{/* indieweb post kind is probably note */}}
|
|
<li class="pages-list__item">
|
|
<article class="h-entry hentry">
|
|
<header>
|
|
<p><span><time class="dt-published published" datetime="{{.Date.Format "2006-01-02T15:04:05Z"}}">{{.Date.Format "2006-01-02"}}</time>: <a href="{{.Permalink}}">untitled post</a></span></p>
|
|
</header>
|
|
|
|
<section class="p-content entry-content">
|
|
<p>
|
|
{{- .Summary }}
|
|
</p>
|
|
</section>
|
|
|
|
<footer>
|
|
<a href="{{.Permalink}}">Read more</a>{{/* then we need a read-more link. */ -}}
|
|
</footer>
|
|
</article>
|
|
</li>
|
|
{{- end }}{{/* end if-title post type check */ -}}
|
|
{{- end }}{{/* end range over pages */ -}}
|
|
</ol>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
{{ end }}{{/* end define-body */ -}} |