mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
ff0c7deafa
Link targets need to be focusable to work with VoiceOver. Making <main> focusable causes some side-effects, like making the TAB key go to the beginning of <main> instead of the element after the currently-clicked region. Also removes the annoying outline around "main" in some non-mainstream browsers, without having to add extra CSS.
37 lines
2 KiB
HTML
37 lines
2 KiB
HTML
{{ define "main" -}}
|
|
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
|
<main>
|
|
{{- $articleTag := printf `<article class="h-entry hentry" itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Article" itemid="%s%s">` .Site.Params.CanonicalBaseURL $canonicalRelPermalink -}}
|
|
{{ partial "full-article.html" . | replaceRE `<article class="h-entry hentry">` $articleTag | safeHTML }}
|
|
<hr />
|
|
<section itemprop="hasPart" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed">
|
|
<h2>More about this site</h2>
|
|
<p role="doc-tip">
|
|
Timestamp format: <code>YYYY-MM-DD HH:MM</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite>. Sorted newest to oldest.
|
|
</p>
|
|
<ol>
|
|
{{- $pages := (where site.RegularPages "Section" .Section) -}}
|
|
{{- range $pages -}}
|
|
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
|
|
<li itemprop="dataFeedElement" itemscope="" itemtype="https://schema.org/DataFeedItem">
|
|
<article class="h-entry hentry" itemprop="item" itemscope="" itemtype="https://schema.org/Article" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
|
|
<h3 itemprop="name headline" class="p-name entry-title">
|
|
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
|
{{ .Title }}
|
|
</a>
|
|
</h3>
|
|
<p>
|
|
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02 15:04" }}</time>
|
|
{{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}}
|
|
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04" }}</time>
|
|
{{- end }}
|
|
</p>
|
|
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
|
<p>{{- partial "wordcount.html" . -}}</p>
|
|
</article>
|
|
</li>
|
|
{{- end }}
|
|
</ol>
|
|
</section>
|
|
</main>
|
|
{{ end }}
|