trwnh.com/unified.test.hugo/layouts/_default/list.html
2024-10-12 13:45:14 -05:00

60 lines
No EOL
2.1 KiB
HTML

{{ define "body" }}
<body class="layout-_default-list">
<main class="h-feed hfeed" id="main">
<header class="list-header section">
<div class="container">
<h1 class="list-title p-name">{{.Title}}</h1>
{{ with (index .Site.Data.people "trwnh.com").a }}
<p class="list-author p-author">{{ partial "mf2/h-card.html" . }}</p>
{{ end }}
<p class="list-summary p-summary">{{ .Summary }}</p>
<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>
<section class="list-pages section">
<div class="container">
<ol class="list-of-pages-in-section">
{{ range .RegularPages }}
{{ if .Title }}
{{/* indieweb post kind is article */}}
<li class="list-of-pages-in-section__item">
<article class="h-entry hentry">
<p>
<span><time class="dt-published published" datetime="{{.Date.Format "2006-01-02T15:04:05Z"}}">{{.Date.Format "2006-01-02"}}</time>: <a class="p-name entry-title" href="{{.Permalink}}">{{.Title}}</a></span><br>
{{ if isset .Params "summary" }}
<span class="p-summary entry-summary">{{.Summary}}</span>
{{ end }}
</p>
</article>
</li>
{{ else }}
{{/* indieweb post kind is probably note */}}
<li class="list-of-pages-in-section__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}}">[link]</a></span></p>
</header>
<section class="p-content entry-content">
<p>
{{ .Content | strings.Truncate 1000 }}
</p>
</section>
{{ if not (eq .Content (.Content | strings.Truncate 1000)) }}
<footer>
<a href="{{.Permalink}}">Read more</a>
</footer>
{{ end }}
</article>
</li>
{{ end }}
{{ end }}
</ol>
</div>
</section>
</main>
</body>
{{ end }}