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
+2
View File
@@ -101,11 +101,13 @@ pagination = { pagerSize = 6, path = "page" }
[params.cta.primary_button] [params.cta.primary_button]
text = "Réserver une démo" text = "Réserver une démo"
url = "/contact" url = "/contact"
open_tab = false
# Secondary button # Secondary button
[params.cta.secondary_button] [params.cta.secondary_button]
text = "Essayer la démo" text = "Essayer la démo"
url = "http://demo.chill.social/" url = "http://demo.chill.social/"
open_tab = true
-8
View File
@@ -2212,10 +2212,6 @@ body {
order: 2; order: 2;
} }
.float-right {
float: right;
}
.\!my-0 { .\!my-0 {
margin-top: 0px !important; margin-top: 0px !important;
margin-bottom: 0px !important; margin-bottom: 0px !important;
@@ -2336,10 +2332,6 @@ body {
margin-top: auto; margin-top: auto;
} }
.ml-auto {
margin-left: auto;
}
.line-clamp-2 { .line-clamp-2 {
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
@@ -11,13 +11,17 @@
<p class="text-xl text-primary-100 mb-8">{{ .Site.Params.cta.description }}</p> <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"> <div class="flex flex-col sm:flex-row justify-center gap-4">
{{ with .Site.Params.cta.secondary_button }} {{ 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" }} {{ .text | default "Get Started" }}
</a> </a>
{{ end }} {{ end }}
{{ with .Site.Params.cta.primary_button}} {{ 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" }} {{ .text | default "Sign in" }}
</a> </a>
{{ end }} {{ end }}
@@ -4,10 +4,12 @@
"primary_button" (dict "primary_button" (dict
"text" (.Get "primary_button_text") "text" (.Get "primary_button_text")
"url" (.Get "primary_button_url") "url" (.Get "primary_button_url")
"open_tab" (eq (.Get "primary_button_open_tab") "true")
) )
"secondary_button" (dict "secondary_button" (dict
"text" (.Get "secondary_button_text") "text" (.Get "secondary_button_text")
"url" (.Get "secondary_button_url") "url" (.Get "secondary_button_url")
"open_tab" (eq (.Get "secondary_button_open_tab") "true")
) )
"gradient_from" (.Get "gradient-from") "gradient_from" (.Get "gradient-from")
"gradient_to" (.Get "gradient-to") "gradient_to" (.Get "gradient-to")