working on front-page
This commit is contained in:
@@ -6,44 +6,18 @@
|
||||
<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.description | default "Exploring technology's impact on work and life" }}
|
||||
</p>
|
||||
|
||||
<!-- Tags -->
|
||||
<div class="flex flex-wrap justify-center gap-3 mb-10">
|
||||
{{ $categories := .Site.Taxonomies.categories }}
|
||||
{{ if $categories }}
|
||||
{{ $categoryList := slice }}
|
||||
{{ range $name, $taxonomy := $categories }}
|
||||
{{ range $taxonomy }}
|
||||
{{ $categoryList = $categoryList | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ range first 5 $categoryList }}
|
||||
<span class="tag bg-blue-100 text-blue-800 text-sm font-medium px-3 py-1 rounded-full">
|
||||
{{ .Page.Title }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<span class="tag bg-gray-100 text-gray-600 text-sm font-medium px-3 py-1 rounded-full">
|
||||
General
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Newsletter Signup -->
|
||||
<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="btn-primary px-6 py-3 rounded-lg font-medium">
|
||||
Get Updates
|
||||
</button>
|
||||
<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>
|
||||
@@ -55,36 +29,53 @@
|
||||
<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.RegularPages "Params.featured" true) }}
|
||||
<div class="bg-white rounded-xl overflow-hidden shadow-lg article-card">
|
||||
<div class="featured-article">
|
||||
{{ if .Params.featured_image }}
|
||||
<img src="{{ .Params.featured_image }}" alt="{{ .Title }}" class="w-full h-64 object-cover">
|
||||
{{ else }}
|
||||
<img src="https://images.unsplash.com/photo-1677442135135-416f8aa26a5b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80" alt="{{ .Title }}" 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 (default (slice) .Params.categories) }}
|
||||
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded">{{ . }}</span>
|
||||
{{ end }}
|
||||
<!-- Featured Article 1 -->
|
||||
<div class="bg-white rounded-xl overflow-hidden shadow-lg article-card">
|
||||
<div class="featured-article">
|
||||
<img src="https://images.unsplash.com/photo-1677442135135-416f8aa26a5b?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80" alt="AI Technology" class="w-full h-64 object-cover">
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-gray-900 mb-3">
|
||||
<a href="{{ .Permalink }}" class="hover:text-blue-600">{{ .Title }}</a>
|
||||
</h3>
|
||||
<p class="text-gray-600 mb-4">{{ .Summary | truncate 150 }}</p>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center text-sm text-gray-500">
|
||||
<span>{{ .Params.author | default "Tech Team" }}</span>
|
||||
<span class="mx-2">•</span>
|
||||
<span>{{ .Date.Format "Jan 2, 2006" }}</span>
|
||||
<div class="p-6">
|
||||
<div class="flex flex-wrap gap-2 mb-4">
|
||||
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded">AI</span>
|
||||
<span class="bg-green-100 text-green-800 text-xs font-medium px-2 py-1 rounded">Future of Work</span>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-gray-900 mb-3">How Tech Shapes the Future of Work in 2024</h3>
|
||||
<p class="text-gray-600 mb-4">Exploring the latest technological advancements and their impact on the modern workplace, from AI to remote collaboration tools.</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?img=5" alt="Author" class="rounded-full mr-2">
|
||||
<span>Sarah Johnson</span>
|
||||
<span class="mx-2">•</span>
|
||||
<span>Oct 16, 2024</span>
|
||||
</div>
|
||||
<a href="#" class="text-blue-600 hover:text-blue-800 font-medium text-sm">Read more →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Featured Article 2 -->
|
||||
<div class="bg-white rounded-xl overflow-hidden shadow-lg article-card">
|
||||
<div class="featured-article">
|
||||
<img src="https://images.unsplash.com/photo-1581092580497-e0d23cbdf1dc?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80" alt="AI Ethics" class="w-full h-64 object-cover">
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<div class="flex flex-wrap gap-2 mb-4">
|
||||
<span class="bg-purple-100 text-purple-800 text-xs font-medium px-2 py-1 rounded">AI</span>
|
||||
<span class="bg-red-100 text-red-800 text-xs font-medium px-2 py-1 rounded">Ethics</span>
|
||||
</div>
|
||||
<h3 class="text-xl font-bold text-gray-900 mb-3">The Ethics of Artificial Intelligence in Hiring</h3>
|
||||
<p class="text-gray-600 mb-4">Exploring the benefits and potential pitfalls of using AI to recruit and evaluate candidates in the modern workplace.</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?img=8" alt="Author" class="rounded-full mr-2">
|
||||
<span>Michael Chen</span>
|
||||
<span class="mx-2">•</span>
|
||||
<span>Sep 3, 2024</span>
|
||||
</div>
|
||||
<a href="#" class="text-blue-600 hover:text-blue-800 font-medium text-sm">Read more →</a>
|
||||
</div>
|
||||
<a href="{{ .Permalink }}" class="text-blue-600 hover:text-blue-800 font-medium text-sm">Read more →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
@@ -102,58 +93,55 @@
|
||||
<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 .Paginator.Pages }}
|
||||
<div class="bg-white rounded-xl overflow-hidden shadow-md article-card">
|
||||
{{ if .Params.featured_image }}
|
||||
<img src="{{ .Params.featured_image }}" alt="{{ .Title }}" class="w-full h-48 object-cover">
|
||||
{{ else }}
|
||||
<img src="https://images.unsplash.com/photo-1581091226033-d5c48150dbaa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80" alt="{{ .Title }}" class="w-full h-48 object-cover">
|
||||
{{ end }}
|
||||
<div class="p-6">
|
||||
<div class="flex flex-wrap gap-2 mb-3">
|
||||
{{ range first 1 (default (slice) .Params.categories) }}
|
||||
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded">{{ . }}</span>
|
||||
{{ end }}
|
||||
<!-- Article 1 -->
|
||||
<div class="bg-white rounded-xl overflow-hidden shadow-md article-card">
|
||||
<img src="https://images.unsplash.com/photo-1581091226033-d5c48150dbaa?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80" alt="Productivity" class="w-full h-48 object-cover">
|
||||
<div class="p-6">
|
||||
<div class="flex flex-wrap gap-2 mb-3">
|
||||
<span class="bg-blue-100 text-blue-800 text-xs font-medium px-2 py-1 rounded">Productivity</span>
|
||||
</div>
|
||||
<h3 class="text-lg font-bold text-gray-900 mb-3">10 Tools to Boost Your Productivity in 2024</h3>
|
||||
<p class="text-gray-600 text-sm mb-4">Discover the latest apps and software that can help you work smarter, not harder.</p>
|
||||
<div class="flex items-center justify-between text-sm text-gray-500">
|
||||
<span>May 12, 2024</span>
|
||||
<span>5 min read</span>
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="text-lg font-bold text-gray-900 mb-3">
|
||||
<a href="{{ .Permalink }}" class="hover:text-blue-600">{{ .Title }}</a>
|
||||
</h3>
|
||||
<p class="text-gray-600 text-sm mb-4">{{ .Summary | truncate 100 }}</p>
|
||||
<div class="flex items-center justify-between text-sm text-gray-500">
|
||||
<span>{{ .Date.Format "Jan 2, 2006" }}</span>
|
||||
<span>{{ .ReadingTime }} min read</span>
|
||||
</div>
|
||||
|
||||
<!-- Article 2 -->
|
||||
<div class="bg-white rounded-xl overflow-hidden shadow-md article-card">
|
||||
<img src="https://images.unsplash.com/photo-1533750349088-cd871a92f312?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80" alt="Remote Work" class="w-full h-48 object-cover">
|
||||
<div class="p-6">
|
||||
<div class="flex flex-wrap gap-2 mb-3">
|
||||
<span class="bg-green-100 text-green-800 text-xs font-medium px-2 py-1 rounded">Remote Work</span>
|
||||
</div>
|
||||
<h3 class="text-lg font-bold text-gray-900 mb-3">Building Company Culture in a Remote World</h3>
|
||||
<p class="text-gray-600 text-sm mb-4">How forward-thinking companies are maintaining strong cultures with distributed teams.</p>
|
||||
<div class="flex items-center justify-between text-sm text-gray-500">
|
||||
<span>July 24, 2024</span>
|
||||
<span>7 min read</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Article 3 -->
|
||||
<div class="bg-white rounded-xl overflow-hidden shadow-md article-card">
|
||||
<img src="https://images.unsplash.com/photo-1552664730-d307ca884978?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1000&q=80" alt="Web3" class="w-full h-48 object-cover">
|
||||
<div class="p-6">
|
||||
<div class="flex flex-wrap gap-2 mb-3">
|
||||
<span class="bg-purple-100 text-purple-800 text-xs font-medium px-2 py-1 rounded">Web3</span>
|
||||
<span class="bg-yellow-100 text-yellow-800 text-xs font-medium px-2 py-1 rounded">Blockchain</span>
|
||||
</div>
|
||||
<h3 class="text-lg font-bold text-gray-900 mb-3">Understanding Web3: The Next Evolution of the Internet</h3>
|
||||
<p class="text-gray-600 text-sm mb-4">What businesses need to know about the decentralized web and its potential impact.</p>
|
||||
<div class="flex items-center justify-between text-sm text-gray-500">
|
||||
<span>Aug 5, 2024</span>
|
||||
<span>9 min read</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Pagination -->
|
||||
{{ if gt .Paginator.TotalPages 1 }}
|
||||
<div class="text-center">
|
||||
<nav class="flex justify-center items-center space-x-2">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">
|
||||
Previous
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ range .Paginator.Pagers }}
|
||||
{{ if eq . $.Paginator }}
|
||||
<span class="px-4 py-2 bg-blue-600 text-white rounded-lg">{{ .PageNumber }}</span>
|
||||
{{ else }}
|
||||
<a href="{{ .URL }}" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300">{{ .PageNumber }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a href="{{ .Paginator.Next.URL }}" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">
|
||||
Next
|
||||
</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -163,34 +151,54 @@
|
||||
<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">
|
||||
{{ $categories := .Site.Taxonomies.categories }}
|
||||
{{ if $categories }}
|
||||
{{ $categoryList := slice }}
|
||||
{{ range $name, $taxonomy := $categories }}
|
||||
{{ range $taxonomy }}
|
||||
{{ $categoryList = $categoryList | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ range $categoryList }}
|
||||
<a href="/{{ .Page.Slug }}" class="flex flex-col items-center p-6 bg-white rounded-xl shadow-md hover:shadow-lg transition-shadow">
|
||||
<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-tag text-blue-600 text-xl"></i>
|
||||
<i class="fas fa-robot text-blue-600 text-xl"></i>
|
||||
</div>
|
||||
<span class="text-sm font-medium text-gray-900">{{ .Page.Title }}</span>
|
||||
<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>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<div class="col-span-full text-center py-8">
|
||||
<p class="text-gray-500">No categories available yet.</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<a href="/topics" 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>
|
||||
@@ -206,7 +214,7 @@
|
||||
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="btn-primary px-6 py-3 rounded-lg font-medium">
|
||||
class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-medium">
|
||||
Subscribe
|
||||
</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user