feat: preload some stylesheets and rename some plugin partials

This commit is contained in:
Dillon
2022-05-14 02:28:35 +08:00
parent f4c7857f4f
commit a0c340316a
15 changed files with 76 additions and 45 deletions

View File

@@ -1,10 +1,10 @@
{{- if .Title -}}
<figure>
{{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
{{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" true "Resources" .Page.Resources | partial "plugin/img.html" -}}
<figcaption class="image-caption">
{{- .Title | safeHTML -}}
</figcaption>
</figure>
{{- else -}}
{{- dict "Src" .Destination "Title" .Text "Resources" .Page.Resources | partial "plugin/image.html" -}}
{{- dict "Src" .Destination "Title" .Text "Resources" .Page.Resources | partial "plugin/img.html" -}}
{{- end -}}

View File

@@ -3,4 +3,4 @@
{{- $destination = .RelPermalink -}}
{{- end -}}
{{- $options := dict "Destination" $destination "Title" .Title "Content" .Text -}}
{{- partial "plugin/link.html" $options -}}
{{- partial "plugin/a.html" $options -}}

View File

@@ -12,7 +12,7 @@
{{- with $image -}}
<div class="featured-image-preview">
<a href="{{ $.RelPermalink }}">
{{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}}
{{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/img.html" -}}
</a>
</div>
{{- end -}}
@@ -28,7 +28,7 @@
{{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
<span class="post-author">
{{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
{{- partial "plugin/link.html" $options -}}
{{- partial "plugin/a.html" $options -}}
</span>
{{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}