Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rishit-singh committed Sep 23, 2023
2 parents 0ad4147 + 8269324 commit 6171ea3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
8 changes: 5 additions & 3 deletions frontend/src/app/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ export class NavBar extends Component<NavBarProps, NavBarState>
<div className={"mt-4"}></div>;
<div className={"mt-3"}></div>;

return <div className="flex flex-row max-[600px]:grid max-[600px]:grid-rows-2 row-start-1 row-span-1 max-[600px]:justify-center">
return (
<div className="flex flex-row max-[600px]:grid max-[600px]:grid-rows-2 row-start-1 row-span-1 max-[600px]:justify-center">
<div className="min-[600px]:basis-1/4 max-[600px]:row-start-1 flex flex-row shrink-0 grow-0 max-[600px]:justify-center ">
<div></div>
<img src="LCS.png" alt="club-logo" className="ml-5 flex-start-2 max-[600px]:ml-8 shrink-0 grow-0 h-full select-none"/>
<div></div>
</div>
<div className="min-[600px]:basis-3/4 max-[600px]:grid max-[600px]:grid-template-cols[5%_90%_5%] flex justify-end mr-8 h-full">
<div className="min-[600px]:basis-3/4 max-[600px]:grid max-[600px]:grid-template-cols[5%_90%_5%] min-[600px]:flex min-[600px]:justify-end min-[600px]:mr-8 h-full">
<div></div>
<div className={"col-start-2"}>
<div className={"nav_button_container flex max-[500px]:gap-x-3 gap-x-7 mt-5 max-[500px]:mt-6"}>
Expand All @@ -78,8 +79,9 @@ export class NavBar extends Component<NavBarProps, NavBarState>
</div>
</div>
<div></div>
</div>
</div>
</div>;
);
}
}

Expand Down
2 changes: 0 additions & 2 deletions frontend/src/app/hacks/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export function Body()
</div>

<span className={"text-sm"}> Registration is closed! </span>

<span className={"text-sm"}> <a href="https://forms.gle/EGfbXcaTa5ucs4yS9">We are still looking for Mentors: register now!</a></span>
</div>

<div className={"flex flex-col items-center self-center gap-[5vh] max-[850px]:gap-[6vh] mt-[10vh] max-[850px]:mt-[40vh] max-w-[100vw]"}>
Expand Down
19 changes: 13 additions & 6 deletions frontend/src/app/hacks/Timer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export class Timer extends Component<TimerProps, TimerState>
protected TimeDifference: number;

public Tick(): void
{
{
this.UpdateTimeStamp()

setInterval(()=> {
this.UpdateTimeStamp();
if(this.TimeDifference > 0)
Expand All @@ -46,8 +48,8 @@ export class Timer extends Component<TimerProps, TimerState>
minutes: number = Math.floor((this.TimeDifference % 3600) / 60),
hours: number = Math.floor((this.TimeDifference % 86400) / 3600),
days: number = Math.floor(this.TimeDifference / (3600 * 24));

this.setState({CurrentTimeStamp: new TimeStamp(days, hours, minutes, seconds)});
this.setState({CurrentTimeStamp: new TimeStamp(days, hours, minutes, seconds)} );
}

public UNSAFE_componentWillMount() {
Expand All @@ -57,15 +59,20 @@ export class Timer extends Component<TimerProps, TimerState>

render()
{
return <div className={"text-white text-7xl max-[850px]:text-3xl"}>
{this.state.CurrentTimeStamp.Days}d {this.state.CurrentTimeStamp.Hours}h {this.state.CurrentTimeStamp.Minutes}m {this.state.CurrentTimeStamp.Seconds}s
return <div className={"text-white text-7xl max-[850px]:text-3xl"} suppressHydrationWarning>
{this.state.CurrentTimeStamp.Days}d {this.state.CurrentTimeStamp.Hours}h {this.state.CurrentTimeStamp.Minutes}m {this.state.CurrentTimeStamp.Seconds}s
</div>
}

constructor(props: TimerProps)
{
super(props);

// I can't figure out how to fix the server time right now, SORRY RISHIT
let date = new Date();
date.setHours(date.getHours()-7);

this.TimeDifference = Math.abs((this.props.EndTime.valueOf() - new Date().valueOf())) / 1000;
this.TimeDifference = Math.abs((this.props.EndTime.valueOf() - date.valueOf())) / 1000;
//this.TimeDifference = Math.abs((this.props.EndTime.valueOf() - new Date().valueOf())) / 1000;
}
}
3 changes: 2 additions & 1 deletion frontend/src/app/hacks/schedule/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import {SocialIcons} from "@/app/SocialIcons";
export function Body()
{
return <div className={"grid-rows-3 bg-hacks-bg-black items-center"}>

<div className={"flex flex-col items-center mt-3"}>
<span className={"text-3xl max-[850px]:text-xl"}>Schedule</span>
<div className={"flex flex-col items-center justify-center gap-[7vh] max-[850px]:gap-[8vh] mt-[4vh] max-[850px]:mt-[9vh] max-h-full h-[250vh]"}>
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRyF8-IjcBAjemcPYusfUjDub2ZY1qsMOeYzVBfq3bZrHJn0RQ498RVPvAz45TQUmaoGpWZMWGchkfV/pubhtml?gid=1141432285&amp;single=true&amp;widget=true&amp;headers=false" className={"h-full w-[50vw]"}></iframe>
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRyF8-IjcBAjemcPYusfUjDub2ZY1qsMOeYzVBfq3bZrHJn0RQ498RVPvAz45TQUmaoGpWZMWGchkfV/pubhtml?gid=1141432285&amp;single=true&amp;widget=true&amp;headers=false" className={"h-full w-[max(52vw,_500px)]"}></iframe>
</div>
</div>

Expand Down

0 comments on commit 6171ea3

Please sign in to comment.