@@ -4,28 +4,25 @@ import { CalendarIcon } from "../../pixelarticons/calendar-icon"
4
4
import { PinIcon } from "../../pixelarticons/pin-icon"
5
5
import { GET_TICKETS_LINK } from "../../links"
6
6
import { Button } from "../../../_design-system/button"
7
- import linesPng from "./lines.png"
8
7
import graphqlFoundationWordmarkSvg from "../../assets/graphql-foundation-wordmark.svg"
8
+ import heroPhoto from "./hero-photo.jpeg"
9
+ import blurBean from "./blur-bean-cropped.webp"
10
+
11
+ // - the background is made of even and odd stripes every 12px and a mask
12
+ // - i can have two divs with repeating background image and a mask
9
13
10
14
export function Hero ( ) {
11
15
return (
12
- < section className = "bg-pri-base dark:bg-pri-darker text-neu-0 dark:text-neu-900 isolate flex flex-col justify-center" >
13
- < div className = "relative flex flex-col gap-12 p-4 pt-6 md:gap-12 md:bg-left md:px-24 xl:pb-16 xl:pt-24" >
14
- < div
15
- className = "pointer-events-none absolute inset-0 max-md:rotate-180 md:bg-left"
16
- style = { {
17
- // todo: consider recreating this in CSS, so we can animate
18
- backgroundImage : `url(http://github.com/%3Cspan%20class=pl-s1%3E%3Cspan%20class=pl-kos%3E$%7B%3C/span%3E%3Cspan%20class=pl-s1%3ElinesPng%3C/span%3E%3Cspan%20class=pl-kos%3E.%3C/span%3E%3Cspan%20class=pl-c1%3Esrc%3C/span%3E%3Cspan%20class=pl-kos%3E%7D%3C/span%3E%3C/span%3E)` ,
19
- backgroundSize : "cover" ,
20
- } }
21
- />
22
- < div className = "z-10 flex gap-10 max-md:flex-col md:justify-between" >
23
- < h1 className = "typography-d1 flex flex-wrap gap-2" >
16
+ < section className = "isolate flex flex-col justify-center bg-pri-base text-neu-0 dark:bg-pri-darker dark:text-neu-900" >
17
+ < div className = "relative mx-auto flex w-[90rem] max-w-full flex-col gap-12 overflow-hidden p-4 pt-6 md:gap-12 md:bg-left md:px-24 xl:pb-16 xl:pt-24" >
18
+ < Stripes />
19
+ < div className = "flex gap-10 max-md:flex-col md:justify-between" >
20
+ < h1 className = "flex flex-wrap gap-2 typography-d1" >
24
21
< span > GraphQLConf</ span >
25
22
< span className = "text-sec-base" > 2025</ span >
26
23
</ h1 >
27
24
< div className = "flex h-min items-center gap-4" >
28
- < span className = "typography-body-sm whitespace-pre " > hosted by</ span >
25
+ < span className = "whitespace-pre typography-body-sm" > hosted by</ span >
29
26
< img
30
27
src = { graphqlFoundationWordmarkSvg . src }
31
28
alt = "GraphQL Foundation"
@@ -42,6 +39,15 @@ export function Hero() {
42
39
</ Button >
43
40
</ div >
44
41
</ div >
42
+ < div className = "bg-[#000]" >
43
+ < Image
44
+ src = { heroPhoto }
45
+ width = { 1920 }
46
+ height = { 560 }
47
+ alt = "five speakers at GraphQLConf 2024"
48
+ className = "mx-auto h-[560px] w-[1920px] max-w-full object-cover"
49
+ />
50
+ </ div >
45
51
</ section >
46
52
)
47
53
}
@@ -57,10 +63,60 @@ function DateAndLocation() {
57
63
</ div >
58
64
< div className = "flex items-center gap-2" >
59
65
< PinIcon className = "size-6" />
60
- < address className = "typography-body-md not-italic " >
66
+ < address className = "not-italic typography-body-md" >
61
67
Amsterdam, Netherlands
62
68
</ address >
63
69
</ div >
64
70
</ div >
65
71
)
66
72
}
73
+
74
+ function Stripes ( ) {
75
+ const maskEven =
76
+ "repeating-linear-gradient(to right, transparent, transparent 12px, black 12px, black 24px)"
77
+ const maskOdd =
78
+ "repeating-linear-gradient(to right, black, black 12px, transparent 12px, transparent 24px)"
79
+
80
+ // TODO: dark mode:
81
+ // background: linear-gradient(180deg, var(--Primary-Dark, #990069) 0%, #660046 100%);
82
+ // ^ the same one as with base
83
+ // background: linear-gradient(180deg, #990069 0%, var(--Primary-Dark, #990069) 100%);
84
+ // ^ the same one as with light
85
+
86
+ return (
87
+ < div
88
+ role = "presentation"
89
+ className = "pointer-events-none absolute inset-x-0 bottom-[-385px] top-[-203px] -z-10"
90
+ // todo: animate opacity up after the image is loaded
91
+ style = { {
92
+ maskImage : `url(http://github.com/%3Cspan%20class=pl-s1%3E%3Cspan%20class=pl-kos%3E$%7B%3C/span%3E%3Cspan%20class=pl-s1%3EblurBean%3C/span%3E%3Cspan%20class=pl-kos%3E.%3C/span%3E%3Cspan%20class=pl-c1%3Esrc%3C/span%3E%3Cspan%20class=pl-kos%3E%7D%3C/span%3E%3C/span%3E)` ,
93
+ WebkitMaskImage : `url(http://github.com/%3Cspan%20class=pl-s1%3E%3Cspan%20class=pl-kos%3E$%7B%3C/span%3E%3Cspan%20class=pl-s1%3EblurBean%3C/span%3E%3Cspan%20class=pl-kos%3E.%3C/span%3E%3Cspan%20class=pl-c1%3Esrc%3C/span%3E%3Cspan%20class=pl-kos%3E%7D%3C/span%3E%3C/span%3E)` ,
94
+ maskSize : "100%" ,
95
+ WebkitMaskSize : "100%" ,
96
+ maskRepeat : "no-repeat" ,
97
+ WebkitMaskRepeat : "no-repeat" ,
98
+ maskPosition : "center" ,
99
+ WebkitMaskPosition : "center" ,
100
+ } }
101
+ >
102
+ < div
103
+ className = "absolute inset-0"
104
+ style = { {
105
+ background :
106
+ "linear-gradient(180deg, hsl(var(--color-pri-light)) 0%, hsl(319deg, 100%, 90%, 0.4) 100%)" ,
107
+ maskImage : maskEven ,
108
+ WebkitMaskImage : maskEven ,
109
+ } }
110
+ />
111
+ < div
112
+ className = "absolute inset-0"
113
+ style = { {
114
+ background :
115
+ "linear-gradient(180deg, hsl(319deg, 100%, 90%, 0.2) 0%, hsl(var(--color-pri-base)) 100%)" ,
116
+ maskImage : maskOdd ,
117
+ WebkitMaskImage : maskOdd ,
118
+ } }
119
+ />
120
+ </ div >
121
+ )
122
+ }
0 commit comments