mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 09:46: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!
32 lines
1.6 KiB
HTML
32 lines
1.6 KiB
HTML
<div class="post-info">
|
|
{{ partial "claps.html" (dict "url" .RelPermalink) }}
|
|
{{ partial "tags.html" .Params.tags }}
|
|
{{ partial "series-tags.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-file-text">
|
|
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
|
|
<polyline points="14 2 14 8 20 8"></polyline>
|
|
<line x1="16" y1="13" x2="8" y2="13"></line>
|
|
<line x1="16" y1="17" x2="8" y2="17"></line>
|
|
<polyline points="10 9 9 9 8 9"></polyline>
|
|
</svg>
|
|
{{ i18n "wordCount" .Page.WordCount }}
|
|
</p>
|
|
|
|
<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 "2006-01-02T15:04:05-0700" .Lastmod }}" class="dt-updated" title="last updated on {{ dateFormat "Monday Jan 2 2006 at 03:04 MST" .Lastmod }}" data-pagefind-sort="date">
|
|
{{ if .Site.Params.dateformNumTime }}
|
|
{{ dateFormat .Site.Params.dateformNumTime .Lastmod }}
|
|
{{ else }}
|
|
{{ dateFormat "2006-01-02 15:04" .Lastmod }}
|
|
{{ end }}
|
|
</date>
|
|
</p>
|
|
</div>
|
|
<hr />
|