chore(partials): refactor partials
This commit is contained in:
@@ -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 -}}
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
{{- /* Content */ -}}
|
||||
<div class="content">
|
||||
{{- partial "function/content.html" .Content -}}
|
||||
{{- partial "single/content.html" .Content -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{- with .Params.featuredImage -}}
|
||||
<div class="featured-image-preview">
|
||||
{{- $image := $.Params.featuredImagePreview | default . -}}
|
||||
{{- partial "function/image.html" (dict "src" $image "alt" "featured image") -}}
|
||||
{{- partial "plugin/image.html" (dict "src" $image "alt" "featured image") -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
{{- /* Summary content */ -}}
|
||||
<div class="content">
|
||||
{{- partial "function/content.html" .Summary -}}
|
||||
{{- partial "single/content.html" .Summary -}}
|
||||
</div>
|
||||
|
||||
{{- /* Footer */ -}}
|
||||
|
||||
Reference in New Issue
Block a user