From 7e8175001f074a0e715ab6af0a8734066691173f Mon Sep 17 00:00:00 2001 From: Albert Wang Date: Mon, 25 Nov 2024 11:57:48 -0800 Subject: [PATCH] IrvineHacks 2025 Preview Page and Initial Setup (#383) * update landing page with new 2025 design * fix button hover effect * update meta titles * update apps open and close dates * fix: keep application form closed until apps open --- .github/workflows/deploy-preview.yml | 112 +++++++++--------- README.md | 15 ++- apps/api/src/routers/user.py | 2 +- apps/site/next.config.js | 60 +++++----- .../sections/Landing/Landing.module.css | 23 +--- .../(home)/sections/Landing/Landing.tsx | 20 ++-- apps/site/src/app/(main)/apply/page.tsx | 8 +- apps/site/src/app/(main)/globals.css | 15 ++- apps/site/src/app/(main)/guest-login/page.tsx | 2 +- apps/site/src/app/(main)/layout.tsx | 4 +- apps/site/src/app/(main)/login/page.tsx | 2 +- .../src/app/(main)/portal/@applicant/page.tsx | 2 +- apps/site/src/app/(main)/resources/page.tsx | 4 +- apps/site/src/app/(main)/schedule/page.tsx | 2 +- apps/site/src/app/admin/layout.tsx | 2 +- .../assets/backgrounds/landing-background.png | Bin 0 -> 1614289 bytes apps/site/src/assets/images/fog-left.png | Bin 1920649 -> 0 bytes apps/site/src/assets/images/fog-right.png | Bin 1865595 -> 0 bytes .../src/assets/logos/hackuci-anteater.svg | 3 - apps/site/src/assets/logos/hackuci-gear.svg | 3 - .../src/assets/logos/irvinehacks-logo.svg | 9 ++ .../lib/components/Button/Button.module.css | 26 ++-- .../site/src/lib/components/Button/Button.tsx | 44 +++---- .../src/lib/components/HackLogo/HackLogo.tsx | 11 +- .../site/src/lib/components/Navbar/Navbar.tsx | 14 +-- apps/site/src/lib/utils/hasDeadlinePassed.ts | 2 +- .../src/lib/utils/haveApplicationsOpened.ts | 9 ++ apps/site/tailwind.config.ts | 6 +- 28 files changed, 201 insertions(+), 199 deletions(-) create mode 100644 apps/site/src/assets/backgrounds/landing-background.png delete mode 100644 apps/site/src/assets/images/fog-left.png delete mode 100644 apps/site/src/assets/images/fog-right.png delete mode 100644 apps/site/src/assets/logos/hackuci-anteater.svg delete mode 100644 apps/site/src/assets/logos/hackuci-gear.svg create mode 100644 apps/site/src/assets/logos/irvinehacks-logo.svg create mode 100644 apps/site/src/lib/utils/haveApplicationsOpened.ts diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index ca11f07d..ee468930 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -1,63 +1,63 @@ name: Deploy Preview on: - pull_request: + pull_request: permissions: - contents: read - pull-requests: write + contents: read + pull-requests: write jobs: - Site: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: amondnet/vercel-action@v25 - with: - vercel-version: 32.6.1 - github-comment: | - - - - - - - - - - - - - -
NameIrvineHacks 2024 Site
PreviewVisit Preview
Commit{{deploymentCommit}}
- github-token: ${{ secrets.GITHUB_TOKEN }} - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-org-id: ${{ vars.VERCEL_ORG_ID}} - vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_SITE}} - Studio: - runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'sanity') - steps: - - uses: actions/checkout@v4 - - uses: amondnet/vercel-action@v25 - with: - vercel-version: 32.6.1 - github-comment: | - - - - - - - - - - - - - -
NameSanity Studio
PreviewVisit Preview
Commit{{deploymentCommit}}
- github-token: ${{ secrets.GITHUB_TOKEN }} - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-org-id: ${{ vars.VERCEL_ORG_ID}} - vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_STUDIO}} + Site: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: amondnet/vercel-action@v25 + with: + vercel-version: 32.6.1 + github-comment: | + + + + + + + + + + + + + +
NameIrvineHacks Site
PreviewVisit Preview
Commit{{deploymentCommit}}
+ github-token: ${{ secrets.GITHUB_TOKEN }} + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ vars.VERCEL_ORG_ID}} + vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_SITE}} + Studio: + runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'sanity') + steps: + - uses: actions/checkout@v4 + - uses: amondnet/vercel-action@v25 + with: + vercel-version: 32.6.1 + github-comment: | + + + + + + + + + + + + + +
NameSanity Studio
PreviewVisit Preview
Commit{{deploymentCommit}}
+ github-token: ${{ secrets.GITHUB_TOKEN }} + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ vars.VERCEL_ORG_ID}} + vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_STUDIO}} diff --git a/README.md b/README.md index bf624f49..212e569d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -# irvinehacks-site-2024 +# irvinehacks-site ## Overview + This monorepo uses [turborepo](https://turbo.build/repo) with [pnpm](https://pnpm.io/) as a package manager. It contains the following: ### `apps/site` + A [Next.js](https://nextjs.org/) 13 project that uses the new app router. This app contains the IrvineHacks site. @@ -11,6 +13,7 @@ This app contains the IrvineHacks site. The development server runs at `http://localhost:3000`. If this port is taken, the next available port will be used. ### `apps/api` + A [FastAPI](https://fastapi.tiangolo.com/) project. This app contains the api for the IrvineHacks site. @@ -52,6 +55,7 @@ When running commands, use `pnpm` rather than `npm`. ### Python API 1. Ensure you are in `apps/api` with + ```shell cd apps/api ``` @@ -70,6 +74,7 @@ When running commands, use `pnpm` rather than `npm`. ```shell source .venv/bin/activate ``` + and for Windows, run ```shell @@ -91,13 +96,13 @@ This project uses Docker for testing API methods locally. A local MongoDB application will start running at `http://localhost:8081` after running `pnpm dev`. -*Note*: Because the Python files have been copied over to the Docker container, hot reload is no longer possible. Stopping the container and rerunning `pnpm dev` is the best option. +_Note_: Because the Python files have been copied over to the Docker container, hot reload is no longer possible. Stopping the container and rerunning `pnpm dev` is the best option. ### Build To build all apps and packages, run the following command in the project root. -*Note*: You would run this BEFORE opening a PR as a sanity check for errors. +_Note_: You would run this BEFORE opening a PR as a sanity check for errors. ```bash pnpm build @@ -114,6 +119,7 @@ pnpm dev ``` ## Helpful VSCode Extensions + - [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) for Python linting, intellisense, etc. - [Mypy](https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker) for Python type checking - [Black](https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter) for Python code formatting @@ -132,9 +138,8 @@ This Turborepo includes the following packages/apps: - `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) - `tsconfig`: `tsconfig.json`s used throughout the monorepo - ### Utilities - [TypeScript](https://www.typescriptlang.org/) for static type checking - [ESLint](https://eslint.org/) for code linting -- [Prettier](https://prettier.io) for code formatting \ No newline at end of file +- [Prettier](https://prettier.io) for code formatting diff --git a/apps/api/src/routers/user.py b/apps/api/src/routers/user.py index c585700f..50d595a6 100644 --- a/apps/api/src/routers/user.py +++ b/apps/api/src/routers/user.py @@ -29,7 +29,7 @@ router = APIRouter() -DEADLINE = datetime(2024, 1, 15, 8, 1, tzinfo=timezone.utc) +DEADLINE = datetime(2025, 1, 11, 8, 1, tzinfo=timezone.utc) class IdentityResponse(BaseModel): diff --git a/apps/site/next.config.js b/apps/site/next.config.js index bbdf2a2c..4f487130 100644 --- a/apps/site/next.config.js +++ b/apps/site/next.config.js @@ -29,36 +29,36 @@ const nextConfig = { }, async redirects() { return [ - { - source: "/mentor", - destination: "https://forms.gle/yCmXvG89ygvxUSCd7", - permanent: true, - }, - { - source: "/volunteer", - destination: "https://forms.gle/erpJjErKLJkEZMw48", - permanent: true, - }, - { - source: "/waiver", - destination: DOCUSIGN_FORM_URL, - permanent: true, - }, - { - source: "/incident", - destination: "https://forms.gle/A6BdsSzYSiyeTP8Y6", - permanent: true, - }, - { - source: "/devpost", - destination: "https://irvinehacks-2024.devpost.com", - permanent: true, - }, - { - source: "/feedback", - destination: "https://forms.gle/c154z45wRx7ARnrE9", - permanent: true, - }, + // { + // source: "/mentor", + // destination: "https://forms.gle/yCmXvG89ygvxUSCd7", + // permanent: true, + // }, + // { + // source: "/volunteer", + // destination: "https://forms.gle/erpJjErKLJkEZMw48", + // permanent: true, + // }, + // { + // source: "/waiver", + // destination: DOCUSIGN_FORM_URL, + // permanent: true, + // }, + // { + // source: "/incident", + // destination: "https://forms.gle/A6BdsSzYSiyeTP8Y6", + // permanent: true, + // }, + // { + // source: "/devpost", + // destination: "https://irvinehacks-2024.devpost.com", + // permanent: true, + // }, + // { + // source: "/feedback", + // destination: "https://forms.gle/c154z45wRx7ARnrE9", + // permanent: true, + // }, ]; }, }; diff --git a/apps/site/src/app/(main)/(home)/sections/Landing/Landing.module.css b/apps/site/src/app/(main)/(home)/sections/Landing/Landing.module.css index 823ffbca..ffeecdc6 100644 --- a/apps/site/src/app/(main)/(home)/sections/Landing/Landing.module.css +++ b/apps/site/src/app/(main)/(home)/sections/Landing/Landing.module.css @@ -1,29 +1,8 @@ .landingBackground { - background-image: url("~@/assets/backgrounds/landing-background.jpg"); + background-image: url("~@/assets/backgrounds/landing-background.png"); background-position: center bottom; background-repeat: no-repeat; background-size: cover; - mask-image: url("~@/assets/backgrounds/landing-background-mask.png"); - mask-position: center bottom; - mask-repeat: no-repeat; - mask-size: cover; -} - -.fogLeft, -.fogRight { - animation-delay: 2s; - animation-duration: 4s; - animation-fill-mode: forwards; - animation-timing-function: ease; - z-index: 1000; -} - -.fogLeft { - animation-name: slideOutLeft; -} - -.fogRight { - animation-name: slideOutRight; } @keyframes slideOutLeft { diff --git a/apps/site/src/app/(main)/(home)/sections/Landing/Landing.tsx b/apps/site/src/app/(main)/(home)/sections/Landing/Landing.tsx index c00c4fa8..08806d86 100644 --- a/apps/site/src/app/(main)/(home)/sections/Landing/Landing.tsx +++ b/apps/site/src/app/(main)/(home)/sections/Landing/Landing.tsx @@ -1,41 +1,37 @@ "use client"; import { Suspense } from "react"; -import Image from "next/image"; import { PerspectiveCamera } from "@react-three/drei"; import hasDeadlinePassed from "@/lib/utils/hasDeadlinePassed"; +import haveApplicationsOpened from "@/lib/utils/haveApplicationsOpened"; import View from "@/components/canvas/View"; import Button from "@/lib/components/Button/Button"; -import Fireflies from "../../components/Fireflies"; - -import fogLeft from "@/assets/images/fog-left.png"; -import fogRight from "@/assets/images/fog-right.png"; import styles from "./Landing.module.css"; const Landing = () => { const deadlinePassed = hasDeadlinePassed(); + const applicationsOpened = haveApplicationsOpened(); return (
-
- Fog - Fog -

