Skip to content

Commit 1b3a532

Browse files
committed
fix featured cards
1 parent 16a185a commit 1b3a532

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

src/components/FeaturedCarousel.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import { ArrowRightIcon } from "lucide-react";
1010
import { Card, CardContent } from "@components/ui/card";
1111
import { Button } from "./ui/button";
1212

13-
const PLACEHOLDER_IMAGES = ["/thumbnails/placeholder-1.png", "/thumbnails/placeholder-2.png"];
13+
const PLACEHOLDER_IMAGES = [
14+
"/thumbnails/placeholder-1.png",
15+
"/thumbnails/placeholder-2.png",
16+
];
1417

1518
const FeaturedCarousel = ({ entries }: any) => {
1619
return (
@@ -26,9 +29,13 @@ const FeaturedCarousel = ({ entries }: any) => {
2629
{entries.map((entry: any) => {
2730
return (
2831
<CarouselItem key={entry.id} className="lg:basis-1/3 sm:basis-1/2">
29-
<Card className="h-full hover:shadow-md group shadow transition-all duration-300 mb-1 overflow-hidden">
32+
<Card className="h-full bg-gradient-to-r from-primary/5 to-primary/5 via-background border-primary/10 cursor-pointer hover:border-primary/30 hover:shadow-md group shadow transition-all duration-300 mb-1 overflow-hidden">
3033
<img
31-
src={entry.data.Images && entry.data.Images.length > 0 ? entry.data.Images[0] : PLACEHOLDER_IMAGES[0]}
34+
src={
35+
entry.data.Images && entry.data.Images.length > 0
36+
? entry.data.Images[0]
37+
: PLACEHOLDER_IMAGES[0]
38+
}
3239
width={400}
3340
height={500}
3441
alt={entry.data.Name}

src/components/spotlight.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import FeaturedCarousel from "./FeaturedCarousel";
44
import Container from "./container.astro";
55
66
const softwareEntries = await getCollection("software");
7+
8+
const featuredEntriestags = ["beeceptor", "keploy", "hatchfast"];
9+
10+
const featuredEntries = softwareEntries.filter((entry) =>
11+
featuredEntriestags.includes(entry.id)
12+
);
713
---
814

915
<Container>
@@ -22,7 +28,7 @@ const softwareEntries = await getCollection("software");
2228
introduced innovative features in the development process.
2329
</p>
2430
</div>
25-
<FeaturedCarousel entries={softwareEntries} client:visible />
31+
<FeaturedCarousel entries={featuredEntries} client:visible />
2632
</div>
2733
</section>
2834
</Container>

src/layouts/Layout.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { SEO } from "astro-seo";
33
import "@styles/globals.css";
44
import Footer from "@components/footer.astro";
55
import Navbar from "@components/navbar/navbar.astro";
6-
import "@fontsource-variable/inter/index.css";
76
import "@fontsource-variable/bricolage-grotesque";
87
import { ViewTransitions } from "astro:transitions";
98

0 commit comments

Comments
 (0)