mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
d97481f381
- Make webring links touch-friendly and accessible by using spaced-out details elements. - Make details elements touch-friendly by indicating interactive region area and making summary padded. - Sort featured posts by featured order. - Ensure that at least one non-interactive tappable region exists on the screen at all times, 48x48 px.
51 lines
2.2 KiB
HTML
51 lines
2.2 KiB
HTML
{{- $isStandalone := false -}}
|
|
{{- if and (ne .Permalink .Site.BaseURL) (ne .RelPermalink "/") -}}
|
|
{{- $isStandalone = true -}}
|
|
{{- end -}}
|
|
{{- if $isStandalone }}
|
|
<main itemprop="mainEntity" class="h-feed hfeed" itemscope itemtype="https://schema.org/CompleteDataFeed">
|
|
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
|
|
<p>These are all of my posts, sorted by date (newest first).</p>
|
|
{{- else }}
|
|
<section class="h-feed hfeed" itemscope itemtype="https://schema.org/DataFeed">
|
|
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>
|
|
<p>Here’s a selection of my best posts, in featured order. To see the rest, visit <a href="/posts.html">my Posts page</a>.</p>
|
|
{{- end }}
|
|
<p>I edit some of these posts quite often; some are updated indefinitely. Check the “updated” 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>
|
|
{{- $posts := (where site.RegularPages "Type" "in" site.Params.mainSections) -}}
|
|
{{- if not $isStandalone -}}
|
|
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
|
|
{{- end -}}
|
|
{{- range $posts -}}
|
|
<li>
|
|
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/BlogPosting https://schema.org/DataFeedItem">
|
|
{{ if $isStandalone -}}
|
|
<h2
|
|
{{- else -}}
|
|
<h3
|
|
{{- end }}
|
|
itemprop="name headline" class="p-name entry-title">
|
|
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
|
{{ .Title }}
|
|
</a>
|
|
{{ if $isStandalone -}}
|
|
</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>
|
|
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
|
|
</article>
|
|
</li>
|
|
{{- end }}
|
|
</ol>
|
|
{{ if $isStandalone -}}
|
|
</main>
|
|
{{ else -}}
|
|
</section>
|
|
{{ end }}
|