mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 16:14:05 +00:00
fix: load community block/widget styles
From `assets/scss/blocks/<unique-block-name>.scss`
This commit is contained in:
1 parent
931c901862
commit
3349024c90
3 files changed
+4
-4
No files matched your search
@@ -13,9 +13,9 @@
|
||||
<div class="container">
|
||||
{{/* Show the About widget if an account exists for this user. */}}
|
||||
{{ if .File }}
|
||||
{{ $widget := "widgets/about.html" }}
|
||||
{{ $widget := "blocks/about.html" }}
|
||||
{{ $username := (path.Base .File.Dir) }}{{/* Alternatively, use `index .Params.authors 0` */}}
|
||||
{{ $params := dict "root" $ "page" . "author" $username }}
|
||||
{{ $params := dict "wcPage" $ "wcBlock" . "author" $username }}
|
||||
{{ partial $widget $params }}
|
||||
{{end}}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
{{ $widget_class := printf "wg-%s" (replace (replace $block_type "." "-") "_" "-") }}
|
||||
|
||||
{{ $widget_config_file := printf "widgets/%s-config.html" $block_type }}
|
||||
{{ $widget_config_file := printf "blocks/%s-config.html" $block_type }}
|
||||
{{ if templates.Exists $widget_config_file }}
|
||||
{{ $cfg := partial $widget_config_file $widget_args }}
|
||||
{{ $use_container = $cfg.use_container }}
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
{{/* Load WC community block styles */}}
|
||||
{{ $wc_block_styles := resources.Match "scss/blocks/**.scss" }}
|
||||
{{ with $wc_block_styles }}
|
||||
{{ $wc_block_styles = $wc_block_styles | resources.Concat "css/wowchemy-blocks.css" }}
|
||||
{{ $wc_block_styles = $wc_block_styles | resources.Concat "css/wowchemy-blocks.scss" | resources.ToCSS }}
|
||||
{{- if eq (getenv "WC_POST_CSS") "true" -}}
|
||||
{{- $wc_block_styles = $wc_block_styles | postCSS -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in new issue
Block a user