diff --git a/layouts/shortcodes/hero-button-secondary.html b/layouts/shortcodes/hero-button-secondary.html new file mode 100644 index 0000000..b094a69 --- /dev/null +++ b/layouts/shortcodes/hero-button-secondary.html @@ -0,0 +1,29 @@ +{{- /* +Secondary hero button - outlined variant of Hextra's primary hero button. +It uses Hextra's existing color palette and matches both light and dark modes. + +This shortcode is the companion to `hero-button`, designed for secondary actions +(such as "Learn more") displayed alongside a primary button. + +@param {string} link The link of the button. +@param {string} text The text of the button. +@param {string} style Optional inline style overrides. + +@example {{< hero-button-secondary text="Learn more" link="/docs" >}} +*/ -}} + +{{- $link := .Get "link" -}} +{{- $text := .Get "text" -}} +{{- $style := .Get "style" -}} + +{{- $external := hasPrefix $link "http" -}} +{{- $href := cond (hasPrefix $link "/") ($link | relURL) $link -}} + + + {{- $text -}} +