mirror of
https://github.com/UofCBaja/BajaUofCWebsite.git
synced 2025-06-16 05:44:17 -06:00
content to recuitment page
This commit is contained in:
parent
4cf8f309f1
commit
d7116b3819
@ -1,3 +1,4 @@
|
|||||||
#JoinClub div {
|
#JoinClub div {
|
||||||
background-color: green;
|
/* background-color: green; */
|
||||||
|
width: auto;
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,56 @@
|
|||||||
import CountDownTimer from "../../CountDown/CountDownTimer.js";
|
import CountDownTimer from "../../CountDown/CountDownTimer.js";
|
||||||
import "./JoinTheClub.css";
|
import "./JoinTheClub.css";
|
||||||
|
import "./messageToDisplayAfter.css";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} inputVar - one argument into the function should be its name
|
* @param {null} null - requires nothing
|
||||||
* @param {number} b - one argument into the function should be its name
|
* @returns {React.JSX.Element} page - returns the page content
|
||||||
* @returns {Promise<number>} c - what the program returns with type
|
* @description Recuitment Page on our website
|
||||||
* @description A brief description of what the function does
|
* @author Brock <darkicewolf50@gmail.com>
|
||||||
* @author Name <semiperminant@exmaplemail.com>
|
* @todo css
|
||||||
//semi-perminant email, do not need to respond but try to be a good alumni
|
|
||||||
*/
|
*/
|
||||||
const JoinTheClub = () => {
|
const JoinTheClub = () => {
|
||||||
const recuitmentDate = new Date(2024, 9, 17, 0, 0, 0, 0).getTime();
|
const recuitmentDate = new Date(2024, 9, 17, 0, 0, 0, 0).getTime(); //september 17 2024
|
||||||
//september 17 2024
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="JoinClub">
|
<div id="JoinClub">
|
||||||
<p>Hello World</p>
|
{recuitmentDate && (
|
||||||
|
<p>
|
||||||
|
We Currently are not recuiting please check back when this timer is
|
||||||
|
finished
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
<CountDownTimer
|
<CountDownTimer
|
||||||
dateFinished={recuitmentDate}
|
dateFinished={recuitmentDate}
|
||||||
messageDisplayAfter={"Hello World"}
|
messageDisplayAfter={messageToDisplayAfter()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {null} null - requires nothing
|
||||||
|
* @returns {React.JSX.Element} page - component that is displayed after timer is finished
|
||||||
|
* @description shows recuitment link
|
||||||
|
* @author Brock <darkicewolf50@gmail.com>
|
||||||
|
*/
|
||||||
|
const messageToDisplayAfter = () => {
|
||||||
|
return (
|
||||||
|
<div id="message">
|
||||||
|
<h3>Recuitment Form is OPEN!</h3>
|
||||||
|
<p>Appy using the link below</p>
|
||||||
|
<a
|
||||||
|
href="https://form.jotform.com/232026633865053"
|
||||||
|
target="_blank">
|
||||||
|
<img
|
||||||
|
src="https://www.jotform.com/uploads/darkicewolf50/form_files/232026633865053_1693175101_qrcode_muse.png"
|
||||||
|
width="100%"
|
||||||
|
alt="QR Code for Jotform form"
|
||||||
|
/>
|
||||||
|
<p>Apply Here!</p>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default JoinTheClub;
|
export default JoinTheClub;
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
#message img {
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#message a {
|
||||||
|
/* text-align: center; */
|
||||||
|
width: auto;
|
||||||
|
}
|
50
src/CountDown/CountDownTimer.css
Normal file
50
src/CountDown/CountDownTimer.css
Normal file
@ -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;
|
||||||
|
}
|
@ -1,22 +1,38 @@
|
|||||||
import { useEffect, useState } from "react";
|
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 <darkicewolf50@gmail.com>
|
||||||
|
* @todo change messageDisplayAfter to take in another page
|
||||||
|
*/
|
||||||
const CountDownTimer = ({ dateFinished, messageDisplayAfter }) => {
|
const CountDownTimer = ({ dateFinished, messageDisplayAfter }) => {
|
||||||
const [days, hours, minutes, seconds] = useCountdown(dateFinished);
|
const [days, hours, minutes, seconds] = useCountdown(dateFinished);
|
||||||
if (days + hours + minutes + seconds <= 0) {
|
if (days + hours + minutes + seconds <= 0) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div id="afterTime">
|
||||||
{ShowCounter(days, hours, minutes, seconds)}
|
<ShowCounter
|
||||||
<p>{messageDisplayAfter}</p>
|
days={days}
|
||||||
|
hours={hours}
|
||||||
|
minutes={minutes}
|
||||||
|
seconds={seconds}
|
||||||
|
/>
|
||||||
|
{messageDisplayAfter}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<ShowCounter
|
<div>
|
||||||
days={days}
|
<ShowCounter
|
||||||
hours={hours}
|
days={days}
|
||||||
minutes={minutes}
|
hours={hours}
|
||||||
seconds={seconds}
|
minutes={minutes}
|
||||||
/>
|
seconds={seconds}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -39,50 +55,56 @@ const useCountdown = (DateDone) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getReturnValues = (countDown) => {
|
const getReturnValues = (countDown) => {
|
||||||
const days = Math.floor(countDown / (1000 * 60 * 60 * 24));
|
let days = Math.floor(countDown / (1000 * 60 * 60 * 24));
|
||||||
const hours = Math.floor(
|
let hours = Math.floor(
|
||||||
(countDown % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
|
(countDown % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
|
||||||
);
|
);
|
||||||
const minutes = Math.floor((countDown % (1000 * 60 * 60)) / (1000 * 60));
|
let minutes = Math.floor((countDown % (1000 * 60 * 60)) / (1000 * 60));
|
||||||
const seconds = Math.floor((countDown % (1000 * 60)) / 1000);
|
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];
|
return [days, hours, minutes, seconds];
|
||||||
};
|
};
|
||||||
|
|
||||||
const ShowCounter = ({ days, hours, minutes, seconds }) => {
|
const ShowCounter = ({ days, hours, minutes, seconds }) => {
|
||||||
let danger = days <= 3;
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div id="counter">
|
||||||
<DateTimeDisplay
|
<DateTimeDisplay
|
||||||
valueAwayFrom={days}
|
valueAwayFrom={days}
|
||||||
discriptor={"Days"}
|
discriptor={"Days"}
|
||||||
isInDanger={danger}
|
|
||||||
/>
|
/>
|
||||||
<p>:</p>
|
<p>:</p>
|
||||||
<DateTimeDisplay
|
<DateTimeDisplay
|
||||||
valueAwayFrom={hours}
|
valueAwayFrom={hours}
|
||||||
discriptor={"Hours"}
|
discriptor={"Hours"}
|
||||||
isInDanger={false}
|
|
||||||
/>
|
/>
|
||||||
<p>:</p>
|
<p>:</p>
|
||||||
<DateTimeDisplay
|
<DateTimeDisplay
|
||||||
valueAwayFrom={minutes}
|
valueAwayFrom={minutes}
|
||||||
discriptor={"Mins"}
|
discriptor={"Mins"}
|
||||||
isInDanger={false}
|
|
||||||
/>
|
/>
|
||||||
<p>:</p>
|
<p>:</p>
|
||||||
<DateTimeDisplay
|
<DateTimeDisplay
|
||||||
valueAwayFrom={seconds}
|
valueAwayFrom={seconds}
|
||||||
discriptor={"Seconds"}
|
discriptor={"Seconds"}
|
||||||
isInDanger={false}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const DateTimeDisplay = ({ valueAwayFrom, discriptor, isInDanger }) => {
|
const DateTimeDisplay = ({ valueAwayFrom, discriptor }) => {
|
||||||
return (
|
return (
|
||||||
<div className={isInDanger ? "countdown danger" : "countdown"}>
|
<div>
|
||||||
<p>{valueAwayFrom}</p>
|
<p>{valueAwayFrom}</p>
|
||||||
<span>{discriptor}</span>
|
<span>{discriptor}</span>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user