1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-28 11:02:10 +00:00
seirdy.one/layouts/partials/posts.html

44 lines
2 KiB
HTML
Raw Normal View History

{{- $isStandalone := false -}}
{{- if and (ne .Permalink .Site.BaseURL) (ne .RelPermalink "/") -}}
{{- $isStandalone = true -}}
{{- end -}}
<section class="h-feed hfeed" itemscope itemtype="https://schema.org/{{ if $isStandalone }}Complete{{ end }}DataFeed">
{{- if $isStandalone }}
2022-04-17 19:48:33 +00:00
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
{{- else }}
2022-03-27 18:14:33 +00:00
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>
2022-05-02 04:33:51 +00:00
<p>Here&rsquo;s a selection of my best posts. To see the rest, visit <a href="/posts.html">my Posts page</a>.</p>
{{- end }}
2022-05-02 04:33:51 +00:00
<p>I edit some of these posts quite often; some are updated indefinitely. Check the &ldquo;updated&rdquo; timestamps.</p>
<p role="doc-tip">
Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite>
</p>
<ol class="unstyled-list" reversed>
{{- range where site.RegularPages "Type" "in" site.Params.mainSections -}}
{{- if or ($isStandalone) (.Params.featured) }}
<li>
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/BlogPosting https://schema.org/DataFeedItem">
{{ if $isStandalone -}}
2022-04-25 15:54:42 +00:00
<h2
{{- else -}}
2022-04-25 15:54:42 +00:00
<h3
{{- end }}
2022-04-25 15:54:42 +00:00
itemprop="name headline" class="p-name entry-title">
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
{{ .Title }}
</a>
{{ if $isStandalone -}}
2022-04-25 15:54:42 +00:00
</h2>
{{- else -}}
</h3>
{{- end }}
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>, updated
<time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
2022-03-08 06:44:45 +00:00
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
</article>
</li>
{{- end }}
2022-04-18 07:31:19 +00:00
{{- end }}
2022-04-05 04:40:36 +00:00
</ol>
2022-03-08 06:44:45 +00:00
</section>