Skip to content

Commit

Permalink
merge: Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rexmagnusdavid committed Jun 10, 2024
2 parents 29bde5b + 20af3b8 commit 2013da4
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 0 deletions.
79 changes: 79 additions & 0 deletions app/components/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import React from "react";
import { Title } from "./Title";

export function Calendar() {
//let name = props.name;

return (
<React.Fragment>
<div className="flex h-full basis-1/3 flex-col items-center gap-2">
<div className="flex h-14 w-full flex-row items-center justify-center rounded-lg bg-emerald-700">
{<Title name={"Yesterday"}></Title>}
</div>
<div className="flex w-full grow flex-col items-center gap-2 rounded-lg bg-slate-100 p-2">
<div className="flex h-14.5 items-center justify-center">
<h1 className="font-bold text-emerald-700 2xl:text-5xl">May</h1>
</div>
<div className="flex aspect-square h-14 items-center justify-center rounded-full bg-emerald-700">
<h1 className="font-semibold text-slate-100 2xl:text-4xl">7</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">AM AP Human Geography</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">AM AP Micro</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">PM AP Statistics</h1>
</div>
</div>
</div>
<div className="flex h-full basis-1/3 flex-col items-center gap-2">
<div className="flex h-14 w-full flex-row items-center justify-center rounded-lg bg-emerald-700">
{<Title name={"Today"}></Title>}
</div>
<div className="flex w-full grow flex-col items-center gap-2 rounded-lg bg-slate-100 p-2">
<div className="flex h-14.5 items-center justify-center">
<h1 className="font-bold text-emerald-700 2xl:text-5xl">May</h1>
</div>
<div className="flex aspect-square h-14 items-center justify-center rounded-full bg-emerald-700">
<h1 className="font-semibold text-slate-100 2xl:text-4xl">8</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">AM AP English Lit</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">PM AP Comp Gov</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">PM AP Computer Science</h1>
</div>
</div>
</div>
<div className="flex h-full basis-1/3 flex-col items-center gap-2">
<div className="flex h-14 w-full flex-row items-center justify-center rounded-lg bg-emerald-700">
{<Title name={"Tommorow"}></Title>}
</div>
<div className="flex w-full grow flex-col items-center gap-2 rounded-lg bg-slate-100">
<div className="flex w-full grow flex-col items-center gap-2 rounded-lg bg-slate-100 p-2">
<div className="flex h-14.5 items-center justify-center">
<h1 className="font-bold text-emerald-700 2xl:text-5xl">May</h1>
</div>
<div className="flex aspect-square h-14 items-center justify-center rounded-full bg-emerald-700">
<h1 className="font-semibold text-slate-100 2xl:text-4xl">9</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">AM AP Chinese</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">AM AP Environmental</h1>
</div>
<div className="line-clamp-2 flex h-21 w-full items-center justify-center rounded-lg bg-emerald-700 px-2">
<h1 className="text-center font-bold text-slate-100 2xl:text-4xl">PM AP Pyschology</h1>
</div>
</div>
</div>
</div>
</React.Fragment>
);
}
54 changes: 54 additions & 0 deletions app/components/News.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from "react";
import { Bullet } from "./Bullet";
import { Title } from "./Title";

export function News(props: {
name: string;
headers: Array<string>;
routes: { [key: string]: { [key: string]: string } };
index: number;
}) {
let name = props.name;
let headers = props.headers;
let routes = props.routes;
let index = props.index;

return (
<React.Fragment>
<div className="flex h-14 flex-row items-center rounded-lg bg-emerald-700">
{headers.length > 0 ? (
<Title name={name + " (" + (index + 1) + "/" + headers.length + ")"}></Title>
) : (
<Title name={name}></Title>
)}
</div>

{headers.length > 0 ? (
<div className="flex h-51 w-full flex-row items-start rounded-lg bg-slate-100 px-4 py-2">
<h1 className="line-clamp-5 text-pretty font-semibold 2xl:text-4xl 2xl:leading-tight">
{headers[index].split(/(\[.*?\])/).map((text) => {
if (text.length === 0) return;
if (text.charAt(0) === "[" && text.charAt(text.length - 1) === "]") {
return (
<div className="mx-1 inline-flex -translate-y-1.5" key={Math.random()}>
<Bullet
short_name={text.charAt(1)}
color={routes[text.charAt(1)].route_color}
text_color={routes[text.charAt(1)].route_text_color}
size={42}
/>
</div>
);
}
return text;
})}
</h1>
</div>
) : (
<div className="flex w-full grow flex-row items-center rounded-lg bg-slate-100">
<h1 className="w-full text-center font-bold text-black 2xl:text-5xl">No active alerts </h1>
</div>
)}
</React.Fragment>
);
}
2 changes: 2 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const config = {
},
},
spacing: {
14.5: "58px",
21: "104px",
29: "116px",
62: "248px",
},
Expand Down

0 comments on commit 2013da4

Please sign in to comment.