Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 2311828

Browse files
committed
fix guide images
1 parent 99259d3 commit 2311828

File tree

5 files changed

+27
-4
lines changed

5 files changed

+27
-4
lines changed

contentlayer.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ const Featured = defineNestedType(() => ({
8484
fields: {
8585
image: {
8686
type: 'string',
87-
description: 'The featured image of the post, not the same as og image',
87+
description:
88+
'The featured image of the post, not the same as og image. Use 1024x1024 with transparent background.',
8889
required: true,
8990
},
9091
image_alt: {
-153 KB
Loading
-145 KB
Loading
-84.8 KB
Loading

src/components/guides/GuidesFeatured.tsx

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,35 @@ const GuidesFeatured: React.FC = ({ take = 3 }: { take?: number }) => {
2828
key={guide.slug}
2929
className="group relative isolate flex flex-col justify-end overflow-hidden rounded-lg bg-zinc-900 px-8 pb-8 pt-60"
3030
>
31+
<svg
32+
xmlns="http://www.w3.org/2000/svg"
33+
viewBox="0 0 1162 896"
34+
fill="none"
35+
className="absolute inset-0 top-1/4 -z-10 blur-2xl"
36+
>
37+
<g className="opacity-30">
38+
<g filter="url(#filter0_f_684_803)">
39+
<path
40+
d="M649.084 233.018C704.89 329.678 671.772 453.277 575.112 509.084C478.452 564.89 354.854 531.772 299.047 435.112C243.24 338.452 276.358 214.854 373.018 159.047C469.678 103.24 593.277 136.358 649.084 233.018Z"
41+
className="fill-secondary-400"
42+
/>
43+
</g>
44+
<g filter="url(#filter1_f_684_803)">
45+
<path
46+
d="M863.21 322.759C918.715 418.896 885.776 541.826 789.639 597.33C693.501 652.835 570.571 619.896 515.067 523.759C459.562 427.622 492.501 304.692 588.638 249.187C684.775 193.682 807.705 226.621 863.21 322.759Z"
47+
fill="#2C40F7"
48+
className="fill-primary-400"
49+
/>
50+
</g>
51+
</g>
52+
</svg>
3153
<Image
3254
alt={guide.featured.image_alt}
3355
src={guide.featured.image}
34-
fill
35-
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
3656
priority
37-
className="absolute inset-0 -z-10 h-full w-full object-cover"
57+
fill
58+
sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"
59+
className="absolute inset-0 -z-10 h-full object-contain"
3860
/>
3961
<div className="absolute inset-0 -z-10 bg-gradient-to-t from-primary-400/60 via-secondary-400/30 to-primary-500/40 dark:from-primary-800/60 dark:via-secondary-800/20 dark:to-primary-900/50" />
4062
<div className="absolute inset-0 -z-10 rounded-2xl ring-1 ring-inset ring-primary-500/10 dark:ring-primary-900/10" />

0 commit comments

Comments
 (0)