This repository has been archived on 2025-08-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
hugo-mistergeek/layouts/index.html
2025-08-20 20:10:24 +02:00

226 lines
13 KiB
HTML

{{ define "main" }}
<!-- Modern Homepage -->
<div class="min-h-screen bg-white">
<!-- Hero Section -->
<section class="gradient-bg py-12 md:py-16 lg:py-20">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="max-w-4xl mx-auto text-center">
<h1 class="text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 mb-6">{{ .Site.Title }}</h1>
<p class="text-xl text-gray-700 mb-8">{{ .Site.Params.seo.description }}</p>
<div class="flex flex-wrap justify-center gap-3 mb-10">
<span class="tag bg-blue-100 text-blue-800 text-sm font-medium px-3 py-1 rounded-full">IA</span>
<span class="tag bg-green-100 text-green-800 text-sm font-medium px-3 py-1 rounded-full">Programmation</span>
<span class="tag bg-purple-100 text-purple-800 text-sm font-medium px-3 py-1 rounded-full">Photo</span>
<span class="tag bg-yellow-100 text-yellow-800 text-sm font-medium px-3 py-1 rounded-full">Vidéo</span>
<span class="tag bg-red-100 text-red-800 text-sm font-medium px-3 py-1 rounded-full">Web3</span>
</div>
{{/*
<form class="flex flex-col sm:flex-row gap-4 max-w-xl mx-auto">
<input type="email" placeholder="Votre adresse email" class="flex-grow px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-medium">Recevoir les mises à jour</button>
</form>
*/}}
</div>
</div>
</section>
<!-- Featured Articles -->
<section class="py-12 md:py-16">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<h2 class="text-3xl font-bold text-gray-900 mb-10 text-center">Articles en Vedette</h2>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
{{ range first 2 (where $.Site.RegularPages "Params.categories" "intersect" (slice "Featured")) }}
<div class="bg-white rounded-xl overflow-hidden shadow-lg article-card">
<div class="featured-article">
<a href="{{ .RelPermalink }}">
{{ if .Params.featured_image }}
<img src="{{ .Params.featured_image }}" alt="{{ .Title }}" class="w-full h-64 object-cover">
{{ else }}
<img src="/assets/images/col-1.jpg" alt="{{ .Title }}" class="w-full h-64 object-cover">
{{ end }}
</a>
</div>
<div class="p-6">
<div class="flex flex-wrap gap-2 mb-4">
{{ range first 2 .Params.categories }}
<a href="/categories/{{ . | urlize }}" class="bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded hover:underline">{{ . }}</a>
{{ end }}
</div>
<h3 class="text-xl font-bold text-gray-900 mb-3">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
<p class="text-gray-600 mb-4">
{{ if .Params.excerpt }}
{{ .Params.excerpt }}
{{ else if .Summary }}
{{ .Summary }}
{{ else }}
{{ truncate 200 .Content }}
{{ end }}
</p>
<div class="flex items-center justify-between">
<div class="flex items-center text-sm text-gray-500">
{{/* <img src="https://i.pravatar.cc/24" alt="{{ .Params.author }}" class="w-6 h-6 rounded-full mr-2"> */}}
<a href="/author/{{ .Params.author | urlize }}" class="hover:underline">{{ .Params.author }}</a>
<span class="mx-2"></span>
<span>{{ .Date | time.Format "2 Jan 2006" }}</span>
</div>
<a href="{{ .RelPermalink }}" class="text-blue-600 hover:text-blue-800 font-medium text-sm">Lire la suite →</a>
</div>
</div>
</div>
{{ end }}
</div>
<div class="text-center">
<a href="#latest-articles" class="inline-flex items-center text-blue-600 hover:text-blue-800 font-medium">
Voir plus d'articles
<i class="fas fa-arrow-down ml-2"></i>
</a>
</div>
</div>
</section>
<!-- Latest Articles -->
<section id="latest-articles" class="py-12 md:py-16 bg-gray-50">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<h2 class="text-3xl font-bold text-gray-900 mb-10 text-center">Derniers Articles</h2>
{{ $featuredPosts := where $.Site.RegularPages "Params.categories" "intersect" (slice "Featured") }}
{{ $regularPosts := where $.Site.RegularPages "Type" "!=" "page" }}
{{ $nonFeaturedPosts := complement $featuredPosts $regularPosts }}
{{ $paginator := .Paginate $nonFeaturedPosts 9 }}
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12">
{{ range $paginator.Pages }}
<div class="bg-white rounded-xl overflow-hidden shadow-md article-card">
<a href="{{ .RelPermalink }}">
{{ if .Params.featured_image }}
<img src="{{ .Params.featured_image }}" alt="{{ .Title }}" class="w-full h-48 object-cover">
{{ else }}
<img src="/assets/images/col-1.jpg" alt="{{ .Title }}" class="w-full h-48 object-cover">
{{ end }}
</a>
<div class="p-6">
<div class="flex flex-wrap gap-2 mb-3">
{{ if .Params.categories }}
{{ range first 1 .Params.categories }}
<a href="/categories/{{ . | urlize }}" class="bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded hover:underline">{{ . }}</a>
{{ end }}
{{ end }}
</div>
<h3 class="text-lg font-bold text-gray-900 mb-3"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<p class="text-gray-600 text-sm mb-4">
{{ if .Params.excerpt }}
{{ .Params.excerpt }}
{{ else if .Summary }}
{{ .Summary }}
{{ else }}
{{ truncate 200 .Content }}
{{ end }}
</p>
<div class="flex items-center justify-between text-sm text-gray-500">
<span>{{ .Date | time.Format "2 Jan 2006" }}</span>
<a href="{{ .RelPermalink }}" class="text-blue-600 hover:text-blue-800 font-medium text-sm">Lire la suite →</a>
</div>
</div>
</div>
{{ end }}
</div>
<!-- Pagination -->
<div class="flex justify-center mt-12">
{{ if gt .Paginator.TotalPages 1 }}
{{ partial "pagination-tailwind.html" .Paginator }}
{{ end }}
</div>
</div>
</section>
{{/*
<!-- Popular Topics -->
<section class="py-12 md:py-16">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<h2 class="text-3xl font-bold text-gray-900 mb-10 text-center">Explorer les Thèmes</h2>
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-12">
<a href="#" class="flex flex-col items-center p-6 bg-white rounded-xl shadow-md hover:shadow-lg transition-shadow">
<div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mb-3">
<i class="fas fa-robot text-blue-600 text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-900">IA</span>
</a>
<a href="#" class="flex flex-col items-center p-6 bg-white rounded-xl shadow-md hover:shadow-lg transition-shadow">
<div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mb-3">
<i class="fas fa-laptop-house text-green-600 text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-900">Télétravail</span>
</a>
<a href="#" class="flex flex-col items-center p-6 bg-white rounded-xl shadow-md hover:shadow-lg transition-shadow">
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-3">
<i class="fas fa-tachometer-alt text-purple-600 text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-900">Productivité</span>
</a>
<a href="#" class="flex flex-col items-center p-6 bg-white rounded-xl shadow-md hover:shadow-lg transition-shadow">
<div class="w-12 h-12 bg-yellow-100 rounded-lg flex items-center justify-center mb-3">
<i class="fas fa-lightbulb text-yellow-600 text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-900">Innovation</span>
</a>
<a href="#" class="flex flex-col items-center p-6 bg-white rounded-xl shadow-md hover:shadow-lg transition-shadow">
<div class="w-12 h-12 bg-red-100 rounded-lg flex items-center justify-center mb-3">
<i class="fas fa-code text-red-600 text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-900">Développement</span>
</a>
<a href="#" class="flex flex-col items-center p-6 bg-white rounded-xl shadow-md hover:shadow-lg transition-shadow">
<div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mb-3">
<i class="fas fa-link text-indigo-600 text-xl"></i>
</div>
<span class="text-sm font-medium text-gray-900">Web3</span>
</a>
</div>
<div class="text-center">
<a href="#" class="inline-flex items-center text-blue-600 hover:text-blue-800 font-medium">
Parcourir tous les thèmes
<i class="fas fa-arrow-right ml-2"></i>
</a>
</div>
</div>
</section>
*/}}
{{/*
<!-- Newsletter Section -->
<section class="py-12 md:py-16 bg-blue-50">
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
<div class="max-w-3xl mx-auto text-center">
<h2 class="text-3xl font-bold text-gray-900 mb-4">Restez Informé</h2>
<p class="text-gray-700 mb-6">Rejoignez notre newsletter et recevez les dernières perspectives sur la technologie et l'avenir du travail directement dans votre boîte mail.</p>
<form class="flex flex-col sm:flex-row gap-4 max-w-xl mx-auto">
<input type="email"
placeholder="Votre adresse email"
class="flex-grow px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500">
<button type="submit"
class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-medium">
S'abonner
</button>
</form>
<p class="text-sm text-gray-500 mt-4">Pas de spam. Désabonnez-vous à tout moment.</p>
</div>
</div>
</section>
*/}}
</div>
{{ end }}