Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add HSS styling #40

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified hackathon_site/dashboard/frontend/public/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion hackathon_site/dashboard/frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<link rel="stylesheet" type="text/css" charset="UTF-8" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css" />

<title>Hardware Dashboard</title>
<title>NewHacks 2023 HSS</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { ReactElement } from "react";
import { Box, Button, Divider, Grid, Link, Typography } from "@material-ui/core";
import AlertBox from "components/general/AlertBox/AlertBox";
import { hackathonName } from "constants.js";
import { hackathonName, server_url } from "constants.js";

export const UserAcceptanceMessage = ({
status,
handleGetStarted,
}: {
status: "Accepted" | "Waitlisted" | "Rejected" | "Incomplete";
status: "Accepted" | "Waitlisted" | "Rejected" | "Incomplete" | "NotStarted";
handleGetStarted(): any;
}) => {
const ACCEPTANCE_MESSAGES: {
Expand Down Expand Up @@ -50,9 +50,7 @@ export const UserAcceptanceMessage = ({
actionMessage: (
<Typography variant="h2" align="center">
Keep an eye out for your application status changes on your{" "}
<Link href={`${process.env.REACT_APP_DEV_SERVER_URL}/dashboard/`}>
Dashboard
</Link>
<Link href={`${server_url}/dashboard/`}>Dashboard</Link>
</Typography>
),
},
Expand All @@ -63,9 +61,7 @@ export const UserAcceptanceMessage = ({
<Typography variant="h2" align="center">
We still encourage you to apply for {hackathonName} next year! Keep
an eye out for your application status changes on your{" "}
<Link href={`${process.env.REACT_APP_DEV_SERVER_URL}/dashboard/`}>
Dashboard
</Link>
<Link href={`${server_url}/dashboard/`}>Dashboard</Link>
</Typography>
),
},
Expand All @@ -75,16 +71,21 @@ export const UserAcceptanceMessage = ({
actionMessage: (
<Typography variant="h2" align="center">
Please finish your application{" "}
<Link
href={`${process.env.REACT_APP_DEV_SERVER_URL}/registration/application/`}
>
here
</Link>{" "}
<Link href={`${server_url}/registration/application/`}>here</Link>{" "}
and view your application status{" "}
<Link href={`${process.env.REACT_APP_DEV_SERVER_URL}/dashboard/`}>
here
</Link>
.
<Link href={`${server_url}/dashboard/`}>here</Link>.
</Typography>
),
},
NotStarted: {
title: `Hardware Signout Site is not open yet`,
alertColor: "info",
actionMessage: (
<Typography variant="h2" align="center">
Please wait for further notice from us, See you soon! <br />
<br />
View your application status{" "}
<Link href={`${server_url}/dashboard/`}>here</Link>.
</Typography>
),
},
Expand All @@ -94,10 +95,12 @@ export const UserAcceptanceMessage = ({
<Typography variant="h1">{ACCEPTANCE_MESSAGES[status].title}</Typography>
<Grid container justifyContent="center">
<Grid item lg={4} md={4} sm={6} xs={12}>
<AlertBox
title={`Acceptance Status: ${status}`}
type={ACCEPTANCE_MESSAGES[status].alertColor}
/>
{status !== "NotStarted" && (
<AlertBox
title={`Acceptance Status: ${status}`}
type={ACCEPTANCE_MESSAGES[status].alertColor}
/>
)}
</Grid>
</Grid>
<Divider style={{ margin: "20px 0px" }} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ const HackathonTitle = () => (
<>
<Logo
className={styles.headerLogoImg}
alt="Hackathon logo"
alt="NewHacks logo"
data-testid="headerLogo"
/>
<Typography variant="h6" data-testid="hackathonName">
<Typography
variant="h6"
data-testid="hackathonName"
className={styles.headerLogoTitle}
>
{hackathonName}
</Typography>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@
&Logo {
display: flex;
&Img {
height: 30px;
height: 40px;

@include responsive(sm-down) {
height: 30px;
margin-top: 3px;
}
}
&Title {
margin: 2px 0 0 -50px;

@include responsive(sm-down) {
margin-left: -65px;
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions hackathon_site/dashboard/frontend/src/constants.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const hackathonName = "Hackathon Name";
export const hackathonName = "NewHacks 2023";
export const adminGroup = "Hardware Site Admins";
export const minTeamSize = 2;
export const maxTeamSize = 4;
export const hardwareSignOutStartDate = new Date(2020, 9, 1, 23, 59);
export const hardwareSignOutEndDate = new Date(2023, 9, 30, 11, 59);
export const hardwareSignOutEndDate = new Date(2024, 9, 30, 11, 59);
export const hssTestUserGroup = "HSS Test Users";
export const server_url = "https://newhacks.ca";
50 changes: 44 additions & 6 deletions hackathon_site/dashboard/frontend/src/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ const Acknowledgement = () => {
} = useSelector(createProfileSelector);
const userDoesNotHaveRole = userType === "none";
const [showAcknowledgements, setShowAcknowledgements] = useState(false);
const [signoutNotStarted, setSignoutNotStarted] = useState(false);

useEffect(() => {
const today = new Date();
if (hardwareSignOutStartDate > today) {
setSignoutNotStarted(true);
push("/404");
} else if (userDoesNotHaveRole) {
setSignoutNotStarted(false);
dispatch(fetchUserAcceptanceStatus());
}
}, [dispatch, userDoesNotHaveRole]);
Expand All @@ -73,6 +76,8 @@ const Acknowledgement = () => {
status={
isTestUser
? "Accepted"
: signoutNotStarted
? "NotStarted"
: acceptanceUser?.review_status === "None" ||
!acceptanceUser?.review_status
? "Incomplete"
Expand Down Expand Up @@ -115,14 +120,16 @@ const SuccessMessage = () => {
<Grid container justifyContent="center">
<Grid item lg={6} xs={12}>
<Card style={{ padding: "15px 5px" }}>
<Typography style={{ fontSize: "25px" }} align="center">
{`${user?.first_name
.charAt(0)
.toUpperCase()}${user?.first_name.substring(
1
)}, you're ready to get started. We've placed you in Team ${
profile?.team
} but you can leave and join another team anytime.`}
<Typography
style={{ fontSize: "25px", padding: "15px" }}
align="center"
>
🎉 {user?.first_name.charAt(0).toUpperCase()}
{user?.first_name.substring(1)}, you're ready to get started.
<br />
We've placed you in Team <strong>{profile?.team}</strong>
<br />
You can leave and join another team anytime.
</Typography>
<Box
style={{
Expand Down
Loading