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 all 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
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
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
96 changes: 96 additions & 0 deletions apps/site/src/app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
"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";
import { cn } from "@/lib/utils/utils";

import ButtonStyles from "@/lib/components/Button/Button.module.css";

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." }),
});

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>) => {
router.push(LOGIN_PATH);
};

return (
<div className="flex flex-col justify-center items-center min-h-screen">
<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-white
py-10 px-10 rounded-md drop-shadow-lg"
>
<FormField
control={form.control}
name="email"
render={({ field }) => (
<FormItem>
<FormLabel className="text-xl md:text-3xl text-slate-800 underline underline-offset-4">
Email Address
</FormLabel>
<FormControl>
<Input
className="text-black text-xs sm:text-base -translate-x-1 bg-slate-200"
placeholder="[email protected]"
{...field}
/>
</FormControl>
<FormDescription className="text-xs">
UCI students will log in with UCI SSO.
</FormDescription>
<FormMessage />
</FormItem>
)}
/>

<Button
type="submit"
className={cn(
"h-14 text-2xl shadow-lg hover:scale-105 transition ease-in",
ButtonStyles.button,
)}
>
Submit
</Button>
</form>
</Form>
</section>
</div>
);
}
39 changes: 0 additions & 39 deletions apps/site/src/app/schedule/components/BarLoader.tsx

This file was deleted.

This file was deleted.

Loading