From ab44db81d744b8ade894dd652b4df92cee06389e Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 18 Feb 2026 22:09:10 +0000 Subject: [PATCH] feat(blocks): add `columns` footer block --- modules/blox/blox/features/component.jsx | 4 +- .../blox/blox/shared/js/components/Icon.jsx | 19 ++++- .../_partials/components/footers/columns.html | 82 +++++++++++++++++++ .../_partials/hbx/resolve-block-param.html | 4 +- .../config/_default/menus.yaml | 74 +++++++++++++++++ .../config/_default/params.yaml | 25 +++++- .../content/changelog/_index.md | 4 + .../content/changelog/v1.0/index.md | 19 +++++ .../content/changelog/v1.1/index.md | 22 +++++ 9 files changed, 245 insertions(+), 8 deletions(-) create mode 100644 modules/blox/layouts/_partials/components/footers/columns.html create mode 100644 templates/startup-landing-page/content/changelog/_index.md create mode 100644 templates/startup-landing-page/content/changelog/v1.0/index.md create mode 100644 templates/startup-landing-page/content/changelog/v1.1/index.md diff --git a/modules/blox/blox/features/component.jsx b/modules/blox/blox/features/component.jsx index 3f26e540..2cc5bca1 100644 --- a/modules/blox/blox/features/component.jsx +++ b/modules/blox/blox/features/component.jsx @@ -18,8 +18,8 @@ function FeatureItem({ item, iconSvg }) { return (
{iconSvg && ( -
- +
+
)} {item.name && ( diff --git a/modules/blox/blox/shared/js/components/Icon.jsx b/modules/blox/blox/shared/js/components/Icon.jsx index 45390359..78379a9a 100644 --- a/modules/blox/blox/shared/js/components/Icon.jsx +++ b/modules/blox/blox/shared/js/components/Icon.jsx @@ -5,6 +5,13 @@ import { h } from "preact"; * Icon component * Renders an SVG icon from a raw SVG string passed from Hugo. * Decodes JSON-escaped sequences (\u003c) and HTML entities (<, ", "). + * + * SVG sizing strategy: + * - By default, icons size to 1em (matching current font size) — works universally + * for inline icons in buttons, text, lists, etc. + * - If the caller provides explicit height via style attribute (e.g. style="height: 36px"), + * the SVG fills that container with height:100%;width:auto instead. + * - If the caller provides explicit w-/h- Tailwind classes, those take precedence. */ export const Icon = ({ svg, attributes }) => { if (!svg) return null; @@ -24,9 +31,19 @@ export const Icon = ({ svg, attributes }) => { const hasWrapper = /]/i.test(decoded); if (hasWrapper) { + // Determine SVG sizing: if caller provides explicit height (via style attr), + // use 100% to fill the container; otherwise default to 1em for self-sizing. + const callerStyle = attributes?.style || ""; + const hasExplicitHeight = /height\s*:/i.test(String(callerStyle)); + const svgStyle = hasExplicitHeight + ? "height:100%;width:auto" + : "height:1em;width:auto"; + + decoded = decoded.replace(/^( + Footer + +
+
+
+ {{ if $show_logo }} + {{ with $logo.resource }} + {{ if $logo.is_svg }} + + + {{ else }} + {{ $branding.name }} + {{ end }} + {{ end }} + {{ end }} + {{ if $show_title }} + + {{ $footer_title }} + + {{ end }} + {{ if $show_tagline }} +

{{ site.Params.hugoblox.identity.tagline | default "" }}

+ {{ end }} + {{- $show_social := site.Params.hugoblox.footer.show_social | default true -}} + {{ if $show_social }} + {{ with site.Params.hugoblox.identity.social.links }} +
+ {{ partial "social_links" (dict "Params" (dict "profiles" .)) }} +
+ {{ end }} + {{ end }} +
+
+ + {{ $menu := .Site.Menus.footer }} + {{ range $index, $menuItem := $menu }} +
+

{{ $menuItem.Name }}

+ +
+ {{ end }} +
+
+
+
+
+ + {{/* Display copyright license. */}} + {{ partial "site_footer_license" . }} + +
+
+ diff --git a/modules/blox/layouts/_partials/hbx/resolve-block-param.html b/modules/blox/layouts/_partials/hbx/resolve-block-param.html index eca17df3..55788c66 100644 --- a/modules/blox/layouts/_partials/hbx/resolve-block-param.html +++ b/modules/blox/layouts/_partials/hbx/resolve-block-param.html @@ -6,7 +6,9 @@ {{- $block_id := "" -}} {{- $using_legacy := false -}} -{{- if $config.block -}} +{{- if $config.style -}} + {{- $block_id = $config.style -}} +{{- else if $config.block -}} {{- $block_id = $config.block -}} {{- else if $config.blox -}} {{- $block_id = $config.blox -}} diff --git a/templates/startup-landing-page/config/_default/menus.yaml b/templates/startup-landing-page/config/_default/menus.yaml index 65c22180..e53b697c 100644 --- a/templates/startup-landing-page/config/_default/menus.yaml +++ b/templates/startup-landing-page/config/_default/menus.yaml @@ -12,9 +12,83 @@ main: - name: Solutions url: /#solutions weight: 30 + - name: Changelog + url: /changelog/ + weight: 35 - name: Resources weight: 40 hasChildren: true - parent: Resources name: Blog url: blog/ + +# Footer links (4-column layout) +# Top-level items become column headings, children become links. +footer: + - name: Product + weight: 10 + - parent: Product + name: Features + url: /#features + weight: 10 + - parent: Product + name: Solutions + url: /#solutions + weight: 20 + - parent: Product + name: Pricing + url: "#" + weight: 30 + - parent: Product + name: Changelog + url: /changelog/ + weight: 40 + + - name: Company + weight: 20 + - parent: Company + name: About + url: "#" + weight: 10 + - parent: Company + name: Blog + url: /blog/ + weight: 20 + - parent: Company + name: Careers + url: "#" + weight: 30 + - parent: Company + name: Contact + url: "#" + weight: 40 + + - name: Resources + weight: 30 + - parent: Resources + name: Documentation + url: "#" + weight: 10 + - parent: Resources + name: Help Center + url: "#" + weight: 20 + - parent: Resources + name: Community + url: "#" + weight: 30 + - parent: Resources + name: Status + url: "#" + weight: 40 + + - name: Legal + weight: 40 + - parent: Legal + name: Privacy Policy + url: /privacy/ + weight: 10 + - parent: Legal + name: Terms of Service + url: /terms/ + weight: 20 diff --git a/templates/startup-landing-page/config/_default/params.yaml b/templates/startup-landing-page/config/_default/params.yaml index f0384163..5bb5a108 100644 --- a/templates/startup-landing-page/config/_default/params.yaml +++ b/templates/startup-landing-page/config/_default/params.yaml @@ -19,12 +19,22 @@ hugoblox: # Schema.org type for structured data type: organization # person | organization | local_business # Short tagline displayed on your site - tagline: "" + tagline: "The framework for Hugo." # Site meta description for search engines and social sharing description: "The highly-customizable Hugo Academic theme powered by HugoBlox Kit. Easily create your personal academic website." # Social accounts (used for meta tags like Twitter Cards) social: twitter: "MakeOwnable" # Twitter/X handle for Twitter Cards (without @) + # Site-wide social links (rendered in footer, etc.) + links: + - icon: brands/x + url: https://x.com/MakeOwnable + - icon: brands/github + url: https://github.com/HugoBlox/kit + - icon: brands/discord + url: https://discord.gg/z8wNYzb + - icon: brands/linkedin + url: https://linkedin.com/company/example # ──────────────────────────────────────────────────────────────────────────── # THEME @@ -111,8 +121,15 @@ hugoblox: # ──────────────────────────────────────────────────────────────────────────── footer: # Footer style variant - style: minimal # minimal | columns | centered + style: columns # minimal | columns | centered + show_logo: true + show_title: true + show_tagline: true + # Override footer title (defaults to identity.name) + title: "" language_switcher: true + # Show social icons from identity.social.links + show_social: true # Custom footer text (HTML supported) text: "" @@ -122,9 +139,9 @@ hugoblox: # ──────────────────────────────────────────────────────────────────────────── copyright: # Copyright notice - supports {year}, {name}, {license} placeholders - notice: "© {year} {name}. This work is licensed under {license}" + notice: "© {year} {name}." license: - type: cc # cc | custom + type: custom # cc | custom allow_derivatives: false share_alike: true allow_commercial: false diff --git a/templates/startup-landing-page/content/changelog/_index.md b/templates/startup-landing-page/content/changelog/_index.md new file mode 100644 index 00000000..31754da8 --- /dev/null +++ b/templates/startup-landing-page/content/changelog/_index.md @@ -0,0 +1,4 @@ +--- +title: Changelog +view: date-title-summary +--- diff --git a/templates/startup-landing-page/content/changelog/v1.0/index.md b/templates/startup-landing-page/content/changelog/v1.0/index.md new file mode 100644 index 00000000..a18cbc4f --- /dev/null +++ b/templates/startup-landing-page/content/changelog/v1.0/index.md @@ -0,0 +1,19 @@ +--- +title: "v1.0 — Initial Release" +date: 2026-01-15 +summary: "The first stable release of our platform, featuring the page builder, block system, and Tailwind 4 integration." +version: "1.0.0" +--- + +## What's New + +- **Page Builder** — Build landing pages with drag-and-drop blocks +- **Block System** — Hero, Features, CTA, Testimonials, Stats, and more +- **Tailwind CSS 4** — Modern utility-first styling with dark mode support +- **Preact Components** — Fast, lightweight client-side interactivity +- **SEO Optimized** — Automatic sitemaps, RSS feeds, and structured data +- **Multi-language** — 35+ language packs out of the box + +## Getting Started + +Check out the [documentation](https://docs.hugoblox.com/) to get started with your first site. diff --git a/templates/startup-landing-page/content/changelog/v1.1/index.md b/templates/startup-landing-page/content/changelog/v1.1/index.md new file mode 100644 index 00000000..1409cd15 --- /dev/null +++ b/templates/startup-landing-page/content/changelog/v1.1/index.md @@ -0,0 +1,22 @@ +--- +title: "v1.1 — Footer & Icon Improvements" +date: 2026-02-18 +summary: "Multi-column footer with social icons, improved icon rendering, and changelog section." +version: "1.1.0" +--- + +## What's New + +- **Multi-column Footer** — New `columns` footer style with logo, tagline, and navigation +- **Social Icons** — Site-wide social links rendered in the footer via `identity.social.links` +- **Icon Rendering** — Robust SVG sizing strategy with `1em` default for inline icons + +## Improvements + +- Icons now self-size to `1em` by default, eliminating 0px collapse bugs +- Footer branding supports configurable logo height and SVG scaling +- Feature block icons bumped to larger size for better visual presence + +## Content + +- **Changelog Section** — New standalone section at `/changelog/` using the `date-title-summary` view