Skip to content

Commit ff3c196

Browse files
authored
UI/sponsors (#233)
1 parent 3f00fa0 commit ff3c196

File tree

3 files changed

+54
-31
lines changed

3 files changed

+54
-31
lines changed

pages/sponsors/[id].tsx

+48-30
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,21 @@ const Hero = styled.section`
5353
width: 100vw;
5454
max-width: 1400px;
5555
margin: 0 auto;
56-
z-index: 3;
57-
height: calc(100vh - 150px);
56+
z-index: 1;
57+
min-height: calc(100vh - 150px);
5858
display: flex;
5959
align-items: center;
6060
flex-direction: column;
61-
justify-content: space-around;
62-
margin-bottom: 100px;
61+
padding-top: 4rem;
62+
justify-content: flex-start;
63+
position: relative;
6364
`;
6465

6566
const HeroInfo = styled.div`
6667
margin: 0 auto;
6768
width: 90%;
6869
max-width: 800px;
69-
padding: 32px;
70+
padding: 16px;
7071
text-align: center;
7172
font-size: 20px;
7273
`;
@@ -88,6 +89,20 @@ const Info = styled.div<{ color: string }>`
8889
}
8990
}
9091
`;
92+
93+
const SponsorContainer = styled.div`
94+
padding-bottom: 5rem;
95+
display: flex;
96+
justify-content: center;
97+
align-items: center;
98+
gap: 2rem;
99+
flex-direction: column;
100+
overflow-y: scroll;
101+
@media (min-width: ${ViewportSizes.Phone}px) {
102+
justify-content: flex-start;
103+
}
104+
`;
105+
91106
const Sponsor = (props: SponsorProps) => {
92107
const {
93108
items: [sponsor],
@@ -105,34 +120,37 @@ const Sponsor = (props: SponsorProps) => {
105120
color={colors.effectColors}
106121
shape="circle"
107122
configuration="sponsors"
123+
fullScreen={true}
108124
/>
109125
<Hero>
110126
<HeroInfo style={{ zIndex: "5" }}>
111-
<div>
112-
<Link
113-
rel="preconnect"
114-
href={sponsor?.externalLink ?? ""}
115-
passHref
116-
>
117-
<a target="_blank">
118-
<img
119-
alt={sponsor?.name ?? ""}
120-
src={sponsor?.image?.url!}
121-
style={{ maxWidth: "400px" }}
122-
/>
123-
</a>
124-
</Link>
125-
</div>
126-
<Info color={colors.textColor}>
127-
<Description data={sponsor?.description?.json} />
128-
<Link
129-
rel="preconnect"
130-
href={sponsor?.externalLink ?? ""}
131-
passHref
132-
>
133-
<a target="_blank">Ir a su página</a>
134-
</Link>
135-
</Info>
127+
<SponsorContainer>
128+
<div>
129+
<Link
130+
rel="preconnect"
131+
href={sponsor?.externalLink ?? ""}
132+
passHref
133+
>
134+
<a target="_blank">
135+
<img
136+
alt={sponsor?.name ?? ""}
137+
src={sponsor?.image?.url!}
138+
style={{ width: "100%", maxWidth: "400px" }}
139+
/>
140+
</a>
141+
</Link>
142+
</div>
143+
<Info color={colors.textColor}>
144+
<Description data={sponsor?.description?.json} />
145+
<Link
146+
rel="preconnect"
147+
href={sponsor?.externalLink ?? ""}
148+
passHref
149+
>
150+
<a target="_blank">Ir a su página</a>
151+
</Link>
152+
</Info>
153+
</SponsorContainer>
136154
</HeroInfo>
137155
</Hero>
138156
</Suspense>

src/Components/Particles.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ interface ParticleProps {
1414
color?: string | string[];
1515
shape?: string;
1616
configuration?: string;
17+
fullScreen?: boolean;
1718
}
1819

1920
const ParticleComponent = ({
@@ -22,6 +23,7 @@ const ParticleComponent = ({
2223
color = [transparentize(0.5, jsconfTheme.colors.jsconfBlack)],
2324
shape = "polygon",
2425
configuration = "jsconf",
26+
fullScreen = false,
2527
}: ParticleProps) => {
2628
const particlesInit = async (main: Engine) => {
2729
await loadFull(main);
@@ -33,6 +35,7 @@ const ParticleComponent = ({
3335
backgroundColor,
3436
color: finalColor,
3537
shape,
38+
fullScreen,
3639
});
3740

3841
return (

src/Components/sections/config.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ export const makeConfig = ({
237237
color = [transparentize(0.5, jsconfTheme.colors.jsconfBlack)],
238238
shape = "polygon",
239239
configuration = "jsconf",
240+
fullScreen = false,
240241
}): any => {
241242
const base =
242243
{
@@ -248,6 +249,7 @@ export const makeConfig = ({
248249
configs.background.color.value = backgroundColor;
249250
configs.particles.color.value = color;
250251
configs.particles.shape.type = shape;
251-
configs.fullScreen = false;
252+
configs.fullScreen = fullScreen;
253+
252254
return configs;
253255
};

0 commit comments

Comments
 (0)