Skip to content

Commit 2723753

Browse files
authored
Add in scraps (#1833)
adding in scraps
1 parent 58c5fd3 commit 2723753

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-0
lines changed

components/index/cards/scraps.js

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
import CardModel from './card-model'
2+
import { Box, Image, Text } from 'theme-ui'
3+
4+
/** @jsxImportSource theme-ui */
5+
6+
export default function Scraps() {
7+
return (
8+
<CardModel
9+
color="black"
10+
sx={{
11+
background: 'white',
12+
borderRadius: '16px',
13+
border: '4px solid black',
14+
boxShadow: 'none',
15+
position: 'relative',
16+
overflow: 'hidden'
17+
}}
18+
position={[null, 'bottom', 'bottom']}
19+
visible={true}
20+
>
21+
<Image
22+
alt="scraps dino"
23+
src="https://scraps.hackclub.com/hero.png"
24+
sx={{
25+
position: 'absolute',
26+
top: 0,
27+
right: 0,
28+
height: '100%',
29+
width: 'auto',
30+
objectFit: 'contain',
31+
display: ['none', 'none', 'block', 'block'],
32+
zIndex: 1
33+
}}
34+
/>
35+
<Box
36+
sx={{
37+
position: 'relative',
38+
zIndex: 2,
39+
paddingInline: '50px',
40+
maxWidth: ['100%', '100%', '50%']
41+
}}
42+
>
43+
<Text
44+
as="h1"
45+
sx={{
46+
fontFamily: 'system-ui, -apple-system, sans-serif',
47+
fontSize: ['48px', '64px'],
48+
fontWeight: 'bold',
49+
mb: 2,
50+
display: 'block',
51+
textAlign: 'left',
52+
textDecoration: 'none'
53+
}}
54+
>
55+
scraps
56+
</Text>
57+
58+
<Text
59+
variant="subtitle"
60+
sx={{
61+
fontFamily: 'system-ui, -apple-system, sans-serif',
62+
color: 'black',
63+
fontSize: ['16px', '18px'],
64+
fontWeight: 'normal',
65+
lineHeight: 1.5,
66+
mb: 1,
67+
display: 'block',
68+
textAlign: 'left'
69+
}}
70+
>
71+
<strong>ys:</strong> any project (silly, nonsensical, or fun)
72+
</Text>
73+
<Text
74+
variant="subtitle"
75+
sx={{
76+
fontFamily: 'system-ui, -apple-system, sans-serif',
77+
color: 'black',
78+
fontSize: ['16px', '18px'],
79+
fontWeight: 'normal',
80+
lineHeight: 1.5,
81+
mb: 3,
82+
display: 'block',
83+
textAlign: 'left'
84+
}}
85+
>
86+
<strong>ws:</strong> a chance to win something amazing (including rare
87+
stickers)
88+
</Text>
89+
<a
90+
href="https://scraps.hackclub.com/?utm_source=site-card"
91+
style={{
92+
display: 'inline-flex',
93+
alignItems: 'center',
94+
gap: '8px',
95+
background: 'black',
96+
color: 'white',
97+
border: 'none',
98+
borderRadius: '9999px',
99+
padding: '12px 32px',
100+
fontWeight: 'bold',
101+
cursor: 'pointer',
102+
fontSize: '16px',
103+
textDecoration: 'none'
104+
}}
105+
>
106+
<svg
107+
xmlns="http://www.w3.org/2000/svg"
108+
width="18"
109+
height="18"
110+
viewBox="0 0 24 24"
111+
fill="none"
112+
stroke="currentColor"
113+
strokeWidth="2"
114+
strokeLinecap="round"
115+
strokeLinejoin="round"
116+
>
117+
<path d="M12 12V4a1 1 0 0 1 1-1h6.297a1 1 0 0 1 .651 1.759l-4.696 4.025" />
118+
<path d="m12 21-7.414-7.414A2 2 0 0 1 4 12.172V6.415a1.002 1.002 0 0 1 1.707-.707L20 20.009" />
119+
<path d="m12.214 3.381 8.414 14.966a1 1 0 0 1-.167 1.199l-1.168 1.163a1 1 0 0 1-.706.291H6.351a1 1 0 0 1-.625-.219L3.25 18.8a1 1 0 0 1 .631-1.781l4.165.027" />
120+
</svg>
121+
start scrapping
122+
</a>
123+
</Box>
124+
</CardModel>
125+
)
126+
}

lib/carousel.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@
3434
"link": "https://flagship.hackclub.com/?utm_source=c-carousel",
3535
"tag": "Game Jam"
3636
},
37+
{
38+
"background": "white",
39+
"titleColor": "black",
40+
"descriptionColor": "black",
41+
"title": "scraps",
42+
"description": "ship any project (silly, nonsensical, or fun) and win random items from HQ, including rare stickers!",
43+
"img": "https://raw.githubusercontent.com/hackclub/scraps/refs/heads/main/frontend/static/icon.png",
44+
"link": "https://scraps.hackclub.com/?utm_source=site-carousel"
45+
},
3746
{
3847
"background": "white",
3948
"titleColor": "black",

pages/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import CampfireFlagship from '../components/index/cards/campfire-flagship'
4444
import Milkyway from '../components/index/cards/milkyway'
4545
import Flavortown from '../components/index/cards/flavortown'
4646
import Flavorless from '../components/index/cards/flavorless'
47+
import Scraps from '../components/index/cards/scraps'
4748
import Aces from '../components/index/cards/aces'
4849
import CTAS from '../components/index/ctas'
4950
/** @jsxImportSource theme-ui */
@@ -860,6 +861,7 @@ function Page({
860861
stars={stars.onboard.stargazerCount}
861862
/>
862863
<CampfireFlagship />
864+
<Scraps />
863865
<Milkyway />
864866
<Aces />
865867
<Flavorless />

0 commit comments

Comments
 (0)