mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-22 09:43:11 +01:00
I've created a simple mechanism to offer me instant feedback that you liked a post. A clap 👏 or a heart ❤️ appear at the bottom of every post, which uses val.town to keep track of current claps. I'm proud that it works well in both Javascript and non-Javascript worlds!
61 lines
2.5 KiB
HTML
61 lines
2.5 KiB
HTML
{{ define "main" }}
|
|
<main class="post instagram">
|
|
<article>
|
|
<h1 class="post-title p-name hidden" aria-hidden="true">{{ if gt (len .Params.Media) 1 }}Photos{{ else }}A photo{{ end }} from JP</h1>
|
|
|
|
{{ with .Summary }}
|
|
<div class="post-summary p-summary" aria-hidden="true">{{ . }}</div>
|
|
{{ end }}
|
|
|
|
<div class="post-content" data-pagefind-body data-pagefind-filter="type:Photos">
|
|
<div class="photo-media">
|
|
{{ range $i, $deets := .Params.Media }}
|
|
{{ partial "imgorvid.html" (dict "src" $deets.url "alt" ($deets.alt) "searchmeta" (eq $i 0)) }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ .Content }}
|
|
</div>
|
|
</article>
|
|
|
|
<hr />
|
|
|
|
<div class="post-info">
|
|
{{ partial "claps.html" (dict "url" .RelPermalink "style" "heart") }}
|
|
{{ if in .Params.tags "from-instagram" }}
|
|
<p>
|
|
{{ partial "svg.html" (dict "name" "instagram") }}
|
|
From <a href="/posts/archiving-instagram-posts/">instagram archive</a>
|
|
</p>
|
|
{{ else if in .Params.tags "from-facebook" }}
|
|
<p>
|
|
{{ partial "svg.html" (dict "name" "facebook") }}
|
|
From <a href="/notes/facebook/">facebook archive</a>
|
|
</p>
|
|
{{ end }}
|
|
{{ partial "tags.html" .Params.tags }}
|
|
{{ partial "categories.html" . }}
|
|
|
|
<p>
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar">
|
|
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
|
|
<line x1="16" y1="2" x2="16" y2="6"></line>
|
|
<line x1="8" y1="2" x2="8" y2="6"></line>
|
|
<line x1="3" y1="10" x2="21" y2="10"></line>
|
|
</svg>
|
|
<date datetime="{{ dateFormat .Site.Params.dateformHTML .Date }}" data-pagefind-sort="date">
|
|
{{ dateFormat .Site.Params.dateformNumTime .Date }}
|
|
</date>
|
|
</p>
|
|
|
|
{{ partial "interactions.html" . }}
|
|
</div>
|
|
|
|
<hr />
|
|
<div class="syndication">
|
|
{{ partial "syndication.html" . }}
|
|
</div>
|
|
{{ partial "pagination-single.html" . }}
|
|
|
|
</main>
|
|
{{ end }}
|