mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 14:14:48 +00:00
27 lines
1.4 KiB
HTML
27 lines
1.4 KiB
HTML
{{/* HugoBlox Theme Helper to output CSS variables for a specific theme block */}}
|
|
{{ $data := .data }}
|
|
|
|
{{/* 1. Palette Generation (Primary/Secondary Scales) */}}
|
|
{{ $primary := $data.colors.primary | default "#3b82f6" }}
|
|
{{ $secondary := $data.colors.secondary | default "#10b981" }}
|
|
|
|
{{ partial "functions/generate_color_scale" (dict "name" "primary" "color" $primary) }}
|
|
{{ partial "functions/generate_color_scale" (dict "name" "secondary" "color" $secondary) }}
|
|
|
|
{{ if $data.colors.neutral }}
|
|
{{/* Map user 'neutral' to Tailwind 'gray' utility to override text-gray-* classes */}}
|
|
{{ partial "functions/generate_color_scale" (dict "name" "gray" "color" $data.colors.neutral) }}
|
|
{{ end }}
|
|
|
|
{{/* 2. Semantic Surface Variables */}}
|
|
--hb-color-background: {{ $data.surfaces.background | default "#ffffff" }};
|
|
--hb-color-foreground: {{ $data.surfaces.foreground | default "#000000" }};
|
|
|
|
{{/* Header */}}
|
|
--hb-color-header-bg: {{ $data.surfaces.header.background | default $data.surfaces.background | default "#ffffff" }};
|
|
--hb-color-header-fg: {{ $data.surfaces.header.foreground | default $data.surfaces.foreground | default "#000000" }};
|
|
|
|
{{/* Footer */}}
|
|
--hb-color-footer-bg: {{ $data.surfaces.footer.background | default $data.surfaces.background | default "#f3f4f6" }};
|
|
--hb-color-footer-fg: {{ $data.surfaces.footer.foreground | default $data.surfaces.foreground | default "#000000" }};
|