From b9c71c0ac86c33644fa38d3bf808dee4958ee534 Mon Sep 17 00:00:00 2001 From: phthallo Date: Thu, 23 Jan 2025 12:41:29 -0500 Subject: [PATCH] feat: overlapping screens - add: user profiles for cac winners - add: exclamation sticker but actually on the button this time --- .../customButton.js | 6 +- .../congressional-app-challenge/polaroid.js | 2 +- .../congressional-app-challenge/screen.js | 17 +++-- .../userProfile.js | 19 ++++++ pages/congressional-app-challenge.js | 67 ++++++++++++++----- 5 files changed, 88 insertions(+), 23 deletions(-) create mode 100644 components/congressional-app-challenge/userProfile.js diff --git a/components/congressional-app-challenge/customButton.js b/components/congressional-app-challenge/customButton.js index 616dc5c1..4bd68d46 100644 --- a/components/congressional-app-challenge/customButton.js +++ b/components/congressional-app-challenge/customButton.js @@ -4,7 +4,8 @@ export default function CustomButton({ link, color, textColor, // 🤓 - sxProps + sxProps, + children }){ return ( + )} \ No newline at end of file diff --git a/components/congressional-app-challenge/polaroid.js b/components/congressional-app-challenge/polaroid.js index 1e7ff8c1..e1e81d95 100644 --- a/components/congressional-app-challenge/polaroid.js +++ b/components/congressional-app-challenge/polaroid.js @@ -8,7 +8,7 @@ export default function Polaroid({ return ( - + {caption} diff --git a/components/congressional-app-challenge/screen.js b/components/congressional-app-challenge/screen.js index 95376096..38480ded 100644 --- a/components/congressional-app-challenge/screen.js +++ b/components/congressional-app-challenge/screen.js @@ -1,11 +1,13 @@ import { Box, Text, Image, Link } from 'theme-ui' -const Screen = ({ backgroundImage }) => { +const Screen = ({ backgroundImage, title, sxProps, children, expand }) => { let color = backgroundImage ? "" : "#fff" + let expan = expand ? ["100%", null, null, '58vh'] : "58vh" + let props = Object.assign({},{display: "flex", flexDirection: "column", width: ["100%", null, null, "55%"]}, sxProps ) return ( - + { paddingX: 2, height: "80%" }}> - Hack Club - Congressional App Challenge + {title} { borderLeft: "2px solid", borderRight: "2px solid", borderRadius: "0 0 6px 6px", - height:'58vh', + padding: 3, + height: expan, backgroundImage: `url(${backgroundImage})`, - backgroundSize: "cover"}}/> + backgroundSize: "cover"}}> + {children} + ) } diff --git a/components/congressional-app-challenge/userProfile.js b/components/congressional-app-challenge/userProfile.js new file mode 100644 index 00000000..569f4088 --- /dev/null +++ b/components/congressional-app-challenge/userProfile.js @@ -0,0 +1,19 @@ +import { Box, Image, Text } from 'theme-ui' + +export default function UserProfile({ + image, + name, + age, + state, + description +}){ + return ( + + + + {name} ({age}, {state}) + {description} + + + ) +} \ No newline at end of file diff --git a/pages/congressional-app-challenge.js b/pages/congressional-app-challenge.js index ba9c3289..818f7996 100644 --- a/pages/congressional-app-challenge.js +++ b/pages/congressional-app-challenge.js @@ -15,6 +15,7 @@ import Footer from '../components/footer' import Screen from '../components/congressional-app-challenge/screen' import CustomButton from '../components/congressional-app-challenge/customButton' import Polaroid from '../components/congressional-app-challenge/polaroid' +import UserProfile from '../components/congressional-app-challenge/userProfile' import ForceTheme from '../components/force-theme' const styled = ` @@ -104,9 +105,9 @@ function Page({ display: "flex", flexDirection: ["column", null, null, "row"], justifyContent: "center", alignItems: "space-between", - mx: "5", + mx: ["4", null, "5"], }}> - + @@ -116,8 +117,9 @@ function Page({ Hack Club presents the Congressional App Challenge - - + + + @@ -127,7 +129,7 @@ function Page({ @@ -138,9 +140,6 @@ function Page({ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - - - @@ -150,11 +149,11 @@ function Page({ + sxProps={{transform: 'rotate(12deg)', zIndex: 1, position: 'absolute', top: -3, left: [4, 160, 300, 20]}}/> + sxProps={{transform: 'rotate(350deg)', zIndex: 0, position: 'absolute', top: -3, left: [4,30, 220, 6]}}/> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. @@ -162,20 +161,58 @@ function Page({ - - + + Meet past winners - + + + + + + + + + + + + + + - submissions for the 2025 Congressional App Challenge close + submissions for the 2025 Congressional App Challenge close What are you waiting for?