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

@@ -1,5 +1,5 @@
<figure>
{{- partial "function/image.html" (dict "src" .Destination "alt" .Text "title" .Title ) -}}
{{- partial "plugin/image.html" (dict "src" .Destination "alt" .Text "title" .Title ) -}}
{{- with .Title | default .Text -}}
<figcaption class="image-caption">
{{- . | safeHTML -}}

View File

@@ -1,3 +1,2 @@
<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>
{{- .Text | safeHTML -}}
</a>
{{- $options := dict "href" .Destination "title" .Title "content" .Text -}}
{{- partial "plugin/link.html" $options -}}