blob: 61a2e32ee3688d8a0b092583d917aef91da55828 (
plain)
1
2
3
4
5
6
7
8
|
{{- $abbr := default "TL;DR:" (.Get "abbr" | default (.Get 0)) -}}
{{- $title := default "Too long, didn't read" (.Get "title" | default (.Get 1)) -}}
{{- $hash := print (truncate 4 "" (sha256 .Page.RelPermalink)) (truncate 4 "" (sha256 $abbr)) .Ordinal -}}
<input hidden="" type="checkbox" id="abbr-{{ $hash }}" />
{{- /* This comment removes trailing newlines and white spaces. */ -}}
<abbr title="{{ $title }}"><label for="abbr-{{ $hash }}">{{ $abbr | markdownify }}</label></abbr>
{{- /* This comment removes trailing newlines and white spaces. */ -}}
|