chore(shortcode): make style shortcode toCSS outputStyle compressed

This commit is contained in:
Dillon 2020-05-15 17:48:03 +08:00
parent d3d2d751ec
commit c6733538dc
28 changed files with 10 additions and 25 deletions

View file

@ -6,6 +6,6 @@
{{- $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)) -}}
{{- $res = $res | toCSS (dict "targetPath" (printf "%s.css" $path) "outputStyle" "compressed") -}}
{{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}}
{{- $styleArr | append $res.Content | .Page.Scratch.SetInMap "this" "styleArr" -}}

View file

@ -1,4 +0,0 @@
#id-1 {
text-align: right; }
#id-1 strong {
color: #00b1ff; }

View file

@ -0,0 +1 @@
#id-1{text-align:right}#id-1 strong{color:#00b1ff}

View file

@ -1,4 +0,0 @@
#id-1 {
text-align: right; }
#id-1 strong {
color: #00b1ff; }

View file

@ -0,0 +1 @@
#id-1{text-align:right}#id-1 strong{color:#00b1ff}

View file

@ -1,4 +0,0 @@
#id-1 {
text-align: right; }
#id-1 strong {
color: #00b1ff; }

View file

@ -0,0 +1 @@
#id-1{text-align:right}#id-1 strong{color:#00b1ff}