diff --git a/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.css b/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.css index 793674f..1f49d5e 100644 --- a/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.css +++ b/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.css @@ -1,3 +1,4 @@ #JoinClub div { - background-color: green; + /* background-color: green; */ + width: auto; } diff --git a/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.js b/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.js index f3edc05..b1b1736 100644 --- a/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.js +++ b/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.js @@ -1,27 +1,56 @@ import CountDownTimer from "../../CountDown/CountDownTimer.js"; import "./JoinTheClub.css"; +import "./messageToDisplayAfter.css"; /** - * @param {Object} inputVar - one argument into the function should be its name - * @param {number} b - one argument into the function should be its name - * @returns {Promise} c - what the program returns with type - * @description A brief description of what the function does - * @author Name -//semi-perminant email, do not need to respond but try to be a good alumni + * @param {null} null - requires nothing + * @returns {React.JSX.Element} page - returns the page content + * @description Recuitment Page on our website + * @author Brock + * @todo css */ const JoinTheClub = () => { - const recuitmentDate = new Date(2024, 9, 17, 0, 0, 0, 0).getTime(); - //september 17 2024 + const recuitmentDate = new Date(2024, 9, 17, 0, 0, 0, 0).getTime(); //september 17 2024 return (
-

Hello World

+ {recuitmentDate && ( +

+ We Currently are not recuiting please check back when this timer is + finished +

+ )}
); }; +/** + * @param {null} null - requires nothing + * @returns {React.JSX.Element} page - component that is displayed after timer is finished + * @description shows recuitment link + * @author Brock + */ +const messageToDisplayAfter = () => { + return ( +
+

Recuitment Form is OPEN!

+

Appy using the link below

+ + QR Code for Jotform form +

Apply Here!

+
+
+ ); +}; + export default JoinTheClub; diff --git a/src/Club Membership & Upcoming Events/JoinTheClub/messageToDisplayAfter.css b/src/Club Membership & Upcoming Events/JoinTheClub/messageToDisplayAfter.css new file mode 100644 index 0000000..2c6bbca --- /dev/null +++ b/src/Club Membership & Upcoming Events/JoinTheClub/messageToDisplayAfter.css @@ -0,0 +1,8 @@ +#message img { + max-width: 200px; +} + +#message a { + /* text-align: center; */ + width: auto; +} diff --git a/src/CountDown/CountDownTimer.css b/src/CountDown/CountDownTimer.css new file mode 100644 index 0000000..e074626 --- /dev/null +++ b/src/CountDown/CountDownTimer.css @@ -0,0 +1,50 @@ +#afterTime { + color: red; +} + +#counter { + display: flex; + flex-direction: row; + padding-left: 0.5rem; + padding-right: 0.5rem; + padding-top: 0.5rem; + text-align: center; + background-color: grey; +} + +#counter .countdown-link { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + font-weight: 700; + font-size: 1.25rem; + line-height: 1.75rem; + padding: 0.5rem; + border: 1px solid #ebebeb; + border-radius: 0.25rem; + text-decoration: none; + color: #000; +} + +#counter .countdown { + line-height: 1.25rem; + padding: 0 0.75rem 0 0.75rem; + align-items: center; + display: flex; + flex-direction: column; +} + +#counter .countdownDanger { + color: #ff0000; +} + +#counter .countdown p { + margin: 0; +} + +#counter .countdown span { + text-transform: uppercase; + font-size: 0.75rem; + line-height: 1rem; +} diff --git a/src/CountDown/CountDownTimer.js b/src/CountDown/CountDownTimer.js index fe2c19a..6444022 100644 --- a/src/CountDown/CountDownTimer.js +++ b/src/CountDown/CountDownTimer.js @@ -1,22 +1,38 @@ import { useEffect, useState } from "react"; +import "./CountDownTimer.css"; +/** + * @param {Date} dateFinished - Date object with time that it finishes Date(year, monthNumber, day, hour, minute, second) + * @param {React.JSX.Element} messageDisplayAfter - Message to display afterwards, + * @returns {React.JSX.Element} page - returns the page content + * @description A fun countdown timer of how many days, minutesz and seconds until x happens + * @author Brock + * @todo change messageDisplayAfter to take in another page + */ const CountDownTimer = ({ dateFinished, messageDisplayAfter }) => { const [days, hours, minutes, seconds] = useCountdown(dateFinished); if (days + hours + minutes + seconds <= 0) { return ( -
- {ShowCounter(days, hours, minutes, seconds)} -

{messageDisplayAfter}

+
+ + {messageDisplayAfter}
); } else { return ( - +
+ +
); } }; @@ -39,50 +55,56 @@ const useCountdown = (DateDone) => { }; const getReturnValues = (countDown) => { - const days = Math.floor(countDown / (1000 * 60 * 60 * 24)); - const hours = Math.floor( + let days = Math.floor(countDown / (1000 * 60 * 60 * 24)); + let hours = Math.floor( (countDown % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) ); - const minutes = Math.floor((countDown % (1000 * 60 * 60)) / (1000 * 60)); - const seconds = Math.floor((countDown % (1000 * 60)) / 1000); - + let minutes = Math.floor((countDown % (1000 * 60 * 60)) / (1000 * 60)); + let seconds = Math.floor((countDown % (1000 * 60)) / 1000); + if (days < 0) { + days = 0; + } + if (hours < 0) { + hours = 0; + } + if (minutes < 0) { + minutes = 0; + } + if (seconds < 0) { + seconds = 0; + } return [days, hours, minutes, seconds]; }; const ShowCounter = ({ days, hours, minutes, seconds }) => { - let danger = days <= 3; return ( -
+

:

:

:

); }; -const DateTimeDisplay = ({ valueAwayFrom, discriptor, isInDanger }) => { +const DateTimeDisplay = ({ valueAwayFrom, discriptor }) => { return ( -
+

{valueAwayFrom}

{discriptor}