mirror of
https://github.com/idanoo/m2.nz
synced 2025-07-03 13:52:13 +00:00
Update theme (LoveIt) + Add new fields
This commit is contained in:
parent
ec90ebd36e
commit
49c98d8fb5
87 changed files with 6900 additions and 6013 deletions
7
themes/LoveIt/layouts/shortcodes/highlight.html
Normal file
7
themes/LoveIt/layouts/shortcodes/highlight.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{- $content := trim .InnerDeindent "\n\r" -}}
|
||||
{{- $lang := .Get 0 -}}
|
||||
{{- $options := "" -}}
|
||||
{{- if len .Params | eq 2 -}}
|
||||
{{- $options = .Get 1 -}}
|
||||
{{- end -}}
|
||||
{{- dict "Content" $content "Lang" $lang "Options" $options | partial "plugin/code-block.html" -}}
|
|
@ -3,7 +3,7 @@
|
|||
{{- $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/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
|
||||
{{- $pathTemplate := cond hugo.IsMultilingual (printf "svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}}
|
||||
{{- $path := printf $pathTemplate $version $type -}}
|
||||
{{- $resource := resources.Get "svg/version.template.svg" -}}
|
||||
{{- $resource = $resource | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue