Skip to content
Closed
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@
"initVersion": "7.37.0"
},
"packageManager": "npm@10.2.5"
}
}
Binary file added public/images/robochamp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions src/app/_components/admin/InterviewManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,8 @@ export default function InterviewManagement({
)}

{conflicts.length === 0 &&
interviewSchedule &&
interviewSchedule.filter((u) => u.interviewTime).length > 0 && (
(interviewSchedule?.filter((u) => u.interviewTime) ?? []).length >
0 && (
<div className="rounded border border-green-500/30 bg-green-900/20 p-4 text-center">
<div className="text-green-400">
<h4 className="mt-2 font-semibold">
Expand All @@ -664,15 +664,15 @@ export default function InterviewManagement({
</div>
)}

{interviewSchedule &&
interviewSchedule.filter((u) => u.interviewTime).length === 0 && (
<div className="rounded bg-gray-700 p-4 text-center">
<span className="text-gray-400">
No interviews scheduled yet. Use &quot;Auto Schedule All&quot;
to begin.
</span>
</div>
)}
{(interviewSchedule?.filter((u) => u.interviewTime) ?? []).length ===
0 && (
<div className="rounded bg-gray-700 p-4 text-center">
<span className="text-gray-400">
No interviews scheduled yet. Use &quot;Auto Schedule All&quot; to
begin.
</span>
</div>
)}
</div>

<div className="rounded-lg bg-gray-800 p-6">
Expand Down
11 changes: 3 additions & 8 deletions src/app/_components/imageFade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ import { motion, AnimatePresence } from "framer-motion";
import Image from "next/image";

export default function ImageFade({ className = "" }) {
const slides = [
"/images/teamPhotos/cand25.JPG",
"/images/teamPhotos/cand25-3rd.JPG",
"/images/teamPhotos/cand25-2nd.JPG",
"/images/teamPhotos/cand25-1st.JPG",
];
for (let i = 1; i <= 18; i++) {
slides.push(`/images/teamPhotos/cand25-${i}.JPG`);
const slides = [];
for (let i = 1; i <= 8; i++) {
slides.push(`/images/robochamp/robochamp-${i}.jpg`);
}

const [currentSlide, setCurrentSlide] = useState(0);
Expand Down
2 changes: 1 addition & 1 deletion src/app/_components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default async function Navbar() {
<Link href="team">Team</Link>
{canJudge && <Link href="judge">Judge</Link>}
{session?.user.role === Role.ADMIN && <Link href="admin">Admin</Link>}
<Link href="editions">Past Editions</Link>
{/* <Link href="editions">Past Editions</Link> */}
<Link href="https://www.roborregos.com">About us</Link>
</div>
<div className="hidden lg:block">
Expand Down
89 changes: 21 additions & 68 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,22 @@ import capitalOne from "../../public/images/sponsors/CapitalOne.png";
import stanser from "../../public/images/sponsors/Stanser.png";
import github from "../../public/images/sponsors/github.png";
import robologo from "../../public/images/white-logo.png";
import coffeeCart from "../../public/images/sponsors/coffeeCart.png";
import peckers from "../../public/images/sponsors/peckers.png";
import tapiocaHouse from "../../public/images/sponsors/tapiocaHouse.jpg";
import kube from "../../public/images/sponsors/kube.jpg";
import digikey from "../../public/images/sponsors/DigiKey.png";
import kiko from "../../public/images/sponsors/kiko.jpg";
import heppy from "../../public/images/sponsors/heppy.png";
import ball from "../../public/images/ball.jpg";
import maze from "../../public/images/maze.jpg";
import line from "../../public/images/line.jpg";
import robochamp from "../../public/images/robochamp.png";
import Footer from "./_components/footer";
import EventTimeline from "./_components/timeline";
import ImageFade from "./_components/imageFade";

export default async function Home() {
const sponsors = [
capitalOne,
stanser,
github,
digikey,
tapiocaHouse,
coffeeCart,
peckers,
kube,
kiko,
heppy,
];
const sponsors = [capitalOne, stanser, github, digikey];

return (
<HydrateClient>
<main>
<section className="relative flex min-h-[150vw] flex-col items-center justify-start overflow-hidden lg:min-h-screen lg:justify-center">
<div className="z-10 mt-[30vw] text-center lg:mt-0">
<h1 className="font-jersey_25 text-[17vw] leading-none text-roboblue lg:text-[12vw]">
CANDIDATES
ROBOCHAMP
</h1>
<p className="mt-[-2vw] font-anton text-[6vw] text-white lg:text-[3vw]">
By RoBorregos
Expand All @@ -58,66 +39,38 @@ export default async function Home() {
<div className="mx-[10vw] text-center font-archivo text-[1rem] text-white lg:mx-[10rem] lg:text-[1.5rem]">
<span className="text-[2rem] font-bold">Meet the </span>
<span className="font-jersey_25 text-[4rem] text-roboblue">
challenges
challenge
</span>
<div className="mt-[10vw] lg:mx-[8vw] lg:mt-[1vw]">
Distributed in three different arenas, teams will have three
opportunities to demonstrate their skills and creativity in each one
of them by scoring points in the unique tests.
RoBorregos with the Tec de Monterrey&apos;s school of engineering
presents RoboChamp. A robotics competition where teams will take
their first steps into the world of robotics and programming.
</div>
</div>

<section className="mx-[5vw] mt-[5rem] grid gap-[5rem] text-[1.25rem] lg:mx-[5rem] lg:mt-[10rem] lg:grid-cols-3">
<div className="relative rounded-xl bg-gradient-to-tr from-neutral-950 to-neutral-800">
<div className="group relative">
<Image
src={maze}
alt=""
className={`h-[15rem] w-full rounded-xl object-cover blur-[0.1rem] transition duration-300 ease-in-out group-hover:blur-none lg:ml-5 lg:mt-5`}
/>
<div className="absolute top-0 h-[15rem] w-full content-center bg-gradient-to-t from-black to-roboblue bg-clip-text text-center font-anton text-[5rem] text-transparent transition duration-300 group-hover:opacity-0 lg:left-5">
MAZE
</div>
</div>
<p className="m-[1rem] text-justify font-archivo text-white">
Navigate a grid of tiles, detect ground colors, and score as you
explore the maze. Find the exit to complete the route and win
bonus points you must return from where you came from.
</p>
</div>

<div className="rounded-xl bg-gradient-to-tr from-neutral-950 to-neutral-800">
<div className="group relative">
<Image
src={line}
alt=""
className={`h-[15rem] w-full rounded-xl object-cover blur-[0.1rem] transition duration-300 ease-in-out group-hover:blur-none lg:ml-5 lg:mt-5`}
/>
<div className="absolute top-0 h-[15rem] w-full content-center bg-gradient-to-t from-black to-roboblue bg-clip-text text-center font-anton text-[5rem] text-transparent transition duration-300 group-hover:opacity-0 lg:left-5">
LINE
</div>
</div>
<p className="m-[1rem] text-justify font-archivo text-white">
The classic line follower returns with a twist. Teams pick their
difficulty by choosing track modules and taking the riskier path
to the end if they&apos; re looking to win!
</p>
</div>
<div></div>
<div className="rounded-xl bg-gradient-to-tr from-neutral-950 to-neutral-800">
<div className="group relative">
<Image
src={ball}
src={robochamp}
alt=""
className={`h-[15rem] w-full rounded-xl object-cover blur-[0.1rem] transition duration-300 ease-in-out group-hover:blur-none lg:ml-5 lg:mt-5`}
/>
<div className="absolute top-0 h-[15rem] w-full content-center bg-gradient-to-t from-black to-roboblue bg-clip-text text-center font-anton text-[5rem] text-transparent transition duration-300 group-hover:opacity-0 lg:left-5">
BALL
DEACTIVATE THE BOMB
</div>
</div>
<p className="m-[1rem] text-justify font-archivo text-white">
Detect flags on the field and follow their instructions to locate
and interact with the ball. Precision, timing, and control are key
to maximize your score.
El destino de la ciudad pende de un hilo en la Zona 2: Sistema
Madre de la Bomba. Tras superar la seguridad inicial, el operario
y su equipo se enfrentan a la misión más crítica: desactivar la
bomba. Deberán demostrar precisión y lógica para
&quot;cortar&quot; los cuatro cables (azul, rojo, verde, amarillo)
en el orden exacto, cuya combinación se oculta en pistas
aleatorias. La gestión del riesgo, la toma de decisiones bajo
presión y la coordinación experta definirán el éxito o el fracaso
en este momento crucial.
</p>
</div>
</section>
Expand All @@ -131,13 +84,13 @@ export default async function Home() {
</span>
</div>

<section className="mt-[3rem] grid w-full grid-cols-2 gap-5 bg-white px-[5vw] py-5 lg:grid-cols-5 lg:px-[5rem]">
<section className="mt-[3rem] grid w-full grid-cols-2 gap-5 bg-white px-[5vw] py-5 lg:grid-cols-4 lg:px-[5rem]">
{sponsors.map((sponsor, index) => (
<div key={index} className="flex items-center justify-center">
<Image
src={sponsor}
alt={sponsor.src}
className="h-[5rem] w-full max-w-[200px] object-contain"
className="h-[10rem] w-full max-w-[200px] object-contain"
/>
</div>
))}
Expand Down
54 changes: 24 additions & 30 deletions src/server/api/routers/admin/round-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ export const roundControlRouter = createTRPCRouter({
try {
let config = await ctx.db.config.findFirst();

if (!config) {
config = await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});
}
config ??= await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});

return config;
} catch {
Expand Down Expand Up @@ -67,16 +65,14 @@ export const roundControlRouter = createTRPCRouter({
let config;
try {
config = await ctx.db.config.findFirst();
if (!config) {
config = await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});
}
config ??= await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});

const visibleRoundsCount = await ctx.db.round
.findMany({
Expand Down Expand Up @@ -180,16 +176,14 @@ export const roundControlRouter = createTRPCRouter({

// Update config
let config = await ctx.db.config.findFirst();
if (!config) {
config = await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});
}
config ??= await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});

const totalVisible = revealedNumbers.length + 1;
await ctx.db.config.update({
Expand Down
32 changes: 14 additions & 18 deletions src/server/api/routers/admin/schedule-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,13 @@ export const scheduleManagementRouter = createTRPCRouter({
where: { teamId: team.id, number: round },
});

if (!roundRecord) {
roundRecord = await ctx.db.round.create({
data: {
teamId: team.id,
number: round,
isVisible: false, // Will be revealed manually
},
});
}
roundRecord ??= await ctx.db.round.create({
data: {
teamId: team.id,
number: round,
isVisible: false, // Will be revealed manually
},
});

// Create the challenge entry
await ctx.db.challenge.create({
Expand Down Expand Up @@ -326,15 +324,13 @@ export const scheduleManagementRouter = createTRPCRouter({
where: { teamId: team.id, number: roundNumber },
});

if (!roundRecord) {
roundRecord = await ctx.db.round.create({
data: {
teamId: team.id,
number: roundNumber,
isVisible: false,
},
});
}
roundRecord ??= await ctx.db.round.create({
data: {
teamId: team.id,
number: roundNumber,
isVisible: false,
},
});

await ctx.db.challenge.create({
data: {
Expand Down
16 changes: 7 additions & 9 deletions src/server/api/routers/admin/testing-utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,13 @@ export const testingUtilitiesRouter = createTRPCRouter({
where: { teamId: team.id, number: round },
});

if (!roundRecord) {
roundRecord = await ctx.db.round.create({
data: {
teamId: team.id,
number: round,
isVisible: false,
},
});
}
roundRecord ??= await ctx.db.round.create({
data: {
teamId: team.id,
number: round,
isVisible: false,
},
});

await ctx.db.challenge.create({
data: {
Expand Down
Loading