feat: Ajouter un bouton de démo dans l'en-tête et améliorer la gestion des classes CSS pour la réactivité

This commit is contained in:
Boris Waaub
2026-03-10 11:26:24 +01:00
parent 65813b6520
commit 45b6edadf9
3 changed files with 52 additions and 23 deletions
+6 -1
View File
@@ -82,6 +82,12 @@ pagination = { pagerSize = 6, path = "page" }
border = "none" border = "none"
menu.linkClass = "text-white hover:text-primary font-bold transition duration-200" menu.linkClass = "text-white hover:text-primary font-bold transition duration-200"
[params.header.buttons.demo]
text = "Démo"
url = "http://demo.chill.social/"
mobileClass = "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"
open_tab = false
# Header Logo # Header Logo
[params.header.logo] [params.header.logo]
src = "/images/logo-darkmode.png" src = "/images/logo-darkmode.png"
@@ -114,7 +120,6 @@ pagination = { pagerSize = 6, path = "page" }
# Social Media Links (optional) # Social Media Links (optional)
[params.social] [params.social]
mastodon = "https://mastodon.libre-entreprise.com/@Chill"
gitlab = "https://gitlab.com/Chill-Projet/chill-bundles" gitlab = "https://gitlab.com/Chill-Projet/chill-bundles"
# Navigation Menu # Navigation Menu
+30
View File
@@ -2395,6 +2395,14 @@ body {
margin-top: auto; margin-top: auto;
} }
.mr-8 {
margin-right: 2rem;
}
.ml-8 {
margin-left: 2rem;
}
.line-clamp-2 { .line-clamp-2 {
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
@@ -2551,6 +2559,10 @@ body {
width: 100%; width: 100%;
} }
.w-auto {
width: auto;
}
.\!max-w-none { .\!max-w-none {
max-width: none !important; max-width: none !important;
} }
@@ -2615,6 +2627,10 @@ body {
flex-shrink: 0; flex-shrink: 0;
} }
.shrink-0 {
flex-shrink: 0;
}
.flex-grow { .flex-grow {
flex-grow: 1; flex-grow: 1;
} }
@@ -2796,6 +2812,12 @@ body {
margin-bottom: calc(2rem * var(--tw-space-y-reverse)); margin-bottom: calc(2rem * var(--tw-space-y-reverse));
} }
.space-x-12 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(3rem * var(--tw-space-x-reverse));
margin-left: calc(3rem * calc(1 - var(--tw-space-x-reverse)));
}
.overflow-hidden { .overflow-hidden {
overflow: hidden; overflow: hidden;
} }
@@ -4738,6 +4760,14 @@ body {
margin-top: 6rem; margin-top: 6rem;
} }
.lg\:flex {
display: flex;
}
.lg\:hidden {
display: none;
}
.lg\:w-1\/4 { .lg\:w-1\/4 {
width: 25%; width: 25%;
} }
+15 -21
View File
@@ -8,7 +8,7 @@
<!-- Logo and Title --> <!-- Logo and Title -->
<a href="{{ "/" | relLangURL }}" class="flex items-center space-x-4"> <a href="{{ "/" | relLangURL }}" class="flex items-center space-x-4">
{{ with $headerConfig.logo }} {{ with $headerConfig.logo }}
<img src="{{ .src | relURL }}" alt="{{ $.Site.Title }}" class="{{ with .class }}{{ . }}{{ else }}h-12{{ end }}"> <img src="{{ .src | relURL }}" alt="{{ $.Site.Title }}" class="{{ with .class }}{{ . }}{{ else }}h-12{{ end }} w-auto object-contain">
{{ else }} {{ else }}
<span class="text-3xl font-bold text-gray-900">{{ .Site.Title }}</span> <span class="text-3xl font-bold text-gray-900">{{ .Site.Title }}</span>
{{ end }} {{ end }}
@@ -18,7 +18,7 @@
</a> </a>
<!-- Navigation --> <!-- Navigation -->
<div class="hidden md:flex items-center {{ with $headerConfig.menu.spacing }}{{ . }}{{ else }}space-x-8{{ end }}"> <div class="hidden ml-8 lg:flex items-center {{ with $headerConfig.menu.spacing }}{{ . }}{{ else }}space-x-8{{ end }}">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if .Params.has_submenu }} {{ if .Params.has_submenu }}
<div class="relative group"> <div class="relative group">
@@ -47,23 +47,20 @@
<!-- CTA Buttons --> <!-- CTA Buttons -->
{{ if not $headerConfig.hideButtons }} {{ if not $headerConfig.hideButtons }}
<div class="hidden md:flex items-center space-x-4"> <div class="hidden ml-8 lg:flex items-center space-x-4">
{{ with $headerConfig.buttons.signIn }} {{ with $headerConfig.buttons.demo }}
<a href="{{ .url | default "#" }}" class="{{ with .class }}{{ . }}{{ else }}inline-flex items-center justify-center px-6 py-3 rounded-lg font-bold transition duration-200 ease-in-out border-2 border-gray-200 hover:border-primary-600 hover:text-primary-600{{ end }}"> <a href="{{ .url | default "#" }}"
{{ .text | default "Sign in" }} 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 "Démo" }}
</a> </a>
{{ end }} {{ end }}
{{ with $headerConfig.buttons.getStarted }}
<a href="{{ .url | default "#" }}" class="{{ with .class }}{{ . }}{{ else }}inline-flex items-center justify-center px-6 py-3 rounded-lg font-bold transition duration-200 ease-in-out bg-primary-400 text-white hover:bg-primary-700 hover:scale-105{{ end }}">
{{ .text | default "Get Started" }}
</a>
{{ end }}
</div> </div>
{{ end }} {{ end }}
<!-- Mobile Menu Toggle --> <!-- Mobile Menu Toggle -->
<div class="md:hidden"> <div class="lg:hidden">
<label for="nav-toggle" class="p-2 rounded-lg hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-2 transition-colors cursor-pointer"> <label for="nav-toggle" class="p-2 rounded-lg hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-2 transition-colors cursor-pointer">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path>
@@ -74,7 +71,7 @@
</div> </div>
<!-- Mobile Menu --> <!-- Mobile Menu -->
<div class="nav-content md:hidden w-full fixed left-0 right-0 top-20 bg-white border-t border-gray-100 shadow-lg max-h-[calc(100vh-5rem)] overflow-y-auto"> <div class="nav-content lg:hidden w-full fixed left-0 right-0 top-20 bg-white border-t border-gray-100 shadow-lg max-h-[calc(100vh-5rem)] overflow-y-auto">
<div class="w-full px-6 py-4"> <div class="w-full px-6 py-4">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if .Params.has_submenu }} {{ if .Params.has_submenu }}
@@ -110,17 +107,14 @@
{{ if not $headerConfig.hideButtons }} {{ if not $headerConfig.hideButtons }}
<div class="pt-4 space-y-4"> <div class="pt-4 space-y-4">
{{ with $headerConfig.buttons.signIn }} {{ with $headerConfig.buttons.demo }}
<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 border-gray-200 hover:border-primary-600 hover:text-primary-600{{ end }}"> <a href="{{ .url | default "#" }}"
{{ .text | default "Sign in" }} 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 "Démo" }}
</a> </a>
{{ end }} {{ end }}
{{ with $headerConfig.buttons.getStarted }}
<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-700 hover:scale-105{{ end }}">
{{ .text | default "Get Started" }}
</a>
{{ end }}
</div> </div>
{{ end }} {{ end }}
</div> </div>