diff --git a/modules/wowchemy/layouts/authors/list.html b/modules/wowchemy/layouts/authors/list.html index d842448d..07f7d82d 100644 --- a/modules/wowchemy/layouts/authors/list.html +++ b/modules/wowchemy/layouts/authors/list.html @@ -11,9 +11,10 @@
- {{/* Show the About widget if an account exists for this user. */}} + {{/* Show the About block if an account exists for this user. */}} + {{/* TODO: remove dependency on v1 blocks. Either migrate to v2 blocks(?) or directly implement layout here. */}} {{ if .File }} - {{ $widget := "blocks/about.html" }} + {{ $widget := "blocks/v1/about.html" }} {{ $username := (path.Base .File.Dir) }}{{/* Alternatively, use `index .Params.authors 0` */}} {{ $params := dict "wcPage" $ "wcBlock" . "author" $username }} {{ partial $widget $params }} diff --git a/modules/wowchemy/layouts/partials/functions/parse_block_v1.html b/modules/wowchemy/layouts/partials/functions/parse_block_v1.html index 4abfe7f0..bb365455 100644 --- a/modules/wowchemy/layouts/partials/functions/parse_block_v1.html +++ b/modules/wowchemy/layouts/partials/functions/parse_block_v1.html @@ -1,4 +1,4 @@ -{{/* Wowchemy Block Parser */}} +{{/* Wowchemy Block Parser v1 */}} {{/* Documentation: https://wowchemy.com/blocks/ */}} {{/* License: https://github.com/wowchemy/wowchemy-hugo-themes/blob/main/LICENSE.md */}} @@ -101,8 +101,8 @@ {{ $widget_class := printf "wg-%s" (replace (replace $block_type "." "-") "_" "-") }} -{{ $widget_config_file := printf "blocks/%s-config.html" $block_type }} -{{ if templates.Exists $widget_config_file }} +{{ $widget_config_file := printf "blocks/v1/%s-config.html" $block_type }} +{{ if templates.Exists (printf "partials/%s" $widget_config_file) }} {{ $cfg := partial $widget_config_file $widget_args }} {{ $use_container = $cfg.use_container }} {{end}} diff --git a/modules/wowchemy/layouts/partials/functions/parse_block_v2.html b/modules/wowchemy/layouts/partials/functions/parse_block_v2.html index 2f67597d..33958992 100644 --- a/modules/wowchemy/layouts/partials/functions/parse_block_v2.html +++ b/modules/wowchemy/layouts/partials/functions/parse_block_v2.html @@ -1,4 +1,4 @@ -{{/* Wowchemy Block Parser */}} +{{/* Wowchemy Block Parser v2 */}} {{/* Documentation: https://wowchemy.com/blocks/ */}} {{/* License: https://github.com/wowchemy/wowchemy-hugo-themes/blob/main/LICENSE.md */}} @@ -87,6 +87,8 @@ {{ $css_classes := $block.design.css_class | default $block.Params.advanced.css_class | default "" }} {{ $extra_attributes := "" }} {{ $use_container := true }} +{{ $columns := $block.design.columns | default "1" }} +{{ $use_cols := in (slice "collection" "experience" "accomplishments" "contact" "markdown" "tag_cloud" "portfolio") $block_type }} {{/* Special case: Slider widget. */}} {{ if in (slice "slider") $block_type }} @@ -98,14 +100,12 @@ {{ $widget_class := printf "wg-%s" (replace (replace $block_type "." "-") "_" "-") }} {{ $widget_config_file := printf "blocks/%s-config.html" $block_type }} -{{ if templates.Exists $widget_config_file }} +{{ if templates.Exists (printf "partials/%s" $widget_config_file) }} {{ $cfg := partial $widget_config_file $widget_args }} - {{ $use_container = $cfg.use_container }} + {{ with $cfg.use_container }}{{ $use_container = . }}{{ end }} + {{ with $cfg.inject_section_heading }}{{ $use_cols = . }}{{ end }} {{end}} -{{ $columns := $block.design.columns | default "2" }} -{{ $use_cols := in (slice "collection" "experience" "accomplishments" "contact" "markdown" "tag_cloud" "portfolio") $block_type }} - {{/* Dedicated child div for bg prevents parallax 100% height issue within new CSS grid page wrapper. */}}