2022-03-08 06:30:16 +00:00
|
|
|
{{ define "main" }}
|
|
|
|
<div class="h-feed hfeed" itemscope itemtype="https://schema.org/DataFeed">
|
2022-04-17 19:49:21 +00:00
|
|
|
<h1 id="bookmarks" class="p-name" itemprop="name headline">My book­marks</h1>
|
2022-03-08 06:30:16 +00:00
|
|
|
{{ .Content }}
|
2022-03-11 06:53:29 +00:00
|
|
|
<p><em>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></em></p>
|
2022-03-08 06:30:16 +00:00
|
|
|
<ul class="unstyled-list">
|
|
|
|
{{ $bookmarks := getJSON "https://seirdy.one/data/bookmarks.json" -}}
|
|
|
|
{{ range sort $bookmarks "tags" "desc" -}}
|
|
|
|
{{ $bookmark := . -}}
|
|
|
|
<li>
|
|
|
|
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/SocialMediaPosting https://schema.org/DataFeedItem">
|
|
|
|
<meta itemprop="headline" content="{{ $bookmark.title }}"> <!--Just because we can't have one headline refer to two items-->
|
2022-04-25 15:54:42 +00:00
|
|
|
<h2 itemprop="sharedContent" itemscope itemtype="https://schema.org/WebPage" class="p-name">
|
2022-03-08 06:30:16 +00:00
|
|
|
<a itemprop="url" href="{{ $bookmark.uri }}" class="u-bookmark-of h-cite">
|
2022-04-16 04:06:28 +00:00
|
|
|
<span itemprop="headline">{{ $bookmark.title | replaceRE `Defunctionalisation` `Defunction­alisation` | safeHTML }}</span>
|
2022-03-08 06:30:16 +00:00
|
|
|
</a>
|
2022-04-25 15:54:42 +00:00
|
|
|
</h2>
|
2022-03-08 06:30:16 +00:00
|
|
|
{{- $tags := split $bookmark.tags "," -}}
|
|
|
|
{{- $firstTag := index $tags 0 }}
|
|
|
|
{{- $timestamp := dateFormat "2006-01-02 15:04:05-0700" $firstTag }}
|
|
|
|
<p>
|
|
|
|
Bookmarked on: <time class="dt-published published" itemprop="datePublished" datetime="{{ dateFormat "2006-01-02 15:04:05Z07:00" $timestamp }}" title="{{ dateFormat "2006-01-02 15:04:05Z07:00" $timestamp }}">{{ dateFormat "2006-01-02 15:04" $timestamp }}</time>
|
|
|
|
<br>Tags: <span itemprop="keywords">
|
2022-03-16 23:42:29 +00:00
|
|
|
{{- $start := 2 -}}
|
|
|
|
{{- $firstTag := (index $tags 1) -}}
|
|
|
|
{{- if (eq $firstTag "public") -}}
|
|
|
|
{{- $firstTag = (index $tags 2) -}}
|
|
|
|
{{- $start = 3 -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- printf "<span class=\"p-category\">%s</span>" $firstTag | safeHTML -}}
|
|
|
|
{{- range after $start $tags -}}
|
2022-03-08 06:30:16 +00:00
|
|
|
{{- $tag := . -}}
|
|
|
|
{{- if (ne $tag "public") -}}
|
|
|
|
{{- printf ", <span class=\"p-category\">%s</span>" $tag | safeHTML -}}
|
|
|
|
{{ end -}}
|
|
|
|
{{- end }}
|
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<p class="e-summary entry-summary" itemprop="description">{{ markdownify $bookmark.description }}</p>
|
|
|
|
</article>
|
|
|
|
</li>
|
|
|
|
{{- end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|