2019-08-22 20:01:22 +02:00
|
|
|
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
|
2019-08-04 15:53:35 +02:00
|
|
|
|
2019-02-03 12:30:44 +01:00
|
|
|
{{ define "content" }}
|
2019-08-24 13:32:41 +02:00
|
|
|
<div class="post-warp single">
|
|
|
|
<h1 class="post-title animated pulse faster">{{ .Title }}</h1>
|
2019-08-04 15:53:35 +02:00
|
|
|
<div class="post-content">
|
2019-08-25 20:25:56 +02:00
|
|
|
{{ $content := .Content }}
|
|
|
|
{{ $REin := `<img src="([^"]+)" alt="([^"]+)?" />` }}
|
|
|
|
{{ $REout := "<figure><img src=/images/loading.svg data-sizes=auto data-src=$1 alt=$2 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
|
|
|
|
{{ $content = replaceRE $REin $REout $content }}
|
|
|
|
{{ $REin = `<img src="([^"]+)" alt="([^"]+)?" title="([^"]+)?" />` }}
|
|
|
|
{{ $REout = "<figure><img src=/images/loading.svg data-src=$1 data-sizes=auto alt=$2 title=$3 class=lazyload><figcaption class=image-caption>$2</figcaption></figure>" }}
|
|
|
|
{{ $content = replaceRE $REin $REout $content }}
|
|
|
|
{{ $REin = `:\(([\w- ]+?)\):` }}
|
2019-08-26 19:15:00 +02:00
|
|
|
{{ $REout = `<i class="$1 fa-fw"></i>` }}
|
2019-08-25 20:25:56 +02:00
|
|
|
{{ $content = replaceRE $REin $REout $content }}
|
|
|
|
{{ $REin = `\[(.+?)\]\^\((.+?)\)` }}
|
|
|
|
{{ $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` }}
|
|
|
|
{{ $content = replaceRE $REin $REout $content }}
|
|
|
|
{{ $REin = `<sup>\[return\]</sup>` }}
|
|
|
|
{{ $REout = printf "<sup>[%s]</sup>" (T "return") }}
|
|
|
|
{{ $content = replaceRE $REin $REout $content }}
|
2019-09-29 09:56:11 +02:00
|
|
|
{{ $REin = `<(h[123456]) (id=".+?")>` }}
|
2019-08-25 20:25:56 +02:00
|
|
|
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
|
|
|
|
{{ $content = replaceRE $REin $REout $content }}
|
|
|
|
{{ $REin = `<(sup class="footnote-ref") (id="fnref:.+?")>` }}
|
|
|
|
{{ $REout = `<a class="post-dummy-target" $2></a><$1>` }}
|
|
|
|
{{ $content = replaceRE $REin $REout $content }}
|
|
|
|
{{ $REin = `<(li) (id="fn:.+?")>` }}
|
|
|
|
{{ $REout = `<$1><a class="post-dummy-target" $2></a>` }}
|
|
|
|
{{ $content = replaceRE $REin $REout $content }}
|
|
|
|
{{ $content | safeHTML }}
|
2019-08-04 15:53:35 +02:00
|
|
|
</div>
|
2019-02-03 12:30:44 +01:00
|
|
|
</div>
|
2019-08-22 20:01:22 +02:00
|
|
|
{{end }}
|