feat: new style and faster

This commit is contained in:
Dillon
2019-08-12 01:36:19 +08:00
parent a8bb44da3a
commit 9433736ede
75 changed files with 2330 additions and 4364 deletions

View File

@@ -0,0 +1,25 @@
{{ if .IsNamedParams }}
{{ if eq (.Get "details") "true" }}
<details class="admonition {{ .Get "type" }}">
{{ with .Get "title" }}<summary class="admonition-title">{{ . }}</summary>{{ end }}
{{ .Inner }}
</details>
{{ else }}
<div class="admonition {{ .Get "type" }}">
{{- with .Get "title" }}<p class="admonition-title">{{ . }}</p>{{ end }}
{{ .Inner }}
</div>
{{ end }}
{{ else }}
{{ if eq (.Get 2) "true" }}
<details class="admonition {{ .Get 0 }}">
{{- with .Get 1 }}<summary class="admonition-title">{{ . }}</summary>{{ end }}
{{ .Inner }}
</details>
{{ else }}
<div class="admonition {{ .Get 0 }}">
{{- with .Get 1 }}<p class="admonition-title">{{ . }}</p>{{ end }}
{{ .Inner }}
</div>
{{ end }}
{{ end }}