Refactor theme colors and styles; remove unused favicon; update translations and layouts

- Deleted unused favicon file.
- Updated Tailwind CSS configuration to redefine primary and secondary colors.
- Adjusted button styles in CSS to use new color definitions.
- Removed English translations and added French translations for various UI elements.
- Created new layouts for features and updated existing layouts to reflect new design.
- Modified header and CTA components to use updated color scheme.
- Cleaned up pricing table shortcode to align with new styles.
- Updated theme metadata to reflect new author and project details.
This commit is contained in:
Boris Waaub
2026-01-28 13:22:33 +01:00
parent ad649599c9
commit d50f7013a9
39 changed files with 1119 additions and 810 deletions
@@ -4,7 +4,7 @@
{{ $angle := .Site.Params.cta.gradient_angle | default 45 }}
{{ $from := .Site.Params.cta.gradient_from }}
{{ $to := .Site.Params.cta.gradient_to }}
<div class="relative rounded-lg overflow-hidden bg-primary-600 cta-gradient"
<div class="relative rounded-lg overflow-hidden bg-primary-400 cta-gradient"
style="--gradient-angle: {{ $angle }}; --gradient-from: {{ $from }}; --gradient-to: {{ $to }}">
<div class="relative text-center max-w-3xl mx-auto px-6 py-10">
<h2 class="text-3xl md:text-4xl font-bold text-white mb-6">{{ .Site.Params.cta.title }}</h2>
@@ -0,0 +1,86 @@
<div class="docs-sidebar bg-white shadow-sm rounded-lg p-4 sticky top-20 mt-2">
<h3 class="text-lg font-semibold text-gray-900 mb-3 mt-1">{{ i18n "documentation" }}</h3>
<nav class="docs-nav">
<ul class="space-y-1">
{{/* Get all docs pages */}}
{{ $docsPages := where .Site.Pages "Section" "docs" }}
{{ $docsPages = where $docsPages ".IsHome" false }}
{{/* Build list of all section directories to check against */}}
{{ $sectionDirs := slice }}
{{ range $docsPages }}
{{ if eq .Kind "section" }}
{{ $sectionDirs = $sectionDirs | append .File.Dir }}
{{ end }}
{{ end }}
{{/* Build top-level items: pages directly in docs/ AND first-level sections */}}
{{ $topLevel := slice }}
{{ range $docsPages }}
{{ $dir := .File.Dir }}
{{/* For sections: include if NOT the root "docs/" section */}}
{{ if eq .Kind "section" }}
{{ if ne $dir "docs/" }}
{{/* This is a first-level section like "concepts/", "react/", "backend/" */}}
{{ $topLevel = $topLevel | append . }}
{{ end }}
{{ else if eq .Kind "page" }}
{{/* For pages: only include if Dir is exactly "docs/" (top-level pages) */}}
{{ if eq $dir "docs/" }}
{{ $topLevel = $topLevel | append . }}
{{ end }}
{{ end }}
{{ end }}
{{/* Display top-level items sorted by weight */}}
{{ range sort $topLevel "Weight" }}
{{ if .Title }}
<li>
<a href="{{ .RelPermalink }}"
class="block px-4 py-2 rounded-md transition-colors duration-200
{{ if eq .RelPermalink $.RelPermalink }}
bg-indigo-50 text-indigo-600 font-medium
{{ else }}
text-gray-700 hover:bg-gray-50 hover:text-gray-900
{{ end }}">
{{ .Title }}
</a>
{{/* If this is a section, show its children */}}
{{ if eq .Kind "section" }}
{{ $sectionDir := .File.Dir }}
{{ $children := slice }}
{{/* Find child pages in this section (same directory, but .Kind is "page" not "section") */}}
{{ range $docsPages }}
{{ if and (eq .Kind "page") (eq .File.Dir $sectionDir) }}
{{ $children = $children | append . }}
{{ end }}
{{ end }}
{{/* Display children if any exist */}}
{{ if $children }}
<ul class="ml-4 mt-1 space-y-1">
{{ range sort $children "Weight" }}
<li>
<a href="{{ .RelPermalink }}"
class="block px-3 py-1.5 text-sm rounded-md transition-colors duration-200
{{ if eq .RelPermalink $.RelPermalink }}
bg-indigo-50 text-indigo-600 font-medium
{{ else }}
text-gray-600 hover:bg-gray-50 hover:text-gray-900
{{ end }}">
{{ .Title }}
</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>
</nav>
</div>
@@ -34,7 +34,7 @@
<button
type="submit"
class="w-full px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors duration-200"
class="w-full px-4 py-2 bg-primary-400 text-white rounded-lg hover:bg-primary-700 transition-colors duration-200"
>
{{ if .buttonText }}{{ .buttonText }}{{ else }}{{ if eq $lang "zh-cn" }}订阅{{ else }}Subscribe{{ end }}{{ end }}
</button>
@@ -0,0 +1,62 @@
<article class="bg-transparent rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow duration-300 badge-{{ .Params.badgeColor }} flex flex-col h-full">
<!-- Badge couleur -->
{{ with .Params.badge }}
<style>
.badge {
background-color: color-mix(in srgb, var(--badge-color) 30%, transparent);
color: #222;
}
.badge-icon {
color: var(--badge-color);
}
</style>
<div class="px-6 pt-6">
<div class="badge inline-block px-4 py-2 rounded-full font-medium">{{ . }}</div>
</div>
{{ end }}
{{ with .Params.featured_image }}
<a href="{{ $.RelPermalink }}" class="block aspect-w-16 aspect-h-9 overflow-hidden">
<img
src="{{ . }}"
alt="{{ $.Title }}"
class="object-cover w-full h-full transform hover:scale-105 transition-transform duration-300"
loading="lazy"
>
</a>
{{ end }}
<div class="p-6 pt-2 flex flex-col h-full">
<!-- Title -->
<h2 class="text-2xl font-bold mb-3 hover:text-primary-600 transition-colors duration-200">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h2>
<!-- Description -->
<p class="text-gray-600 mb-4 line-clamp-2">
{{ with .Description }}
{{ . }}
{{ else }}
{{ .Summary | truncate 160 }}
{{ end }}
</p>
<!-- Read More link and Reading Time -->
<div class="flex justify-between items-center mt-auto">
<!-- Reading Time -->
<span class="text-sm text-gray-500 flex items-center">
</span>
<a href="{{ .RelPermalink }}"
class="inline-flex items-center text-primary-600 hover:text-primary-700 font-medium">
{{ i18n "discoverFeature" }}
<svg class="w-4 h-4 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3"></path>
</svg>
</a>
</div>
</div>
</article>
@@ -1,14 +1,14 @@
<div class="docs-sidebar bg-white shadow-sm rounded-lg p-4 sticky top-20 mt-2">
<h3 class="text-lg font-semibold text-gray-900 mb-3 mt-1">{{ i18n "documentation" }}</h3>
<div class="docs-sidebar bg-transparent shadow-sm rounded-lg p-4 sticky top-20 mt-2">
<h3 class="text-lg font-semibold mb-3 mt-1">{{ i18n "features" }}</h3>
<nav class="docs-nav">
<ul class="space-y-1">
{{ range (where .Site.Pages "Section" "docs").ByWeight }}
{{ range (where .Site.Pages "Section" .Section).ByWeight }}
{{ if and .Title (not .IsHome) (ne .Kind "section") }}
<li>
<a href="{{ .RelPermalink }}"
class="block px-4 py-2 rounded-md transition-colors duration-200
{{ if eq .RelPermalink $.RelPermalink }}
bg-indigo-50 text-indigo-600 font-medium
bg-primary-100 text-primary-500 font-medium
{{ else }}
text-gray-700 hover:bg-gray-50 hover:text-gray-900
{{ end }}">
@@ -55,7 +55,7 @@
{{ 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-600 text-white hover:bg-primary-700 hover:scale-105{{ end }}">
<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 }}
@@ -117,7 +117,7 @@
{{ 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-600 text-white hover:bg-primary-700 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-700 hover:scale-105{{ end }}">
{{ .text | default "Get Started" }}
</a>
{{ end }}