Files
George Cushen ef8ed449c7 feat(hugo): replace deprecated APIs for Hugo v0.156+ compatibility
Migrate site.Data → hugo.Data (42 occurrences), site.IsMultiLingual →
hugo.IsMultilingual, and site.AllPages → hugo.Sites nested range.
Simplify Netlify redirects template to use pre-processed aliases
instead of relLangURL per gohugoio/hugo#14408.
2026-03-27 03:25:42 +00:00

32 lines
1.1 KiB
HTML

{{/*
HugoBlox Theme Engine: Demo Theme Styles
Generates CSS variables for ALL available theme packs.
Used for the "Theme Pack Chooser" demo feature.
*/}}
{{ $typography_config := .typography }}
{{ $layout_config := .layout }}
<style>
{{ range $pack_name, $pack_data := hugo.Data.themes }}
{{ if $pack_data.hugoblox }}
{{ $theme := $pack_data.hugoblox }}
{{/* Get light/dark mode data */}}
{{ $light_data := $theme.light | default $theme }}
{{ $dark_data := $theme.dark | default $theme }}
{{/* 1. Light Mode Variables */}}
[data-theme-pack="{{ $pack_name }}"] {
{{ partial "functions/theme_variables" (dict "data" $light_data "is_dark" false "typography" $typography_config "layout" $layout_config) | safeCSS }}
}
{{/* 2. Dark Mode Variables */}}
[data-theme-pack="{{ $pack_name }}"].dark,
.dark [data-theme-pack="{{ $pack_name }}"] {
{{ partial "functions/theme_variables" (dict "data" $dark_data "is_dark" true "typography" $typography_config "layout" $layout_config) | safeCSS }}
}
{{ end }}
{{ end }}
</style>