feat: add footer rendering and custom-html sidebar widget

- Homepage builder now renders footer section below main content
- Sidebar supports custom-html widget type with title + content
- New homepage-footer.njk component for footer items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ricardo
2026-02-09 10:10:16 +01:00
parent 2ea75e567d
commit 610f81f8fe
3 changed files with 39 additions and 0 deletions

View File

@@ -81,3 +81,6 @@
</div>
{% endif %}
{# Footer — rendered after the main layout, full width #}
{% include "components/homepage-footer.njk" %}

View File

@@ -0,0 +1,23 @@
{# Homepage Builder Footer — renders footer items from homepageConfig.footer #}
{% if homepageConfig.footer and homepageConfig.footer.length %}
<footer class="homepage-footer mt-8 sm:mt-12 pt-6 sm:pt-8 border-t border-surface-200 dark:border-surface-700">
{% for section in homepageConfig.footer %}
{% if section.type == "custom-html" %}
{% set sectionConfig = section.config or {} %}
<div class="mb-6">
{% if sectionConfig.title %}
<h3 class="text-lg font-semibold text-surface-900 dark:text-surface-100 mb-3">{{ sectionConfig.title }}</h3>
{% endif %}
{% if sectionConfig.content %}
<div class="prose dark:prose-invert max-w-none">
{{ sectionConfig.content | safe }}
</div>
{% endif %}
</div>
{% else %}
{# For non-custom sections, use the section dispatcher #}
{% include "components/homepage-section.njk" %}
{% endif %}
{% endfor %}
</footer>
{% endif %}

View File

@@ -28,6 +28,19 @@
});
</script>
</div>
{% elif widget.type == "custom-html" %}
{# Custom content widget #}
{% set wConfig = widget.config or {} %}
<div class="sidebar-widget">
{% if wConfig.title %}
<h3 class="text-sm font-semibold text-surface-600 dark:text-surface-400 uppercase tracking-wide mb-3">{{ wConfig.title }}</h3>
{% endif %}
{% if wConfig.content %}
<div class="prose dark:prose-invert prose-sm max-w-none">
{{ wConfig.content | safe }}
</div>
{% endif %}
</div>
{% else %}
<!-- Unknown widget type: {{ widget.type }} -->
{% endif %}