- IrvineHacks 2024 +

January 24–26

+

+ IrvineHacks 2025

-

January 26–28

{deadlinePassed ? (
diff --git a/apps/site/src/app/(main)/apply/page.tsx b/apps/site/src/app/(main)/apply/page.tsx index f556cc31..5e990f0a 100644 --- a/apps/site/src/app/(main)/apply/page.tsx +++ b/apps/site/src/app/(main)/apply/page.tsx @@ -2,6 +2,7 @@ import Image from "next/image"; import { redirect } from "next/navigation"; import hasDeadlinePassed from "@/lib/utils/hasDeadlinePassed"; +import haveApplicationsOpened from "@/lib/utils/haveApplicationsOpened"; import ApplyConfirm from "./sections/ApplyConfirmation/ApplyConfirm"; import Form from "./sections/Form/Form"; @@ -36,6 +37,7 @@ export default async function Apply({ } const deadlinePassed = hasDeadlinePassed(); + const applicationsOpened = haveApplicationsOpened(); const applyBody = hasAcceptedQueryParam ? ( <> @@ -73,7 +75,11 @@ export default async function Apply({ ); return (
- {deadlinePassed ? : applyBody} + {!applicationsOpened || deadlinePassed ? ( + + ) : ( + applyBody + )}
); } diff --git a/apps/site/src/app/(main)/globals.css b/apps/site/src/app/(main)/globals.css index a8513cb5..df7d6a62 100644 --- a/apps/site/src/app/(main)/globals.css +++ b/apps/site/src/app/(main)/globals.css @@ -1,19 +1,22 @@ -@import url("https://fonts.googleapis.com/css2?family=Alegreya:wght@400;500;600;700&display=swap"); -@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@400;500;600;700&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Cantarell:ital,wght@0,400;0,700;1,400;1,700&display=swap"); @tailwind base; @tailwind components; @tailwind utilities; :root { - --color-cream: #fffce2; + --color-white: #fff; + --color-black: #0c071b; --color-brown: #432810; - --color-dark-blue: #090c31; + --color-light-blue: #39befd; + --color-blue: #006fb2; + --color-dark-blue: #0b004c; } body { - color: var(--color-cream); - background-color: var(--color-brown); + color: var(--color-white); + background-color: var(--color-dark-blue); } /* based on Bootstrap Reboot */ diff --git a/apps/site/src/app/(main)/guest-login/page.tsx b/apps/site/src/app/(main)/guest-login/page.tsx index ebd0556e..78fc7988 100644 --- a/apps/site/src/app/(main)/guest-login/page.tsx +++ b/apps/site/src/app/(main)/guest-login/page.tsx @@ -1,6 +1,6 @@ import { Metadata } from "next"; export const metadata: Metadata = { - title: "Guest Login | IrvineHacks 2024", + title: "Guest Login | IrvineHacks 2025", }; export { default as default } from "./GuestLogin"; diff --git a/apps/site/src/app/(main)/layout.tsx b/apps/site/src/app/(main)/layout.tsx index 4b150499..2bd9b7ac 100644 --- a/apps/site/src/app/(main)/layout.tsx +++ b/apps/site/src/app/(main)/layout.tsx @@ -10,7 +10,7 @@ import NavbarParent from "@/lib/components/Navbar/NavbarParent"; import "./globals.css"; export const metadata: Metadata = { - title: "IrvineHacks 2024", + title: "IrvineHacks 2025", description: "IrvineHacks is Hack at UCI's premier hackathon for collegiate students.", }; @@ -24,7 +24,7 @@ export default function Layout({ children }: PropsWithChildren) { {/* reference: https://github.com/pmndrs/react-three-next */} {children} -