Skip to content

Commit

Permalink
update front page, add taglines to events
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanLyon committed Jan 22, 2024
1 parent 2d66e00 commit 10e405e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 10 deletions.
19 changes: 16 additions & 3 deletions apps/nextjs/components/ComponentBlocks/event-page.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import './colors.scss';
@import './responsive.scss';
@import "./colors.scss";
@import "./responsive.scss";

.header {
background-position: center;
Expand All @@ -9,6 +9,7 @@
// background-color: #024759;
width: 100%;
min-height: 25rem;
padding: 3rem 0;

@include breakpoint($sm-zero-only) {
// height: 20rem;
Expand All @@ -25,14 +26,26 @@
.logo {
width: 700px;
height: 150px;
margin-bottom: 32px;
position: relative;

@include breakpoint($sm-zero-only) {
width: 80%;
}
}

.taglines {
display: flex;
flex-direction: column;
justify-content: center;
color: $light-text;
margin-bottom: 32px;

h1 {
font-size: 3rem;
margin: 0;
}
}

.buttons {
display: grid;
grid-template-columns: 1fr 1fr;
Expand Down
11 changes: 6 additions & 5 deletions apps/nextjs/components/ComponentBlocks/event-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export const EventComponentRenderers: EventPageRenderers = {
fill
/>
</div>
<div className={styles.taglines}>
{props.taglines?.map((tagline) => (
<h1>{tagline}</h1>
))}
</div>
<div className={styles.buttons}>
{props.donateLink && <Button actionText="Donate" link={props.donateLink} openInNewTab />}

Expand Down Expand Up @@ -60,11 +65,7 @@ export const EventComponentRenderers: EventPageRenderers = {
)}

{props.buttons.map((button) => (
<Button
actionText={button.text}
link={button.link}
openInNewTab={button.openInNewTab}
/>
<Button actionText={button.text} link={button.link} openInNewTab={button.openInNewTab} />
))}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

p {
max-width: 400px;
text-wrap: balance;
}

.countdown {
Expand Down
3 changes: 1 addition & 2 deletions apps/nextjs/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ export default function Home() {
}}
eventB={{
event: ASDH2024,
tagLine: "AusSpeedruns will be at Dreamhack for a special event. More information soon",
dontShowEventPage: true,
tagLine: "We are excited to be at Dreamhack Australia!",
}}
/>
<LastEventBlock
Expand Down
7 changes: 7 additions & 0 deletions libs/component-blocks/component-blocks/src/lib/event-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ export const EventPageComponentBlocks = {
<HeaderLogo>
<EventLogo src={props.fields.event?.value?.data?.logo ?? ""} alt="Logo" />
</HeaderLogo>
<div style={{ display: "flex", flexDirection: "column" }}>
{props.fields.taglines.elements.map((tagline) => (
<h2>{tagline.value}</h2>
))}
</div>
<ButtonContainer>
{props.fields.donateLink.value && (
<Button href={props.fields.donateLink.value} target="_blank" rel="noopener noreferrer">
Expand Down Expand Up @@ -262,8 +267,10 @@ export const EventPageComponentBlocks = {
label: "Open in new tab? ",
}),
}),
{ label: "Extra Buttons" },
),
darkModeLogo: fields.checkbox({ label: "Dark Mode Logo?" }),
taglines: fields.array(fields.text({ label: "Tagline" }), { label: "Taglines" }),
},
}),
imageParagraph: component({
Expand Down

0 comments on commit 10e405e

Please sign in to comment.