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

Feat/login page #86

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2813f26
feat: countdown + schedule page
tyleryy Dec 6, 2023
6ec7a74
fix: foldered components and schedule placeholder
tyleryy Dec 6, 2023
fa1eedf
linting
tyleryy Dec 7, 2023
c91b6b5
feat: added fireworks when timer reaches 0
tyleryy Dec 7, 2023
5c6766c
fix: deleted and reinstalled with pnpm install
tyleryy Dec 7, 2023
8b1096b
feat: timer logic switching between hacking starts and ends
tyleryy Dec 7, 2023
c5d5052
fix: reset timers to IrvineHack dates
tyleryy Dec 7, 2023
d9405c5
fix: combined countdown into one state
tyleryy Dec 10, 2023
c4c2484
fix: responsive countdown design
tyleryy Dec 10, 2023
e0bc5c8
fix: adjusted margin spacing between countdown label and timer
tyleryy Dec 10, 2023
42a9ef0
feat: shadcn init
tyleryy Dec 13, 2023
f94610c
setup: shadcn set up
tyleryy Dec 13, 2023
fac230a
feat: shadcn deps + EventCard component
tyleryy Dec 13, 2023
05620ca
feat: added badge
tyleryy Dec 13, 2023
d5db29a
feat: EventDiv component
tyleryy Dec 13, 2023
eb6d869
fix: gradient touchups
tyleryy Dec 13, 2023
f26753b
Merge branch 'main' into feat-shadcn-schedule
tyleryy Dec 13, 2023
62ae24e
feat: added props to EventCard component
tyleryy Dec 13, 2023
4fc871e
fix: linting
tyleryy Dec 13, 2023
aa07f1c
feat: added tabs for different day schedules
tyleryy Dec 14, 2023
1a246a0
fix: removed extra app router folder and moved global styles
tyleryy Dec 15, 2023
7f56805
fix: changed path to global styles
tyleryy Dec 15, 2023
e05b0c7
fix: tab list positioning
tyleryy Dec 15, 2023
d8b7f85
fetch events from sanity
waalbert Dec 15, 2023
b5f161e
Revert "fetch events from sanity"
waalbert Dec 15, 2023
ad11587
Revert "Revert "fetch events from sanity""
waalbert Dec 15, 2023
2970024
feat: login page and form set up
tyleryy Dec 15, 2023
3e7b97e
fix: linting
tyleryy Dec 15, 2023
5d0b027
fix: field to email
tyleryy Dec 15, 2023
bf06218
fix: adjusted responsive width
tyleryy Dec 15, 2023
f46f5b1
feat: email validation
tyleryy Dec 15, 2023
ce5bac0
feat: redirect to /api/user/login on valid email
tyleryy Dec 15, 2023
34ba6c2
fix: remove .edu requirement
tyleryy Dec 15, 2023
322283b
fix: footer at bottom
tyleryy Dec 15, 2023
0f4377f
fix: updated responsiveness
tyleryy Dec 15, 2023
c1e7474
fix: switched to figma design
tyleryy Dec 16, 2023
b440dfb
fix: remove unused components
tyleryy Dec 16, 2023
502cea1
Revert "fix: linting"
tyleryy Dec 16, 2023
879a86a
fix: login page by removing schedule
tyleryy Dec 16, 2023
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
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ This Turborepo includes the following packages/apps:

### Apps and Packages

- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `ui`: a stub React component library shared by both `web` and `docs` applications
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `ui`: a stub React component library shared by both `web` and `docs` applications
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `tsconfig`: `tsconfig.json`s used throughout the monorepo

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

### Utilities

This Turborepo has some additional tools already setup for you:

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting

### Build

Expand Down Expand Up @@ -73,9 +73,9 @@ npx turbo link

Learn more about the power of Turborepo:

- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
6 changes: 3 additions & 3 deletions apps/sanity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Congratulations, you have now installed the Sanity Content Studio, an open sourc

Now you can do the following things:

- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
12 changes: 6 additions & 6 deletions apps/sanity/sanity.cli.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {defineCliConfig} from 'sanity/cli'
import { defineCliConfig } from "sanity/cli";

export default defineCliConfig({
api: {
projectId: 'fosuyru0',
dataset: 'production'
}
})
api: {
projectId: "fosuyru0",
dataset: "production",
},
});
28 changes: 14 additions & 14 deletions apps/sanity/sanity.config.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {defineConfig} from 'sanity'
import {deskTool} from 'sanity/desk'
import {visionTool} from '@sanity/vision'
import {colorInput} from '@sanity/color-input'
import {schemaTypes} from './schemas'
import { defineConfig } from "sanity";
import { deskTool } from "sanity/desk";
import { visionTool } from "@sanity/vision";
import { colorInput } from "@sanity/color-input";
import { schemaTypes } from "./schemas";

