feat(cta): ajouter une option pour ouvrir les boutons dans un nouvel onglet

This commit is contained in:
Boris Waaub
2026-02-09 11:05:03 +01:00
parent eccf151099
commit a221d16827
4 changed files with 11 additions and 11 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -11,13 +11,17 @@
<p class="text-xl text-primary-100 mb-8">{{ .Site.Params.cta.description }}</p>
<div class="flex flex-col sm:flex-row justify-center gap-4">
{{ with .Site.Params.cta.secondary_button }}
<a href="{{ .url | default "#" }}" class="{{ with .mobileClass }}{{ . }}{{ else }}block text-center px-6 py-3 rounded-lg font-bold transition duration-200 ease-in-out bg-primary-400 text-white hover:bg-primary-400 hover:scale-105{{ end }}">
<a href="{{ .url | default "#" }}"
class="{{ with .mobileClass }}{{ . }}{{ else }}block text-center px-6 py-3 rounded-lg font-bold transition duration-200 ease-in-out bg-primary-400 text-white hover:bg-primary-400 hover:scale-105{{ end }}"
{{ if .open_tab }}target="_blank" rel="noopener noreferrer"{{ end }}>
{{ .text | default "Get Started" }}
</a>
{{ end }}
{{ with .Site.Params.cta.primary_button}}
<a href="{{ .url | default "#" }}" class="{{ with .mobileClass }}{{ . }}{{ else }}block text-center px-6 py-3 rounded-lg font-bold transition duration-200 ease-in-out border-2 text-primary-400 border-primary-400 hover:border-primary-400 hover:text-primary-400 hover:scale-105{{ end }}">
<a href="{{ .url | default "#" }}"
class="{{ with .mobileClass }}{{ . }}{{ else }}block text-center px-6 py-3 rounded-lg font-bold transition duration-200 ease-in-out border-2 text-primary-400 border-primary-400 hover:border-primary-400 hover:text-primary-400 hover:scale-105{{ end }}"
{{ if .open_tab }}target="_blank" rel="noopener noreferrer"{{ end }}>
{{ .text | default "Sign in" }}
</a>
{{ end }}

View File

@@ -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")