mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 01:07:01 +00:00
news table update, market movers added, colors changed, borders changed, navbar changed
This commit is contained in:
@@ -859,3 +859,29 @@ export const newsData: newsDataType[] = [
|
||||
"outletLogo": "https://logo.here/bloomberg",
|
||||
},
|
||||
];
|
||||
|
||||
export const winnerMovers = [
|
||||
{ symbol: "AAPL", stockPrice: 150.25, percentChange: 8.3 },
|
||||
{ symbol: "MSFT", stockPrice: 300.89, percentChange: 7.6 },
|
||||
{ symbol: "GOOGL", stockPrice: 2700.45, percentChange: 9.2 },
|
||||
{ symbol: "AMZN", stockPrice: 3300.75, percentChange: 6.8 },
|
||||
{ symbol: "FB", stockPrice: 330.57, percentChange: 10.1 },
|
||||
{ symbol: "TSLA", stockPrice: 900.67, percentChange: 12.5 },
|
||||
{ symbol: "JPM", stockPrice: 150.75, percentChange: 6.9 },
|
||||
{ symbol: "NVDA", stockPrice: 350.64, percentChange: 13.5 },
|
||||
{ symbol: "DIS", stockPrice: 170.88, percentChange: 8.7 },
|
||||
{ symbol: "BABA", stockPrice: 180.45, percentChange: 9.8 },
|
||||
];
|
||||
|
||||
export const loserMovers = [
|
||||
{ symbol: "GE", stockPrice: 10.25, percentChange: -7.8 },
|
||||
{ symbol: "WFC", stockPrice: 25.63, percentChange: -6.3 },
|
||||
{ symbol: "XOM", stockPrice: 50.45, percentChange: -8.5 },
|
||||
{ symbol: "CCL", stockPrice: 15.75, percentChange: -9.1 },
|
||||
{ symbol: "UAL", stockPrice: 35.85, percentChange: -7.2 },
|
||||
{ symbol: "UAA", stockPrice: 18.54, percentChange: -6.9 },
|
||||
{ symbol: "BA", stockPrice: 160.44, percentChange: -10.3 },
|
||||
{ symbol: "MRO", stockPrice: 12.35, percentChange: -8.9 },
|
||||
{ symbol: "OXY", stockPrice: 18.22, percentChange: -7.6 },
|
||||
{ symbol: "WYNN", stockPrice: 80.75, percentChange: -11.2 },
|
||||
];
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: 20 14.3% 4.1%;
|
||||
--background: 230 10.3% 11.4%;
|
||||
--foreground: 60 9.1% 97.8%;
|
||||
--card: 20 14.3% 4.1%;
|
||||
--card-foreground: 60 9.1% 97.8%;
|
||||
|
||||
+4
-2
@@ -19,10 +19,12 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={cn("min-h-screen antialiased", red_hat.className)}>
|
||||
<body
|
||||
className={cn("h-[calc(100vh-64px)] antialiased", red_hat.className)}
|
||||
>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
defaultTheme="dark"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
|
||||
+41
-3
@@ -1,9 +1,47 @@
|
||||
import HomePageGrid from "@/components/grid/HomePageGrid";
|
||||
import {
|
||||
PortfolioModule,
|
||||
NewsModule,
|
||||
HeatmapModule,
|
||||
MarketsModule,
|
||||
MoversModule,
|
||||
EarningsModule,
|
||||
DocumentsModule,
|
||||
IndicatorsModule,
|
||||
ForexAndBondsModule,
|
||||
} from "@/components/modules/HomepageModules";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main className="h-screen">
|
||||
<HomePageGrid />
|
||||
<main className="h-full flex bg-[rgb(26,27,32)]">
|
||||
<div className="flex-1 px-6 pb-6 grid grid-rows-3 grid-cols-12 gap-6">
|
||||
<div className="col-span-4 sm:col-span-4">
|
||||
<PortfolioModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-4">
|
||||
<NewsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-4">
|
||||
<HeatmapModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-6">
|
||||
<MoversModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-6">
|
||||
<MarketsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-3">
|
||||
<EarningsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-3">
|
||||
<DocumentsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-3">
|
||||
<IndicatorsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-3">
|
||||
<ForexAndBondsModule />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
import React from "react";
|
||||
import {
|
||||
PortfolioModule,
|
||||
NewsModule,
|
||||
HeatmapModule,
|
||||
MarketsModule,
|
||||
MoversModule,
|
||||
EarningsModule,
|
||||
DocumentsModule,
|
||||
IndicatorsModule,
|
||||
ForexAndBondsModule,
|
||||
} from "../modules/HomepageModules";
|
||||
|
||||
function HomePageGrid() {
|
||||
return (
|
||||
<div className="h-screen px-4 grid grid-rows-3 grid-cols-12 gap-4">
|
||||
<div className="col-span-4 sm:col-span-4">
|
||||
<PortfolioModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-4">
|
||||
<NewsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-4">
|
||||
<HeatmapModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-6">
|
||||
<MoversModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-6">
|
||||
<MarketsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-3">
|
||||
<EarningsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-3">
|
||||
<DocumentsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-3">
|
||||
<IndicatorsModule />
|
||||
</div>
|
||||
<div className="col-span-4 sm:col-span-3">
|
||||
<ForexAndBondsModule />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default HomePageGrid;
|
||||
@@ -9,11 +9,13 @@ interface HomepageModuleProps {
|
||||
|
||||
const HomepageModule = ({ title, children }: HomepageModuleProps) => {
|
||||
return (
|
||||
<div className="flex flex-col h-full bg-neutral-800 rounded-lg">
|
||||
<div className="flex flex-col h-full bg-[rgb(19,20,25)] rounded-lg">
|
||||
<div className="flex justify-between px-2 py-2 pb-0">
|
||||
<div className="flex items-center text-lg px-2">{title}</div>
|
||||
<div className="flex items-center text-lg px-2 font-semibold">
|
||||
{title}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex-grow w-full overflow-hidden mt-2 border-t-2 border-neutral-700">
|
||||
<div className="flex-grow w-full overflow-hidden mt-2 border-t border-neutral-400">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import { heatmapData, newsData, portfolioData } from "@/app/MockData/MockData";
|
||||
import {
|
||||
heatmapData,
|
||||
newsData,
|
||||
portfolioData,
|
||||
winnerMovers,
|
||||
loserMovers,
|
||||
} from "@/app/MockData/MockData";
|
||||
import HomepageModule from "./HomepageModuleCard";
|
||||
import PortfolioChart from "../charts/PortfolioChart";
|
||||
import MarketHeatmap from "../charts/MarketHeatmap";
|
||||
import { Button } from "../ui/button";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import { ArrowRight, Divide } from "lucide-react";
|
||||
import { NewsTable } from "../charts/news/NewsTable";
|
||||
import { newsColumns } from "../charts/news/newsColumns";
|
||||
|
||||
@@ -42,14 +48,57 @@ export const HeatmapModule = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export const MarketsModule = () => {
|
||||
return <HomepageModule title="Markets"></HomepageModule>;
|
||||
};
|
||||
|
||||
export const MoversModule = () => {
|
||||
return <HomepageModule title="Movers"></HomepageModule>;
|
||||
};
|
||||
|
||||
export const MarketsModule = () => {
|
||||
return (
|
||||
<HomepageModule title="Markets">
|
||||
<div className="flex justify-between px-8">
|
||||
<div className="mt-6">
|
||||
<div className="text-lg">Gainers</div>
|
||||
<div className="mt-4 grid grid-cols-2 grid-rows-5 gap-y-6 gap-x-10">
|
||||
{winnerMovers.map((item) => (
|
||||
<div
|
||||
className="flex border-b border-neutral-400 pb-1"
|
||||
key={item.symbol}
|
||||
>
|
||||
<div className="w-24 font-bold">{item.symbol}</div>
|
||||
<div className="w-20 text-right text-neutral-400">
|
||||
{item.stockPrice}
|
||||
</div>
|
||||
<div className="ml-4 rounded-lg bg-green-700 bg-opacity-90 w-16 text-center">
|
||||
+{item.percentChange}%
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6">
|
||||
<div className="text-lg">Losers</div>
|
||||
<div className="mt-4 grid grid-cols-2 grid-rows-5 gap-y-6 gap-x-10">
|
||||
{loserMovers.map((item) => (
|
||||
<div
|
||||
className="flex border-b border-neutral-400 pb-1"
|
||||
key={item.symbol}
|
||||
>
|
||||
<div className="w-24 font-bold">{item.symbol}</div>
|
||||
<div className="w-20 text-right text-neutral-400">
|
||||
{item.stockPrice}
|
||||
</div>
|
||||
<div className="ml-4 rounded-lg bg-red-700 bg-opacity-90 w-16 text-center">
|
||||
{item.percentChange}%
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</HomepageModule>
|
||||
);
|
||||
};
|
||||
|
||||
export const EarningsModule = () => {
|
||||
return <HomepageModule title="Earnings"></HomepageModule>;
|
||||
};
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
import React from "react";
|
||||
import { Button } from "../ui/button";
|
||||
|
||||
const NavPages = () => {
|
||||
return (
|
||||
<div className="flex justify-between gap-8 px-8">
|
||||
<Button variant="link" className="text-white font-bold">
|
||||
HOME
|
||||
</Button>
|
||||
<Button variant="link" className="text-white font-bold">
|
||||
PORTFOLIO
|
||||
</Button>
|
||||
<Button variant="link" className="text-white font-bold">
|
||||
RESEARCH
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NavPages;
|
||||
@@ -1,35 +1,43 @@
|
||||
import React from "react";
|
||||
import { Button } from "../ui/button";
|
||||
import { Circle, Search, icons } from "lucide-react";
|
||||
import NavPages from "./NavPages";
|
||||
import { Search } from "lucide-react";
|
||||
import { Input } from "../ui/input";
|
||||
|
||||
const Navbar = () => {
|
||||
return (
|
||||
<div className="h-16 p-4 w-screen flex flex-row justify-between items-center">
|
||||
<div className="h-16 p-6 w-screen flex flex-row justify-between items-center bg-[rgb(26,27,32)]">
|
||||
<div className="flex">
|
||||
<Button variant="linkNoUnderline" className="text-3xl font-bold">
|
||||
YellowBird
|
||||
</Button>
|
||||
<NavPages />
|
||||
<div className="flex justify-between gap-8 px-8">
|
||||
<Button variant="link" className="text-white font-bold">
|
||||
HOME
|
||||
</Button>
|
||||
<Button variant="link" className="text-white font-bold">
|
||||
PORTFOLIO
|
||||
</Button>
|
||||
<Button variant="link" className="text-white font-bold">
|
||||
RESEARCH
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex">
|
||||
<div className="flex items-center px-4">
|
||||
<div className="">
|
||||
<Input
|
||||
className="rounded-full rounded-r-none min-w-80 bg-inherit border-primary p-4"
|
||||
type="search"
|
||||
placeholder="Search"
|
||||
/>
|
||||
</div>
|
||||
<div className="">
|
||||
<Button type="submit" className="w-14 rounded-full rounded-l-none">
|
||||
<Search size={16} />
|
||||
</Button>
|
||||
</div>
|
||||
<Input
|
||||
className="rounded-lg rounded-r-none w-96 bg-inherit border-neutral-700 p-4"
|
||||
type="search"
|
||||
placeholder="Search"
|
||||
/>
|
||||
<Button
|
||||
type="submit"
|
||||
className="w-14 rounded-lg rounded-l-none bg-transparent border-neutral-700 border border-l-0 text-primary hover:text-neutral-700"
|
||||
>
|
||||
<Search size={16} />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<Button className="rounded-full" size="icon">
|
||||
<Button className="rounded-lg" size="icon">
|
||||
ME
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ const TableRow = React.forwardRef<
|
||||
<tr
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
||||
"border-b border-neutral-400 transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user