chore(partials): refactor partials

This commit is contained in:
Dillon
2020-02-21 23:42:35 +08:00
parent 611518ddd1
commit 4e6fe224cc
27 changed files with 554 additions and 534 deletions

View File

@@ -0,0 +1,9 @@
{{- $href := index . "href" -}}
<a href="{{ $href | safeURL }}"{{ with index . "title" }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix $href "http" }} target="_blank"{{ end }} rel="noopener noreffer{{ with index . `rel` }} {{ . }}{{ end }}">
{{- with index . "icon" -}}
{{- partial "plugin/icon.html" . -}}
{{- end -}}
{{- with index . "content" -}}
{{- . | safeHTML -}}
{{- end -}}
</a>