|
| 1 | +--- |
| 2 | +import BlogCard from "@/components/BlogCard.astro"; |
| 3 | +import BaseLayout from "@/layouts/BaseLayout"; |
| 4 | +
|
| 5 | +import { getCollection } from "astro:content"; |
| 6 | +
|
| 7 | +const posts = await getCollection("research"); |
| 8 | +
|
| 9 | +/* ALL UNIQUE TAGS */ |
| 10 | +const allTags = [...new Set(posts.flatMap((post) => post.data.tags || []))]; |
| 11 | +--- |
| 12 | + |
| 13 | +<BaseLayout meta={{ title: "Research & White Papers" }}> |
| 14 | + <main class="bg-background text-foreground"> |
| 15 | + <!-- HERO --> |
| 16 | + <section class="mx-auto max-w-7xl px-6 py-20 lg:px-10"> |
| 17 | + <div class="text-center"> |
| 18 | + <!-- LABEL --> |
| 19 | + <p class="mb-4 text-sm font-semibold uppercase tracking-[0.25em] text-blue-600">Research Library</p> |
| 20 | + |
| 21 | + <!-- HEADING --> |
| 22 | + <h1 class="text-foreground text-4xl font-bold tracking-tight sm:text-5xl md:text-6xl">Research & White Papers</h1> |
| 23 | + |
| 24 | + <!-- DESCRIPTION --> |
| 25 | + <p class="text-foreground/70 mx-auto mt-6 max-w-2xl text-lg leading-8"> |
| 26 | + Explore industry research, market analysis, case studies, AI trends, sustainability insights and product vision papers. |
| 27 | + </p> |
| 28 | + |
| 29 | + <!-- TAG PREVIEW --> |
| 30 | + <div class="mt-10 flex flex-wrap items-center justify-center gap-3"> |
| 31 | + { |
| 32 | + allTags.slice(0, 3).map((tag) => ( |
| 33 | + <a |
| 34 | + href={`/blogs/tag/${tag}`} |
| 35 | + class="rounded-full border border-cyan-500/20 bg-brandBlue/20 px-4 py-2 text-sm font-medium text-blue-700 transition duration-300 hover:bg-brandBlue hover:text-white" |
| 36 | + > |
| 37 | + #{tag} |
| 38 | + </a> |
| 39 | + )) |
| 40 | + } |
| 41 | + |
| 42 | + <!-- MORE TAGS BUTTON --> |
| 43 | + <a |
| 44 | + href="/blogs/tag" |
| 45 | + class="border-foreground/10 text-foreground rounded-full border px-5 py-2 text-sm font-semibold transition duration-300 hover:border-cyan-500 hover:text-blue-600" |
| 46 | + > |
| 47 | + More Tags → |
| 48 | + </a> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + |
| 52 | + <!-- BLOG GRID --> |
| 53 | + <div class="mt-16 grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-3"> |
| 54 | + { |
| 55 | + posts.map((post) => ( |
| 56 | + <BlogCard |
| 57 | + url={`/research/${post.id}`} |
| 58 | + title={post.data.title} |
| 59 | + description={post.data.description} |
| 60 | + image={post.data.image} |
| 61 | + author={post.data.author} |
| 62 | + date={post.data.date.toLocaleDateString()} |
| 63 | + tags={post.data.tags} |
| 64 | + /> |
| 65 | + )) |
| 66 | + } |
| 67 | + </div> |
| 68 | + </section> |
| 69 | + </main> |
| 70 | +</BaseLayout> |
0 commit comments