Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Clean up some code and adjust animations
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriae committed Mar 27, 2024
1 parent 608b81f commit 2efa02c
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 184 deletions.
58 changes: 4 additions & 54 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export default function AboutPage() {
header: <div
className="flex flex-1 w-full h-full min-h-[6rem] rounded-xl dark:bg-dot-white/[0.2] bg-dot-black/[0.2] [mask-image:radial-gradient(ellipse_at_center,white,transparent)] border border-transparent dark:border-white/[0.2] bg-neutral-100 dark:bg-black">
<Image
alt={"Working Image"}
src={"https://i.ytimg.com/vi_webp/vGIsE0y7tVQ/maxresdefault.webp"}
className={"object-cover"}/></div>,
className:
Expand All @@ -136,6 +137,7 @@ export default function AboutPage() {
header: <div
className="flex flex-1 w-full h-full min-h-[6rem] rounded-xl dark:bg-dot-white/[0.2] bg-dot-black/[0.2] [mask-image:radial-gradient(ellipse_at_center,white,transparent)] border border-transparent dark:border-white/[0.2] bg-neutral-100 dark:bg-black">
<Image
alt={"FIRST-1"}
src={"https://www.firstinspires.org/sites/all/themes/first/assets/images/2020/program-block-frc.jpg"}
className={"object-cover"}/></div>,
className:
Expand All @@ -153,6 +155,7 @@ export default function AboutPage() {
header: <div
className="flex flex-1 w-full h-full min-h-[6rem] rounded-xl dark:bg-dot-white/[0.2] bg-dot-black/[0.2] [mask-image:radial-gradient(ellipse_at_center,white,transparent)] border border-transparent dark:border-white/[0.2] bg-neutral-100 dark:bg-black">
<Image
alt={"FIRST-2"}
src={"https://www.firstinspires.org/sites/default/files/first-in-show/game-and-season/frc-header.png"}
className={"object-cover"}/></div>,
className: "md:col-span-2",
Expand All @@ -171,66 +174,13 @@ export default function AboutPage() {
header: <div
className="flex flex-1 w-full h-full min-h-[6rem] rounded-xl dark:bg-dot-white/[0.2] bg-dot-black/[0.2] [mask-image:radial-gradient(ellipse_at_center,white,transparent)] border border-transparent dark:border-white/[0.2] bg-neutral-100 dark:bg-black">
<Image
alt={"FIRST-3"}
src={"https://www.firstinspires.org/sites/default/files/uploads/hero_headers/Header-image-fallback-gradient-high-res.jpg"}
className={"object-cover"}/></div>,
className: "md:col-span-1",
},
];

// const moreItem = [
// {
// title: "Brooklyn Technical High School",
// description: "Brooklyn Technical High School (aka. “BTHS”, “Tech”) is one of New York City’s specialized\n" +
// "high schools for science, technology, engineering, and mathematics. Tech is the largest high\n" +
// "school in the United States, with an enrollment of 6,500 students across all four grades.",
// header: <Image src={""}/>,
// className: "md:col-span-2",
// },
// {
// title: "What is FIRST?",
// description: "FIRST (For Inspiration and Recognition of Science and Technology), founded in 1989 by Dean\n" +
// "Kamen and Woody Flowers, was created to assist in inspiring and teaching young explorers\n" +
// "like us to connect across the globe via engineering and innovation",
// header: "https://www.firstinspires.org/sites/all/themes/first/assets/images/2020/program-block-frc.jpg",
// },
// {
// title: "More About FIRST",
// description:
// "Each year FIRST designs an international robotics competition in which 26 countries and over\n" +
// "3,200 teams participate in each year. Over 500,000 students participate in the FIRST\n" +
// "Robotics Competition itself, and high schools across the globe build a robot and compete at\n" +
// "various regional competitions. After all regionals take place, winners and award recipients\n" +
// "are invited to compete at the championship, which takes place in Houston, Texas. Over 450\n" +
// "teams proceeded to the championships in the 2022 season",
// header: "https://www.firstinspires.org/sites/default/files/first-in-show/game-and-season/frc-header.png",
// },
// {
// title: "FIRST Core Values",
// description:
// <div className={"space-y-1"}>
// <p>
// Discovery: We explore new skills and ideas.
// </p>
// <p>
// Innovation: We use creativity and persistence to solve problems.
// </p>
// <p>
// Impact: We apply what we learn to improve our world.
// </p>
// <p>
// Inclusion: We respect each other and embrace our differences.
// </p>
// <p>
// Teamwork: We are stronger when we work together.
// </p>
// <p>
// Fun: We enjoy and celebrate what we do!
// </p>
// </div>,
// header: "https://www.firstinspires.org/sites/default/files/uploads/hero_headers/Header-image-fallback-gradient-high-res.jpg",
// },
// ];

const globeConfig = {
pointSize: 4,
globeColor: "#062056",
Expand Down
1 change: 0 additions & 1 deletion app/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const checkEnvironment = () => {


async function fetchAllPosts() {
// const response = await fetch('/api/posts');
const response = await fetch(checkEnvironment() + '/api/posts');
return await response.json();
}
Expand Down
85 changes: 0 additions & 85 deletions app/editor/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,6 @@ import remarkMath from 'remark-math'
import remarkGemoji from 'remark-gemoji'
import rehypeKatex from "rehype-katex";
import {Progress} from "@/components/shadcn/ui/progress";
// import {Button} from "@/components/shadcn/ui/button";
// import {Image} from "@nextui-org/react";
// import {
// Dialog,
// DialogContent,
// DialogDescription, DialogFooter,
// DialogHeader,
// DialogTitle,
// DialogTrigger
// } from "@/components/shadcn/ui/dialog";
// import {Label} from "@/components/shadcn/ui/label";
// import {Input} from "@/components/shadcn/ui/input";
// import {
// Select,
// SelectContent,
// SelectGroup,
// SelectItem,
// SelectLabel,
// SelectTrigger,
// SelectValue,
// } from "@/components/shadcn/ui/select"
// import Roster from "../team/team.json"
// import {Textarea} from "@/components/shadcn/ui/textarea";


export default function EditorPage() {
const [markdown, setMarkdown] = useState("");
Expand Down Expand Up @@ -214,67 +190,6 @@ export default function EditorPage() {

return (
<div className='w-full h-full p-2'>
{/*<div className={"p-2 mx-3 flex items-center justify-between"}>*/}
{/* <div className="flex items-center justify-start gap-2 md:text-3xl text-xl">*/}
{/* <Image*/}
{/* src={user?.picture}*/}
{/* alt={user?.name}*/}
{/* width={40}*/}
{/* className="rounded-full mr-2"*/}
{/* />*/}
{/* <span className="mr-2">Hi, <b>{user?.name}</b></span>*/}
{/* </div>*/}
{/* <div className={"flex items-center justify-end"}>*/}
{/* <Dialog>*/}
{/* <DialogTrigger asChild>*/}
{/* <Button variant="outline">Create Post</Button>*/}
{/* </DialogTrigger>*/}
{/* <DialogContent className="sm:max-w-[425px]">*/}
{/* <DialogHeader>*/}
{/* <DialogTitle>Create Blog Post</DialogTitle>*/}
{/* <DialogDescription>*/}
{/* Create a blog post here.*/}
{/* </DialogDescription>*/}
{/* </DialogHeader>*/}
{/* <div className="grid gap-4 py-4">*/}
{/* <div className="grid grid-cols-4 items-center gap-4">*/}
{/* <Label htmlFor="name" className="text-right">*/}
{/* Name*/}
{/* </Label>*/}
{/* <Select>*/}
{/* <SelectTrigger className="w-[280px]">*/}
{/* <SelectValue placeholder="Member Name" />*/}
{/* </SelectTrigger>*/}
{/* <SelectContent className={"scroll-smooth overflow-y-auto -webkit-overflow-scrolling-touch"}>*/}
{/* <SelectGroup>*/}
{/* {Object.entries(Roster).map(([name, data]) => (*/}
{/* <SelectItem value={name} key={name}>{name}</SelectItem>*/}
{/* ))}*/}
{/* </SelectGroup>*/}
{/* </SelectContent>*/}
{/* </Select>*/}
{/* </div>*/}
{/* <div className="grid grid-cols-4 items-center gap-4">*/}
{/* <Label htmlFor="picture" className="text-right">*/}
{/* Cover Image*/}
{/* </Label>*/}

{/* <Input id="picture" type="file" />*/}
{/* </div>*/}
{/* <div className="grid grid-cols-4 items-center gap-4">*/}
{/* <Label htmlFor="name" className="text-right">*/}
{/* Description*/}
{/* </Label>*/}
{/* <Textarea className={"w-[280px]"}/>*/}
{/* </div>*/}
{/* </div>*/}
{/* <DialogFooter>*/}
{/* <Button type="submit">Create Post</Button>*/}
{/* </DialogFooter>*/}
{/* </DialogContent>*/}
{/* </Dialog>*/}
{/* </div>*/}
{/*</div>*/}
<div className={"flex"}>
<section className='w-full h-full border-r border-gray-300 p-4'>
<div className="flex space-x-3 mb-2 border-white rounded-lg bg-gray-200 p-2">
Expand Down
5 changes: 3 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import YouTubePlayer from "@/components/youtube";
import {Tabs} from "@/components/aceternity/ui/tabs";
import {Progress} from "@/components/shadcn/ui/progress";
import {LampContainer} from "@/components/aceternity/ui/lamp";
import { motion } from "framer-motion";
import {motion} from "framer-motion";

export default function Home() {
const {isAuthenticated, isLoading, loginWithRedirect, logout} = useAuth0();
Expand Down Expand Up @@ -220,7 +220,8 @@ export default function Home() {
<div className="text-center h-[60vh] mb-5">
<h1 className="text-[2.9rem] md:text-7xl font-bold dark:text-white main">Sponsors</h1>
<p className="text-base md:text-xl my-3 dark:text-neutral-200 p-2">
Thank you to all our sponsors and families who supported this. We couldn't make our robot without your help!
Thank you to all our sponsors and families who supported this. We couldn't make our robot without
your help!
</p>
<InfiniteMovingCards items={sponsors}/>
</div>
Expand Down
7 changes: 3 additions & 4 deletions app/sponsors/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"use client"
import { AuroraBackground } from "@/components/aceternity/ui/aurora";
import { motion } from "framer-motion";
import {AuroraBackground} from "@/components/aceternity/ui/aurora";
import {motion} from "framer-motion";
import {BentoGrid} from "@/components/aceternity/ui/bento-grid";
import {BentoGridItem} from "@/components/aceternity/ui/direction-aware-hover";
import React from "react";


export default function SponsorPage() {
const bentoItems = [

{
image: "/team2022.png",
text: <div>
Expand Down Expand Up @@ -59,7 +58,7 @@ export default function SponsorPage() {
</div>
</motion.div>
</AuroraBackground>
<div className={"h-full py-20"} >
<div className={"h-full py-20"}>
<BentoGrid className="max-w-8xl mx-auto md:auto-rows-[30rem] p-10">
{bentoItems.map((item, i) => (
<BentoGridItem
Expand Down
4 changes: 2 additions & 2 deletions components/aceternity/ui/aurora.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { cn } from "@/components/cn";
import React, { ReactNode } from "react";
import {cn} from "@/components/cn";
import React, {ReactNode} from "react";

interface AuroraBackgroundProps extends React.HTMLProps<HTMLDivElement> {
children: ReactNode;
Expand Down
14 changes: 7 additions & 7 deletions components/aceternity/ui/direction-aware-hover.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";

import React, { useRef, useState } from "react";
import React, {useRef, useState} from "react";
import Image from "next/image";
import { AnimatePresence, motion } from "framer-motion";
import { cn } from "@/components/cn";
import {AnimatePresence, motion} from "framer-motion";
import {cn} from "@/components/cn";

export const DirectionAwareHover = ({
imageUrl,
Expand Down Expand Up @@ -54,11 +54,10 @@ export const DirectionAwareHover = ({
ev: React.MouseEvent<HTMLDivElement, MouseEvent>,
obj: HTMLElement
) => {
const { width: w, height: h, left, top } = obj.getBoundingClientRect();
const {width: w, height: h, left, top} = obj.getBoundingClientRect();
const x = ev.clientX - left - (w / 2) * (w > h ? h / w : 1);
const y = ev.clientY - top - (h / 2) * (h > w ? w / h : 1);
const d = Math.round(Math.atan2(y, x) / 1.57079633 + 5) % 4;
return d;
return Math.round(Math.atan2(y, x) / 1.57079633 + 5) % 4;
};

return (
Expand All @@ -77,7 +76,8 @@ export const DirectionAwareHover = ({
whileHover={direction}
exit="exit"
>
<motion.div className="group-hover/card:block hidden absolute inset-0 w-full h-full bg-black/40 z-10 transition duration-500" />
<motion.div
className="group-hover/card:block hidden absolute inset-0 w-full h-full bg-black/40 z-10 transition duration-500"/>
<motion.div
variants={variants}
className="h-full w-full relative bg-gray-50 dark:bg-black"
Expand Down
2 changes: 1 addition & 1 deletion components/aceternity/ui/infinite-moving-cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Marquee from "react-fast-marquee";
export const InfiniteMovingCards = React.memo(({items}: { items: { link: string; title: string; url: string; }[] }) => {
return (
<Marquee speed={200} className={"z-0"}>
{items.map((item, idx) => (
{items.map((item, _) => (
<div className={"container px-3 py-5"} key={item.title}>
<Link href={item.url} target={"_blank"} passHref>
<Card
Expand Down
Loading

1 comment on commit 2efa02c

@vercel
Copy link

@vercel vercel bot commented on 2efa02c Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.