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

Revamp Landing Page #20

Merged
merged 9 commits into from
Mar 18, 2024
Merged
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
14 changes: 7 additions & 7 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client"
import type { NextPage } from 'next';
import '@/src/styles/reset.scss';
"use client";
import type { NextPage } from "next";
import "@/src/styles/reset.scss";

import About from '@/src/sections/About-Projects';
import NavigationBar from '@/src/components/navbar';
import Footer from '@/src/components/footer'
import About from "@/src/sections/About-Projects";
import NavigationBar from "@/src/components/navbar";
import Footer from "@/src/components/footer";
// here we will compile all the sections of the website together

const AboutPage: NextPage = () => {
Expand All @@ -17,4 +17,4 @@ const AboutPage: NextPage = () => {
);
};

export default AboutPage;
export default AboutPage;
21 changes: 11 additions & 10 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import './globals.css'
import type { Metadata } from 'next'
import { DM_Sans } from 'next/font/google'
import "./globals.css";
import type { Metadata } from "next";
import { DM_Sans } from "next/font/google";

const dm_sans = DM_Sans({ subsets: ['latin'], weight: '400' })
const dm_sans = DM_Sans({ subsets: ["latin"], weight: "400" });

export const metadata: Metadata = {
title: 'ACM UCSD Projects Website',
description: 'ACM UCSD Quarterly Project Website for AI, Design, and Hack',
}
title: "ACM at UC San Diego Projects Website",
description:
"ACM at UC San Diego Quarterly Projects for AI, Design, and Hack",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={dm_sans.className}>{children}</body>
</html>
)
}
);
}
22 changes: 8 additions & 14 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
"use client"
import type { NextPage } from 'next';
import '../src/styles/reset.scss';
"use client";
import type { NextPage } from "next";
import "../src/styles/reset.scss";

import About from '../src/sections/About-Projects';
import Archive from '../src/sections/Archive';
import NavigationBar from '@/src/components/navbar';
import TimerHero from '@/src/sections/Timer';
import Footer from '@/src/components/footer'
import PhotoGallery from '@/src/sections/Photo-Gallery';
import NavigationBar from "@/src/components/navbar";
import Footer from "@/src/components/footer";
import Hero from "@/src/sections/Hero";
// here we will compile all the sections of the website together
const Home: NextPage = () => {
return (
<main>
<NavigationBar />
<TimerHero />
<Hero />
<Footer />
{/* <About />
<Archive/>
<PhotoGallery /> */}
</main>
);
};

export default Home;
export default Home;
Empty file removed src/components/SEO/index.tsx
Empty file.
1 change: 0 additions & 1 deletion src/components/SEO/style.module.scss

This file was deleted.

58 changes: 58 additions & 0 deletions src/components/banner/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
"use client";

import { useState, useEffect } from "react";
import styles from "./style.module.scss";

const Banner = () => {
const [days, setDays] = useState(0);
const [hours, setHours] = useState(0);
const [minutes, setMinutes] = useState(0);
const [seconds, setSeconds] = useState(0);

useEffect(() => {
const target = new Date("04/02/2024 23:59:59");

const interval = setInterval(() => {
const now = new Date();
const difference = target.getTime() - now.getTime();

if (difference <= 0) {
// The target date has passed, set all values to zero
setDays(0);
setHours(0);
setMinutes(0);
setSeconds(0);
clearInterval(interval);
} else {
const d = Math.floor(difference / (1000 * 60 * 60 * 24));
setDays(d);

const h = Math.floor(
(difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
);
setHours(h);

const m = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60));
setMinutes(m);

const s = Math.floor((difference % (1000 * 60)) / 1000);
setSeconds(s);
}
}, 1000);

return () => clearInterval(interval);
}, []);

return (
<div>
<div className={styles.bannerbg}>
Projects applications close in{" "}
<text className={styles.date}>
{days} days {hours} hours {minutes} minutes {seconds} seconds
</text>
</div>
</div>
);
};

export default Banner;
18 changes: 18 additions & 0 deletions src/components/banner/style.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@use "../../styles/vars.scss" as v; // allows you to use pre-defined colors

.bannerbg {
background-color: v.$acm-blue-30 !important;
text-align: center;
padding: 0.3rem;
}

@media screen and (max-width: 768px) {
.bannerbg {
display: flex;
flex-direction: column;
}
}

.date {
font-weight: 700;
}
Loading
Loading