diff options
author | Dillon <dillonzq@outlook.com> | 2020-02-21 18:42:35 +0300 |
---|---|---|
committer | Dillon <dillonzq@outlook.com> | 2020-02-21 18:42:35 +0300 |
commit | 4e6fe224cc1934aa0459b2d888f243463bb998f7 (patch) | |
tree | 7f4a04449ba1ca8ee8b5cdf466c18a04868a3bcf /layouts/_default/_markup | |
parent | 611518ddd17e736ee5dc246ec13b203950765934 (diff) |
chore(partials): refactor partials
Diffstat (limited to 'layouts/_default/_markup')
-rw-r--r-- | layouts/_default/_markup/render-image.html | 2 | ||||
-rw-r--r-- | layouts/_default/_markup/render-link.html | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index b448d20..5f27a8c 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -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 -}} diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index c7382c0..35e77e8 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -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 -}} |