updated framing

This commit is contained in:
2024-06-12 23:00:05 -04:00
parent ed429155fd
commit 5f613b4ce5
2 changed files with 99 additions and 64 deletions
+37 -6
View File
@@ -1,5 +1,11 @@
import Day from "@/components/calendar/Day"; import Day from "@/components/calendar/Day";
import MonthCalendar from "@/components/calendar/MonthCalendar"; import MonthCalendar from "@/components/calendar/MonthCalendar";
import {
Card,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Metadata } from "next"; import { Metadata } from "next";
import React from "react"; import React from "react";
@@ -10,12 +16,37 @@ export const metadata: Metadata = {
const page = () => { const page = () => {
return ( return (
<div className="flex flex-col w-full h-full gap-4"> <div className="flex flex-col w-full h-full gap-4">
<div className="grid grid-cols-5 gap-4"> <div className="grid grid-cols-5 gap-4 h-52">
<div className="bg-card border-neutral-700 rounded-lg grow h-40">.</div> <Card>
<div className="bg-card border-neutral-700 rounded-lg grow h-40">.</div> <CardHeader className="items-center">
<div className="bg-card border-neutral-700 rounded-lg grow h-40">.</div> <CardDescription>Reporting Today</CardDescription>
<div className="bg-card border-neutral-700 rounded-lg grow h-40">.</div> <CardTitle className="font-extrabold text-7xl">12</CardTitle>
<div className="bg-card border-neutral-700 rounded-lg grow h-40">.</div> </CardHeader>
</Card>
<Card>
<CardHeader className="items-center">
<CardDescription>Reporting Today</CardDescription>
<CardTitle className="font-extrabold text-7xl">12</CardTitle>
</CardHeader>
</Card>
<Card>
<CardHeader className="items-center">
<CardDescription>Reporting Today</CardDescription>
<CardTitle className="font-extrabold text-7xl">12</CardTitle>
</CardHeader>
</Card>
<Card>
<CardHeader className="items-center">
<CardDescription>Reporting Today</CardDescription>
<CardTitle className="font-extrabold text-7xl">12</CardTitle>
</CardHeader>
</Card>
<Card>
<CardHeader className="items-center">
<CardDescription>Reporting Today</CardDescription>
<CardTitle className="font-extrabold text-7xl">12</CardTitle>
</CardHeader>
</Card>
</div> </div>
<div className="w-full h-full flex gap-4"> <div className="w-full h-full flex gap-4">
<MonthCalendar /> <MonthCalendar />
+62 -58
View File
@@ -8,16 +8,16 @@ const MonthCalendar = () => {
{ {
"date": "2023-06-12T08:00:00.000Z", "date": "2023-06-12T08:00:00.000Z",
"events": [ "events": [
{ "title": "BABA Conference", "variant": "conference", "time": "AMC" }, // { "title": "BABA Conference", "variant": "conference", "time": "AMC" },
{ "title": "MSFT Dividend", "variant": "dividend", "time": "BMO" }, // { "title": "MSFT Dividend", "variant": "dividend", "time": "BMO" },
{ "title": "MSFT Split", "variant": "split", "time": "AMC" }, // { "title": "MSFT Split", "variant": "split", "time": "AMC" },
{ "title": "GOOGL Event", "variant": "event", "time": "BMO" }, // { "title": "GOOGL Event", "variant": "event", "time": "BMO" },
{ "title": "BABA Event", "variant": "event", "time": "BMO" }, // { "title": "BABA Event", "variant": "event", "time": "BMO" },
{ "title": "WMT Earnings", "variant": "earnings", "time": "AMC" }, // { "title": "WMT Earnings", "variant": "earnings", "time": "AMC" },
{ "title": "AMZN Earnings", "variant": "earnings", "time": "AMC" }, // { "title": "AMZN Earnings", "variant": "earnings", "time": "AMC" },
{ "title": "GOOGL Earnings", "variant": "earnings", "time": "BMO" }, // { "title": "GOOGL Earnings", "variant": "earnings", "time": "BMO" },
{ "title": "AAPL Dividend", "variant": "dividend", "time": "AMC" }, // { "title": "AAPL Dividend", "variant": "dividend", "time": "AMC" },
{ "title": "BABA Conference", "variant": "conference", "time": "BMO" }, // { "title": "BABA Conference", "variant": "conference", "time": "BMO" },
], ],
}, },
{ {
@@ -76,25 +76,25 @@ const MonthCalendar = () => {
{ {
"date": "2023-06-20T08:00:00.000Z", "date": "2023-06-20T08:00:00.000Z",
"events": [ "events": [
{ "title": "AAPL Conference", "variant": "conference", "time": "BMO" }, // { "title": "AAPL Conference", "variant": "conference", "time": "BMO" },
{ "title": "WMT Event", "variant": "event", "time": "BMO" }, // { "title": "WMT Event", "variant": "event", "time": "BMO" },
{ "title": "MSFT Conference", "variant": "conference", "time": "BMO" }, // { "title": "MSFT Conference", "variant": "conference", "time": "BMO" },
{ "title": "TSLA Event", "variant": "event", "time": "BMO" }, // { "title": "TSLA Event", "variant": "event", "time": "BMO" },
{ "title": "GOOGL Dividend", "variant": "dividend", "time": "BMO" }, // { "title": "GOOGL Dividend", "variant": "dividend", "time": "BMO" },
{ "title": "TSLA Earnings", "variant": "earnings", "time": "AMC" }, // { "title": "TSLA Earnings", "variant": "earnings", "time": "AMC" },
], ],
}, },
{ {
"date": "2023-06-21T08:00:00.000Z", "date": "2023-06-21T08:00:00.000Z",
"events": [ "events": [
{ "title": "GOOGL Earnings", "variant": "earnings", "time": "AMC" }, // { "title": "GOOGL Earnings", "variant": "earnings", "time": "AMC" },
{ "title": "GOOGL Dividend", "variant": "dividend", "time": "AMC" }, // { "title": "GOOGL Dividend", "variant": "dividend", "time": "AMC" },
{ "title": "WMT Event", "variant": "event", "time": "BMO" }, // { "title": "WMT Event", "variant": "event", "time": "BMO" },
{ "title": "NVDA Dividend", "variant": "dividend", "time": "BMO" }, // { "title": "NVDA Dividend", "variant": "dividend", "time": "BMO" },
{ "title": "AAPL Dividend", "variant": "dividend", "time": "AMC" }, // { "title": "AAPL Dividend", "variant": "dividend", "time": "AMC" },
{ "title": "AMZN Conference", "variant": "conference", "time": "AMC" }, // { "title": "AMZN Conference", "variant": "conference", "time": "AMC" },
{ "title": "NVDA Earnings", "variant": "earnings", "time": "AMC" }, // { "title": "NVDA Earnings", "variant": "earnings", "time": "AMC" },
{ "title": "JPM Split", "variant": "split", "time": "BMO" }, // { "title": "JPM Split", "variant": "split", "time": "BMO" },
], ],
}, },
{ {
@@ -167,16 +167,18 @@ const MonthCalendar = () => {
}, },
{ {
"date": "2023-06-29T08:00:00.000Z", "date": "2023-06-29T08:00:00.000Z",
"events": [{ "title": "BABA Event", "variant": "event", "time": "BMO" }], "events": [
// { "title": "BABA Event", "variant": "event", "time": "BMO" }
],
}, },
{ {
"date": "2023-06-30T08:00:00.000Z", "date": "2023-06-30T08:00:00.000Z",
"events": [ "events": [
{ "title": "AAPL Earnings", "variant": "earnings", "time": "BMO" }, // { "title": "AAPL Earnings", "variant": "earnings", "time": "BMO" },
{ "title": "AAPL Split", "variant": "split", "time": "BMO" }, // { "title": "AAPL Split", "variant": "split", "time": "BMO" },
{ "title": "META Conference", "variant": "conference", "time": "AMC" }, // { "title": "META Conference", "variant": "conference", "time": "AMC" },
{ "title": "TSLA Event", "variant": "event", "time": "BMO" }, // { "title": "TSLA Event", "variant": "event", "time": "BMO" },
{ "title": "META Event", "variant": "event", "time": "AMC" }, // { "title": "META Event", "variant": "event", "time": "AMC" },
], ],
}, },
{ {
@@ -232,25 +234,25 @@ const MonthCalendar = () => {
{ {
"date": "2023-07-10T08:00:00.000Z", "date": "2023-07-10T08:00:00.000Z",
"events": [ "events": [
{ "title": "AMZN Split", "variant": "split", "time": "BMO" }, // { "title": "AMZN Split", "variant": "split", "time": "BMO" },
{ "title": "NVDA Dividend", "variant": "dividend", "time": "AMC" }, // { "title": "NVDA Dividend", "variant": "dividend", "time": "AMC" },
{ "title": "GOOGL Event", "variant": "event", "time": "BMO" }, // { "title": "GOOGL Event", "variant": "event", "time": "BMO" },
{ "title": "AAPL Dividend", "variant": "dividend", "time": "AMC" }, // { "title": "AAPL Dividend", "variant": "dividend", "time": "AMC" },
], ],
}, },
{ {
"date": "2023-07-11T08:00:00.000Z", "date": "2023-07-11T08:00:00.000Z",
"events": [ "events": [
{ "title": "TSLA Earnings", "variant": "earnings", "time": "BMO" }, // { "title": "TSLA Earnings", "variant": "earnings", "time": "BMO" },
{ "title": "AMZN Event", "variant": "event", "time": "BMO" }, // { "title": "AMZN Event", "variant": "event", "time": "BMO" },
{ "title": "AAPL Dividend", "variant": "dividend", "time": "BMO" }, // { "title": "AAPL Dividend", "variant": "dividend", "time": "BMO" },
{ "title": "WMT Conference", "variant": "conference", "time": "AMC" }, // { "title": "WMT Conference", "variant": "conference", "time": "AMC" },
{ "title": "JPM Event", "variant": "event", "time": "BMO" }, // { "title": "JPM Event", "variant": "event", "time": "BMO" },
{ "title": "NVDA Split", "variant": "split", "time": "BMO" }, // { "title": "NVDA Split", "variant": "split", "time": "BMO" },
{ "title": "AMZN Earnings", "variant": "earnings", "time": "BMO" }, // { "title": "AMZN Earnings", "variant": "earnings", "time": "BMO" },
{ "title": "AAPL Earnings", "variant": "earnings", "time": "AMC" }, // { "title": "AAPL Earnings", "variant": "earnings", "time": "AMC" },
{ "title": "AMZN Split", "variant": "split", "time": "AMC" }, // { "title": "AMZN Split", "variant": "split", "time": "AMC" },
{ "title": "TSLA Earnings", "variant": "earnings", "time": "BMO" }, // { "title": "TSLA Earnings", "variant": "earnings", "time": "BMO" },
], ],
}, },
{ {
@@ -304,22 +306,22 @@ const MonthCalendar = () => {
{ {
"date": "2023-07-19T08:00:00.000Z", "date": "2023-07-19T08:00:00.000Z",
"events": [ "events": [
{ "title": "META Dividend", "variant": "dividend", "time": "AMC" }, // { "title": "META Dividend", "variant": "dividend", "time": "AMC" },
{ "title": "GOOGL Conference", "variant": "conference", "time": "BMO" }, // { "title": "GOOGL Conference", "variant": "conference", "time": "BMO" },
{ "title": "WMT Split", "variant": "split", "time": "BMO" }, // { "title": "WMT Split", "variant": "split", "time": "BMO" },
{ "title": "MSFT Event", "variant": "event", "time": "BMO" }, // { "title": "MSFT Event", "variant": "event", "time": "BMO" },
{ "title": "AMZN Dividend", "variant": "dividend", "time": "BMO" }, // { "title": "AMZN Dividend", "variant": "dividend", "time": "BMO" },
], ],
}, },
{ {
"date": "2023-07-20T08:00:00.000Z", "date": "2023-07-20T08:00:00.000Z",
"events": [ "events": [
{ "title": "GOOGL Event", "variant": "event", "time": "BMO" }, // { "title": "GOOGL Event", "variant": "event", "time": "BMO" },
{ "title": "BABA Conference", "variant": "conference", "time": "AMC" }, // { "title": "BABA Conference", "variant": "conference", "time": "AMC" },
{ "title": "META Earnings", "variant": "earnings", "time": "AMC" }, // { "title": "META Earnings", "variant": "earnings", "time": "AMC" },
{ "title": "TSLA Event", "variant": "event", "time": "BMO" }, // { "title": "TSLA Event", "variant": "event", "time": "BMO" },
{ "title": "WMT Split", "variant": "split", "time": "BMO" }, // { "title": "WMT Split", "variant": "split", "time": "BMO" },
{ "title": "AAPL Earnings", "variant": "earnings", "time": "BMO" }, // { "title": "AAPL Earnings", "variant": "earnings", "time": "BMO" },
], ],
}, },
{ {
@@ -344,7 +346,9 @@ const MonthCalendar = () => {
}, },
{ {
"date": "2023-07-26T08:00:00.000Z", "date": "2023-07-26T08:00:00.000Z",
"events": [{ "title": "BABA Split", "variant": "split", "time": "AMC" }], "events": [
// { "title": "BABA Split", "variant": "split", "time": "AMC" }
],
}, },
// { // {
// "date": "2023-07-27T08:00:00.000Z", // "date": "2023-07-27T08:00:00.000Z",
@@ -387,12 +391,12 @@ const MonthCalendar = () => {
{dates.map((item, index) => ( {dates.map((item, index) => (
<div <div
key={index} key={index}
className="border border-neutral-700 flex flex-col" className="border border-neutral-700 flex flex-col border-r-0 border-b-0"
> >
<p className="font-bold p-2"> <p className="font-bold p-2">
{format(item.date, "d", { timeZone: "America/New_York" })} {format(item.date, "d", { timeZone: "America/New_York" })}
</p> </p>
<div className="grid grid-rows-5 overflow-hidden gap-1 p-1"> <div className="grid grid-rows-5 overflow-hidden gap-1 p-1 px-2">
{item.events.length < 5 {item.events.length < 5
? item.events.map((event: any, eventkey: number) => ( ? item.events.map((event: any, eventkey: number) => (
<CalendarItem <CalendarItem