export default defineConfig({
name: 'default',
title: 'irvinehacks-site-2024',
name: "default",
title: "irvinehacks-site-2024",

projectId: 'fosuyru0',
dataset: 'production',
projectId: "fosuyru0",
dataset: "production",

plugins: [deskTool(), visionTool(), colorInput()],
plugins: [deskTool(), visionTool(), colorInput()],

schema: {
types: schemaTypes,
},
})
schema: {
types: schemaTypes,
},
});
8 changes: 6 additions & 2 deletions apps/sanity/schemas/faqs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export default defineType({
of: [
defineArrayMember({
type: "block",
styles: [{ title: "Normal", value: "normal" }],
styles: [
{ title: "Normal", value: "normal" },
],
lists: [],
}),
],
Expand All @@ -43,7 +45,9 @@ export default defineType({
prepare({ title, subtitle }) {
return {
title,
subtitle: subtitle ? toPlainText(subtitle) : undefined,
subtitle: subtitle
? toPlainText(subtitle)
: undefined,
media: FileQuestion,
};
},
Expand Down
4 changes: 2 additions & 2 deletions apps/site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-opti

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

Expand Down
16 changes: 16 additions & 0 deletions apps/site/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "@/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils/utils"
}
}
10 changes: 10 additions & 0 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,35 @@
},
"dependencies": {
"@fireworks-js/react": "^2.10.7",
"@hookform/resolvers": "^3.3.2",
"@portabletext/react": "^3.0.11",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-navigation-menu": "^1.1.4",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5",
"@react-three/drei": "^9.88.14",
"@react-three/fiber": "^8.15.11",
"@sanity/image-url": "^1.0.2",
"@types/three": "^0.158.2",
"axios": "^1.6.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"date-fns-tz": "^2.0.0",
"framer-motion": "^10.16.14",
"lucide-react": "^0.292.0",
"next": "13.5.6",
"next-sanity": "^5.5.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.49.2",
"tailwind-merge": "^2.1.0",
"tailwindcss-animate": "^1.0.7",
"three": "^0.158.0",
"tunnel-rat": "^0.1.2",
"zod": "^3.22.4"
Expand Down
6 changes: 4 additions & 2 deletions apps/site/src/app/(home)/components/Fireflies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const Fireflies = () => {
1.4123945236206055, 1.3441721200942993,
1.2065531015396118, 4.578973770141602,
2.351515769958496, 2.9505105018615723,
2.4308571815490723, 2.1237339973449707, 0.5060793161392212, 2.4199981689453125,
2.4308571815490723, 2.1237339973449707,
0.5060793161392212, 2.4199981689453125,
4.7787370681762695, 3.6893203258514404,
2.25410532951355, 2.670276403427124, 2.374255418777466,
3.4126408100128174, 4.4318952560424805,
Expand Down Expand Up @@ -101,7 +102,8 @@ const Fireflies = () => {
1.4123945236206055, 1.3441721200942993,
1.2065531015396118, 4.578973770141602,
2.351515769958496, 2.9505105018615723,
2.4308571815490723, 2.1237339973449707,0.5060793161392212, 2.4199981689453125,
2.4308571815490723, 2.1237339973449707,
0.5060793161392212, 2.4199981689453125,
4.7787370681762695, 3.6893203258514404,
2.25410532951355, 2.670276403427124, 2.374255418777466,
3.4126408100128174, 4.4318952560424805,
Expand Down
2 changes: 1 addition & 1 deletion apps/site/src/app/(home)/sections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export { default as Landing } from "./Landing/Landing";
export { default as About } from "./About/About";
export { default as MentorVolunteer } from "./MentorVolunteer/MentorVolunteer";
export { default as FAQ } from "./FAQ/FAQ";
export { default as Sponsors } from "./Sponsors/Sponsors"
export { default as Sponsors } from "./Sponsors/Sponsors";
73 changes: 73 additions & 0 deletions apps/site/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,79 @@
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;

--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;

--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;

--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;

--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;

--radius: 0.5rem;
}

.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;

--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;

--popover: 222.2 84% 4.9%;
--popover-foreground: 210 40% 98%;

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;

--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;

--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;

--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;

--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;

--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}

:root {
--color-cream: #fffce2;
--color-brown: #432810;
Expand Down
98 changes: 98 additions & 0 deletions apps/site/src/app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
"use client";
import { useRouter } from "next/navigation";

import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import * as z from "zod";
import {
Form,
FormItem,
FormControl,
FormDescription,
FormLabel,
FormField,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";

export const revalidate = 60;

const LOGIN_PATH = "/api/user/login";

const formSchema = z.object({
email: z
.string()
.email({ message: "Sorry, that email address is invalid." })
.refine((email) => email.endsWith(".edu"), {
tyleryy marked this conversation as resolved.
Show resolved Hide resolved
message:
"Sorry, only emails that end in '.edu' are allowed to log in.",
}),
});

export default function Home() {
const router = useRouter();
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
email: "",
},
});

const onSubmit = (e: z.infer<typeof formSchema>) => {
console.log("submit", e);
router.push(LOGIN_PATH);
};

return (
<div className="flex flex-col justify-center items-center">
<section className="m-36 w-2/3 xl:w-2/5">
<h1 className="mb-10 text-4xl md:text-5xl font-bold text-center">
Login
</h1>
<Separator className="mb-10" />
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8 bg-gradient-radial to-blue-900 from-blue-950
py-10 px-10 rounded-md drop-shadow-lg"
>
<FormField
control={form.control}
name="email"
render={({ field }) => (
<FormItem>
<FormLabel className="text-3xl">
Email Address
</FormLabel>
<FormControl>
<Input
className="text-black"
placeholder="[email protected]"
{...field}
/>
</FormControl>
<FormDescription>
UCI students will log in with UCI SSO.
</FormDescription>
<FormMessage />
</FormItem>
)}
/>

<Button
type="submit"
className="w-1/5 h-14 hover:text-gray-500 active:text-black text-2xl
bg-cyan-400 hover:bg-cyan-300 active:bg-cyan-500
shadow-slate-500/50 shadow-lg hover:shadow-slate-500/80
hover:scale-105 transition ease-in"
>
Submit
</Button>
</form>
</Form>
</section>
</div>
);
}
Loading