blob: ef4fe1103e74fabd9d023450f63ec28972c1f7f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<micro-card {{ if .Weight }}pinned{{ end }} id="{{ partial "card-id.html" . }}">
{{ if .ExpiryDate }}<micro-expires>{{ end }}
<micro-summary title="{{- partial "title.html" . -}}">
<micro-thumbnail>
{{ partial "profile-picture.html" . }}
</micro-thumbnail>
<micro-content>
<micro-metadata>
{{ partial "meta.html" . }}
</micro-metadata>
{{ if .Params.nsfw }}
<micro-nsfw>
<details>
<summary>
{{ safeHTML (readFile "static/icons/feather/alert-circle.svg") }}
<span>Danger: Unsafe Content. <b><u>Click here</u></b> to show/hide</span>
</summary>
</details>
<micro-nsfw-content>
{{ end }}
{{-
.Content |
replaceRE "<p>\n<figure>" "<figure>" |
replaceRE "</figure></p>" "</figure>" |
safeHTML
-}}
{{ if .Params.nsfw }}
</micro-nsfw-content>
</micro-nsfw>
{{ end }}
<micro-tags>{{ partial "tags.html" . }}</micro-tags>
</micro-content>
</micro-summary>
{{ if .ExpiryDate }}</micro-expires>{{ end }}
</micro-card>
|