@@ -9,33 +9,47 @@ import { LookingForMore } from "./looking-for-more"
9
9
import { BlogMdxContent } from "./mdx-types"
10
10
import { FeaturedBlogPosts } from "./featured-blog-posts"
11
11
import { StripesDecoration } from "../../app/conf/_design-system/stripes-decoration"
12
+ import clsx from "clsx"
12
13
13
14
const mask = `url(${ new URL ( "./blur-bean.webp" , import . meta. url ) . href } )`
14
15
15
16
export interface BlogPageProps {
16
17
tags : Record < string , number >
17
18
blogs : BlogMdxContent [ ]
18
19
currentTag : string
20
+ hideFeaturedPosts ?: boolean
19
21
}
20
22
21
- export function BlogPage ( { tags, blogs, currentTag } : BlogPageProps ) {
23
+ export function BlogPage ( {
24
+ tags,
25
+ blogs,
26
+ currentTag,
27
+ hideFeaturedPosts,
28
+ } : BlogPageProps ) {
22
29
return (
23
30
< main className = "gql-all-anchors-focusable bg-neu-0" >
24
31
< div className = "relative top-[calc(var(--nextra-navbar-height)*-1)] bg-gradient-to-b from-sec-base to-neu-0 pt-[var(--nextra-navbar-height)] dark:from-sec-darker" >
25
- < Stripes />
32
+ < Stripes
33
+ className = {
34
+ hideFeaturedPosts ? "opacity-20 ![mask-position:top]" : undefined
35
+ }
36
+ />
26
37
< header className = "gql-container gql-section max-sm:pb-0 lg:pt-24" >
27
38
< h1 className = "typography-h1 text-center" > The GraphQL Blog</ h1 >
28
39
< p className = "typography-body-sm mt-4 text-center lg:mt-8" >
29
40
Insights, updates and best practices from across the GraphQL
30
41
community. Stay connected with the ideas and innovations shaping the
31
42
GraphQL ecosystem.
32
43
</ p >
33
- < FeaturedBlogPosts
34
- blogs = { blogs }
35
- className = "mt-4 max-sm:pb-0 lg:mt-24"
36
- />
44
+ { ! hideFeaturedPosts && (
45
+ < FeaturedBlogPosts
46
+ blogs = { blogs }
47
+ className = "mt-4 max-sm:pb-0 lg:mt-24"
48
+ />
49
+ ) }
37
50
</ header >
38
51
</ div >
52
+
39
53
< div className = "gql-container" >
40
54
< div className = "gql-section max-sm:pt-0" >
41
55
< section className = "flex justify-between gap-2 max-sm:flex-col sm:items-end" >
@@ -79,11 +93,14 @@ export function BlogPage({ tags, blogs, currentTag }: BlogPageProps) {
79
93
)
80
94
}
81
95
82
- function Stripes ( ) {
96
+ function Stripes ( { className } : { className ?: string } ) {
83
97
return (
84
98
< div
85
99
role = "presentation"
86
- className = "pointer-events-none absolute inset-0 max-sm:[mask-position:left_top]"
100
+ className = { clsx (
101
+ "pointer-events-none absolute inset-0 max-sm:[mask-position:left_top]" ,
102
+ className ,
103
+ ) }
87
104
style = { {
88
105
maskImage : mask ,
89
106
WebkitMaskImage : mask ,
0 commit comments