216 lines
12 KiB
HTML
216 lines
12 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">Exploring Technology's Impact on Work & Life</h1>
|
|
<p class="text-xl text-gray-700 mb-8">Insights, analysis and trends about how technology is shaping our future</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">AI</span>
|
|
<span class="tag bg-green-100 text-green-800 text-sm font-medium px-3 py-1 rounded-full">Remote Work</span>
|
|
<span class="tag bg-purple-100 text-purple-800 text-sm font-medium px-3 py-1 rounded-full">Productivity</span>
|
|
<span class="tag bg-yellow-100 text-yellow-800 text-sm font-medium px-3 py-1 rounded-full">Innovation</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="Your email address" 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">Get Updates</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">Featured Articles</h2>
|
|
|
|
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
|
|
{{ range first 2 (where .Site.Data.wordpress.posts "status" "publish") }}
|
|
{{ $author := index .Site.Data.wordpress.authors .author }}
|
|
{{ $categories := slice }}
|
|
{{ range .categories }}
|
|
{{ $categoryID := . }}
|
|
{{ range $.Site.Data.wordpress.categories }}
|
|
{{ if eq .id $categoryID }}
|
|
{{ $categories = $categories | append .name }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
<div class="bg-white rounded-xl overflow-hidden shadow-lg article-card">
|
|
<div class="featured-article">
|
|
{{ if .featured_image }}
|
|
<img src="{{ .featured_image }}" alt="{{ .title.rendered | plainify }}" class="w-full h-64 object-cover">
|
|
{{ else }}
|
|
<img src="/assets/images/col-1.jpg" alt="{{ .title.rendered | plainify }}" class="w-full h-64 object-cover">
|
|
{{ end }}
|
|
</div>
|
|
<div class="p-6">
|
|
<div class="flex flex-wrap gap-2 mb-4">
|
|
{{ range first 2 $categories }}
|
|
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded">{{ . }}</span>
|
|
{{ end }}
|
|
</div>
|
|
<h3 class="text-xl font-bold text-gray-900 mb-3">{{ .title.rendered | plainify }}</h3>
|
|
<p class="text-gray-600 mb-4">{{ .excerpt.rendered | plainify | truncate 150 }}</p>
|
|
<div class="flex items-center justify-between">
|
|
<div class="flex items-center text-sm text-gray-500">
|
|
{{ if $author.avatar_url }}
|
|
<img src="{{ $author.avatar_url }}" alt="{{ $author.name }}" class="w-6 h-6 rounded-full mr-2">
|
|
{{ else }}
|
|
<img src="https://i.pravatar.cc/24" alt="{{ $author.name }}" class="w-6 h-6 rounded-full mr-2">
|
|
{{ end }}
|
|
<span>{{ $author.name }}</span>
|
|
<span class="mx-2">•</span>
|
|
<span>{{ .date | time.Format "Jan 2, 2006" }}</span>
|
|
</div>
|
|
<a href="{{ .link }}" class="text-blue-600 hover:text-blue-800 font-medium text-sm">Read more →</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
<a href="/articles" class="inline-flex items-center text-blue-600 hover:text-blue-800 font-medium">
|
|
View all articles
|
|
<i class="fas fa-arrow-right ml-2"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Latest Articles -->
|
|
<section 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">Latest Articles</h2>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12">
|
|
{{ range first 6 (after 2 (where .Site.Data.wordpress.posts "status" "publish")) }}
|
|
{{ $author := index .Site.Data.wordpress.authors .author }}
|
|
{{ $categories := slice }}
|
|
{{ range .categories }}
|
|
{{ $categoryID := . }}
|
|
{{ range $.Site.Data.wordpress.categories }}
|
|
{{ if eq .id $categoryID }}
|
|
{{ $categories = $categories | append .name }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
<div class="bg-white rounded-xl overflow-hidden shadow-md article-card">
|
|
{{ if .featured_image }}
|
|
<img src="{{ .featured_image }}" alt="{{ .title.rendered | plainify }}" class="w-full h-48 object-cover">
|
|
{{ else }}
|
|
<img src="/assets/images/col-1.jpg" alt="{{ .title.rendered | plainify }}" class="w-full h-48 object-cover">
|
|
{{ end }}
|
|
<div class="p-6">
|
|
<div class="flex flex-wrap gap-2 mb-3">
|
|
{{ range first 1 $categories }}
|
|
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded">{{ . }}</span>
|
|
{{ end }}
|
|
</div>
|
|
<h3 class="text-lg font-bold text-gray-900 mb-3">{{ .title.rendered | plainify }}</h3>
|
|
<p class="text-gray-600 text-sm mb-4">{{ .excerpt.rendered | plainify | truncate 100 }}</p>
|
|
<div class="flex items-center justify-between text-sm text-gray-500">
|
|
<span>{{ .date | time.Format "Jan 2, 2006" }}</span>
|
|
<span>{{ .reading_time | default "5" }} min read</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
<a href="/articles" class="inline-flex items-center text-blue-600 hover:text-blue-800 font-medium">
|
|
View all articles
|
|
<i class="fas fa-arrow-right ml-2"></i>
|
|
</a>
|
|
</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">Explore Topics</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">AI</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">Remote Work</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">Productivity</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">Development</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">
|
|
Browse all topics
|
|
<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">Stay Updated</h2>
|
|
<p class="text-gray-700 mb-6">Join our newsletter and get the latest insights on technology and the future of work delivered to your inbox.</p>
|
|
<form class="flex flex-col sm:flex-row gap-4 max-w-xl mx-auto">
|
|
<input type="email"
|
|
placeholder="Your email address"
|
|
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">
|
|
Subscribe
|
|
</button>
|
|
</form>
|
|
<p class="text-sm text-gray-500 mt-4">No spam. Unsubscribe at any time.</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
{{ end }}
|