feat(cta): ajouter une option pour ouvrir les boutons dans un nouvel onglet
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user