fix(srcatch): fix srcatch bugs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<figure>
|
||||
{{- $lightgallery := ne .Page.Site.Params.page.lightgallery false | and (ne .Page.Params.lightgallery false) -}}
|
||||
{{- partial "plugin/image.html" (dict "src" .Destination "title" .Title "description" .Text "lightgallery" $lightgallery "context" .Page) -}}
|
||||
{{- partial "plugin/image.html" (dict "src" .Destination "title" .Title "description" .Text "lightgallery" $lightgallery "scratch" (.Page.Scratch.Get "scratch")) -}}
|
||||
{{- with (.Title | default .Text) -}}
|
||||
<figcaption class="image-caption">
|
||||
{{- . | safeHTML -}}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<span> </span>
|
||||
</a>
|
||||
|
||||
{{- /* Load script */ -}}
|
||||
{{- partial "script.html" . -}}
|
||||
{{- /* Load JavaScript scripts and CSS */ -}}
|
||||
{{- partial "assets.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{{- $scratch := .Scratch.Get "scratch" -}}
|
||||
|
||||
<article class="single summary" itemscope itemtype="http://schema.org/Article">
|
||||
{{- /* Featured image */ -}}
|
||||
{{- with .Params.featuredImage -}}
|
||||
<div class="featured-image-preview">
|
||||
{{- $image := $.Params.featuredImagePreview | default . -}}
|
||||
{{- partial "plugin/image.html" (dict "src" $image "description" $.Description "context" $) -}}
|
||||
{{- partial "plugin/image.html" (dict "src" $image "description" $.Description "scratch" $scratch) -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user