Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-05-28 12:05:37 +0300
committerGitHub <noreply@github.com>2020-05-28 12:05:37 +0300
commitaa48df5eddf17e220e1f2cfd84538399a14249d2 (patch)
treef14ce1b94f856bd99b369bcd4064e925ff9cdc8e /layouts/shortcodes/version.html
parent0c1f7d0ef82636e0e699fa7799f4dd5497ed1322 (diff)
feat(content): support complete local resource references (#388)
Diffstat (limited to 'layouts/shortcodes/version.html')
-rw-r--r--layouts/shortcodes/version.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/shortcodes/version.html b/layouts/shortcodes/version.html
index 9f372d0..904be2d 100644
--- a/layouts/shortcodes/version.html
+++ b/layouts/shortcodes/version.html
@@ -5,9 +5,9 @@
{{- $color := cond (eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}}
{{- $pathTemplate := cond .Site.IsMultiLingual (printf "svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
{{- $path := printf $pathTemplate $version $type -}}
-{{- $res := resources.Get "svg/version.template.svg" -}}
-{{- $res = $res | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
+{{- $resource := resources.Get "svg/version.template.svg" -}}
+{{- $resource = $resource | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
{{- $alt := printf "LoveIt %v | %v" $label $version -}}
<a href="{{ $url }}" rel="noopener noreffer" target="_blank">
- {{- dict "src" $res.RelPermalink "alt" $alt "class" "version" | partial "plugin/image.html" -}}
+ {{- dict "Src" $resource.RelPermalink "Alt" $alt "Class" "version" | partial "plugin/image.html" -}}
</a> \ No newline at end of file