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-18 11:10:24 +0300
committerGitHub <noreply@github.com>2020-05-18 11:10:24 +0300
commit9c1244490f0f5596db9b6df933041af9c727dc5b (patch)
tree57c4af8cb68299ba371738b7946a22fb15d97d33 /layouts/shortcodes
parent36f59a72ee4c186cc525b67da6813498f43a711c (diff)
i18n: update i18n string format (#371)
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/style.html10
-rw-r--r--layouts/shortcodes/typeit.html2
-rw-r--r--layouts/shortcodes/version.html6
3 files changed, 9 insertions, 9 deletions
diff --git a/layouts/shortcodes/style.html b/layouts/shortcodes/style.html
index 9ac9936..b1b3f8d 100644
--- a/layouts/shortcodes/style.html
+++ b/layouts/shortcodes/style.html
@@ -1,11 +1,11 @@
{{- $content := .Inner | .Page.RenderString -}}
{{- $id := dict "scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $tag := .Get 1 | default "div" -}}
-{{- printf `<%s id="%s">%s</%s>` $tag $id $content $tag | safeHTML -}}
+{{- printf `<%v id="%v">%v</%v>` $tag $id $content $tag | safeHTML -}}
-{{- $style := .Get 0 | printf "#%s{%s}" $id -}}
-{{- $path := printf "style/%s/%s" (md5 .Page.RelPermalink) $id -}}
-{{- $res := resources.FromString (printf "%s.scss" $path) $style -}}
-{{- $res = $res | toCSS (dict "targetPath" (printf "%s.css" $path) "outputStyle" "compressed") -}}
+{{- $style := .Get 0 | printf "#%v{%v}" $id -}}
+{{- $path := printf "style/%v/%v" (md5 .Page.RelPermalink) $id -}}
+{{- $res := resources.FromString (printf "%v.scss" $path) $style -}}
+{{- $res = $res | toCSS (dict "targetPath" (printf "%v.css" $path) "outputStyle" "compressed") -}}
{{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}}
{{- $styleArr | append $res.Content | .Page.Scratch.SetInMap "this" "styleArr" -}}
diff --git a/layouts/shortcodes/typeit.html b/layouts/shortcodes/typeit.html
index b295f83..a3d7da5 100644
--- a/layouts/shortcodes/typeit.html
+++ b/layouts/shortcodes/typeit.html
@@ -27,5 +27,5 @@
{{- dict $key $group | merge $typeitMap | .Page.Scratch.SetInMap "this" "typeitMap" -}}
<div class="typeit">
- {{- printf `<%s id="%s" class="%s"></%s>` $tag $id (delimit $classList " ") $tag | safeHTML -}}
+ {{- printf `<%v id="%v" class="%v"></%v>` $tag $id (delimit $classList " ") $tag | safeHTML -}}
</div>
diff --git a/layouts/shortcodes/version.html b/layouts/shortcodes/version.html
index fbe0f61..9f372d0 100644
--- a/layouts/shortcodes/version.html
+++ b/layouts/shortcodes/version.html
@@ -1,13 +1,13 @@
{{- $version := .Get 0 -}}
-{{- $url := printf "https://github.com/dillonzq/LoveIt/releases/tag/v%s" $version -}}
+{{- $url := printf "https://github.com/dillonzq/LoveIt/releases/tag/v%v" $version -}}
{{- $type := .Get 1 | default "new" | lower -}}
{{- $label := T $type -}}
{{- $color := cond (eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}}
-{{- $pathTemplate := cond .Site.IsMultiLingual (printf "svg/version/%%s-%%s.%s.svg" .Page.Language.Lang) "svg/version/%s-%s.svg" -}}
+{{- $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 -}}
-{{- $alt := printf "LoveIt %s | %s" $label $version -}}
+{{- $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" -}}
</a> \ No newline at end of file