mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
fix(shortcode): style shortcode scss file path (#327)
This commit is contained in:
parent
9bb56fd87f
commit
f4c9fe750d
21 changed files with 35 additions and 4 deletions
|
@ -10,7 +10,7 @@
|
|||
{{- end -}}
|
||||
|
||||
{{- $params := .Params | merge .Site.Params.page -}}
|
||||
{{- .Scratch.Set "version" "0.2.5" -}}
|
||||
{{- .Scratch.Set "version" "0.2.6" -}}
|
||||
|
||||
{{- if eq hugo.Environment "production" -}}
|
||||
{{- .Scratch.Set "cdn" .Site.Params.cdn -}}
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
{{- printf `<%s id="%s">%s</%s>` $tag $id $content $tag | safeHTML -}}
|
||||
|
||||
{{- $style := .Get 0 | printf "#%s{%s}" $id -}}
|
||||
{{- $res := resources.FromString (printf "stype/%s.scss" $id) $style -}}
|
||||
{{- $res = $res | toCSS (dict "targetPath" (printf "stype/%s.css" $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)) -}}
|
||||
{{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}}
|
||||
{{- $styleArr | append $res.Content | .Page.Scratch.SetInMap "this" "styleArr" -}}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/06219b515bd3039bce88e4417e803b29/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -0,0 +1,2 @@
|
|||
#id-1 img {
|
||||
height: 1.25rem; }
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -0,0 +1,2 @@
|
|||
#id-1 {
|
||||
text-align: right; }
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/2f6a44c07cd36aed63db163b9f515d63/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -0,0 +1,2 @@
|
|||
#id-1 {
|
||||
text-align: right; }
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/387e497be0b7dbdc903468dec88ce042/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -0,0 +1,4 @@
|
|||
#id-1 {
|
||||
text-align: right; }
|
||||
#id-1 strong {
|
||||
color: #00b1ff; }
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/409594da26069e6252388311312abfd5/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -0,0 +1,4 @@
|
|||
#id-1 {
|
||||
text-align: right; }
|
||||
#id-1 strong {
|
||||
color: #00b1ff; }
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/7857d7858fcfb859deeb60f29672cffc/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -0,0 +1,2 @@
|
|||
#id-1 {
|
||||
text-align: right; }
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -0,0 +1,2 @@
|
|||
#id-1 img {
|
||||
height: 1.25rem; }
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -0,0 +1,4 @@
|
|||
#id-1 {
|
||||
text-align: right; }
|
||||
#id-1 strong {
|
||||
color: #00b1ff; }
|
|
@ -0,0 +1 @@
|
|||
{"Target":"style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.css","MediaType":"text/css","Data":{}}
|
|
@ -1 +0,0 @@
|
|||
{"Target":"stype/id-1.css","MediaType":"text/css","Data":{}}
|
Loading…
Reference in a new issue