From a221d16827ad858005cd3f0fbf474926ce807f06 Mon Sep 17 00:00:00 2001 From: Boris Waaub Date: Mon, 9 Feb 2026 11:05:03 +0100 Subject: [PATCH] feat(cta): ajouter une option pour ouvrir les boutons dans un nouvel onglet --- hugo.toml | 4 +++- static/css/style.css | 8 -------- themes/chill-theme/layouts/partials/components/cta.html | 8 ++++++-- themes/chill-theme/layouts/shortcodes/cta.html | 2 ++ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hugo.toml b/hugo.toml index d7a090c..3e3fca7 100644 --- a/hugo.toml +++ b/hugo.toml @@ -98,14 +98,16 @@ pagination = { pagerSize = 6, path = "page" } gradient_angle = 30 # Primary button - [params.cta.primary_button] + [params.cta.primary_button] text = "Réserver une démo" url = "/contact" + open_tab = false # Secondary button [params.cta.secondary_button] text = "Essayer la démo" url = "http://demo.chill.social/" + open_tab = true diff --git a/static/css/style.css b/static/css/style.css index dc0e98a..9fefd87 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -2212,10 +2212,6 @@ body { order: 2; } -.float-right { - float: right; -} - .\!my-0 { margin-top: 0px !important; margin-bottom: 0px !important; @@ -2336,10 +2332,6 @@ body { margin-top: auto; } -.ml-auto { - margin-left: auto; -} - .line-clamp-2 { overflow: hidden; display: -webkit-box; diff --git a/themes/chill-theme/layouts/partials/components/cta.html b/themes/chill-theme/layouts/partials/components/cta.html index 5c2ec1a..2de44bb 100644 --- a/themes/chill-theme/layouts/partials/components/cta.html +++ b/themes/chill-theme/layouts/partials/components/cta.html @@ -11,13 +11,17 @@

{{ .Site.Params.cta.description }}

{{ with .Site.Params.cta.secondary_button }} - + {{ .text | default "Get Started" }} {{ end }} {{ with .Site.Params.cta.primary_button}} - + {{ .text | default "Sign in" }} {{ end }} diff --git a/themes/chill-theme/layouts/shortcodes/cta.html b/themes/chill-theme/layouts/shortcodes/cta.html index 9238bc9..b206b70 100644 --- a/themes/chill-theme/layouts/shortcodes/cta.html +++ b/themes/chill-theme/layouts/shortcodes/cta.html @@ -4,10 +4,12 @@ "primary_button" (dict "text" (.Get "primary_button_text") "url" (.Get "primary_button_url") + "open_tab" (eq (.Get "primary_button_open_tab") "true") ) "secondary_button" (dict "text" (.Get "secondary_button_text") "url" (.Get "secondary_button_url") + "open_tab" (eq (.Get "secondary_button_open_tab") "true") ) "gradient_from" (.Get "gradient-from") "gradient_to" (.Get "gradient-to")