mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 19:06:16 +01:00
34 lines
No EOL
1.3 KiB
HTML
34 lines
No EOL
1.3 KiB
HTML
{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
|
|
|
|
{{- define "content" -}}
|
|
<div class="warpper single">
|
|
<h1 class="post-title animated pulse faster">
|
|
{{- .Title -}}
|
|
</h1>
|
|
<div class="post-content">
|
|
{{- $content := .Content -}}
|
|
|
|
{{- $REin := `:\(([\w- ]+?)\):` -}}
|
|
{{- $REout := `<i class="$1 fa-fw"></i>` -}}
|
|
{{- $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 -}}
|
|
|
|
{{- $REin = `<(h[23456]) (id=".+?")>` -}}
|
|
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
|
|
|
{{- $REin = `<(.+) (id="fnref:.+?")>` -}}
|
|
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
|
|
|
{{- $content | safeHTML -}}
|
|
</div>
|
|
</div>
|
|
{{- end -}} |