diff --git a/src/routes/stocks/[tickerID]/dividends/+layout.svelte b/src/routes/stocks/[tickerID]/dividends/+layout.svelte index 9940ab83..464c89b6 100644 --- a/src/routes/stocks/[tickerID]/dividends/+layout.svelte +++ b/src/routes/stocks/[tickerID]/dividends/+layout.svelte @@ -1,7 +1,35 @@ @@ -25,7 +53,7 @@ > - Pro Subscription 🔥 + Pro Subscription @@ -36,43 +64,31 @@ {/if} - - - - - Price Alert ⏰ - - + + + {$stockTicker} News + + + {#each data?.getNews?.slice(0, 10) as item} + + {formatDate(item?.publishedDate)} ago - + {item?.title} + - {item?.site} + + {/each} + - - Customize your alerts to never miss out again - - - - - - - - - Stock Screener 🔎 - - - - - Build your Stock Screener to find profitable stocks. - - - + + {/if} diff --git a/src/routes/stocks/[tickerID]/financials/+layout.svelte b/src/routes/stocks/[tickerID]/financials/+layout.svelte index 6ed1653c..85c6bdb9 100644 --- a/src/routes/stocks/[tickerID]/financials/+layout.svelte +++ b/src/routes/stocks/[tickerID]/financials/+layout.svelte @@ -1,7 +1,9 @@ - - - - - - - - changeSubSection("income")} - class="px-2 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === - 'income' - ? 'text-white ' - : 'bg-[#09090B]'}" + + + + + + + + - Income - - - - - changeSubSection("balance-sheet")} - class="px-2 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === - 'balance-sheet' - ? 'text-white ' - : 'bg-[#09090B]'}" - > - Balance Sheet - - - - - changeSubSection("cash-flow")} - class="px-2 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === - 'cash-flow' - ? 'text-white ' - : 'bg-[#09090B]'}" - > - Cashflow - - - + + changeSubSection("income")} + class="px-2 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === + 'income' + ? 'text-white ' + : 'bg-[#09090B]'}" + > + Income + + + + + changeSubSection("balance-sheet")} + class="px-2 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === + 'balance-sheet' + ? 'text-white ' + : 'bg-[#09090B]'}" + > + Balance Sheet + + + + + changeSubSection("cash-flow")} + class="px-2 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === + 'cash-flow' + ? 'text-white ' + : 'bg-[#09090B]'}" + > + Cashflow + + + - - changeSubSection("ratios")} - class="px-2 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === - 'ratios' - ? 'text-white ' - : 'bg-[#09090B]'}" - > - Ratios - + + changeSubSection("ratios")} + class="px-2 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === + 'ratios' + ? 'text-white ' + : 'bg-[#09090B]'}" + > + Ratios + + + + + + + + + + {#if $coolMode} + + class="w-full bg-[#141417] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-lg h-fit pb-4 mt-4 cursor-pointer" + > + + + + Pro Subscription + + + + + Upgrade now for unlimited access to all data and tools. + + + + {/if} + + + + + + Watchlist + + + + + Build your watchlist to keep track of your favorite stocks. + + + + + + + + + Top Stocks + + + + + Get the latest top Wall Street Analyst Ratings + + + + + {/if} - - - + diff --git a/src/routes/stocks/[tickerID]/financials/+page.svelte b/src/routes/stocks/[tickerID]/financials/+page.svelte index 5b0f02d4..ab78a9f5 100644 --- a/src/routes/stocks/[tickerID]/financials/+page.svelte +++ b/src/routes/stocks/[tickerID]/financials/+page.svelte @@ -3,6 +3,7 @@ numberOfUnreadNotification, displayCompanyName, stockTicker, + coolMode, } from "$lib/store"; import { abbreviateNumber } from "$lib/utils"; import * as DropdownMenu from "$lib/components/shadcn/dropdown-menu/index.js"; @@ -28,7 +29,7 @@ let filterRule = "annual"; let displayStatement = "revenue"; - let mode = false; + $coolMode = false; let timeFrame = "10Y"; onMount(async () => { @@ -141,7 +142,7 @@ ]; function toggleMode() { - mode = !mode; + $coolMode = !$coolMode; } function changeStatement(event) { @@ -330,7 +331,7 @@ } income = filterStatement(fullStatement, timeFrame); - if (mode === true) { + if ($coolMode === true) { optionsData = plotData(); } } @@ -379,7 +380,7 @@ - {#if mode} + {#if $coolMode} {statementConfig?.find( (item) => item?.propertyName === displayStatement, )?.label} @@ -405,7 +406,7 @@ /> - {#if mode} + {#if $coolMode} {statementConfig?.find( (item) => item?.propertyName === displayStatement, )?.text} @@ -471,14 +472,14 @@ - {#if mode} + {#if $coolMode} Cool Mode @@ -565,7 +566,7 @@ - {#if mode} + {#if $coolMode} - import ArrowLogo from "lucide-svelte/icons/move-up-right"; - import { coolMode } from "$lib/store"; - - export let data; - - - - - - - - - - - {#if $coolMode} - - {/if} - - - - diff --git a/src/routes/stocks/[tickerID]/financials/cash-flow/+page.svelte b/src/routes/stocks/[tickerID]/financials/cash-flow/+page.svelte index 1a00b3fc..edd62d76 100644 --- a/src/routes/stocks/[tickerID]/financials/cash-flow/+page.svelte +++ b/src/routes/stocks/[tickerID]/financials/cash-flow/+page.svelte @@ -2,6 +2,7 @@ import { numberOfUnreadNotification, displayCompanyName, + coolMode, stockTicker, } from "$lib/store"; import { abbreviateNumber } from "$lib/utils"; @@ -25,7 +26,7 @@ let filterRule = "annual"; let displayStatement = "netIncome"; - let mode = false; + $coolMode = false; let tableList = []; let timeFrame = "10Y"; @@ -160,7 +161,7 @@ ]; function toggleMode() { - mode = !mode; + $coolMode = !$coolMode; } function changeStatement(event) { @@ -351,7 +352,7 @@ cashFlow = filterStatement(fullStatement, timeFrame); - if (mode === true) { + if ($coolMode === true) { optionsData = plotData(); } } @@ -404,7 +405,7 @@ - {#if mode} + {#if $coolMode} {statementConfig?.find( (item) => item?.propertyName === displayStatement, )?.label} @@ -428,7 +429,7 @@ /> - {#if mode} + {#if $coolMode} {statementConfig?.find( (item) => item?.propertyName === displayStatement, )?.text} @@ -494,14 +495,14 @@ - {#if mode} + {#if $coolMode} Cool Mode @@ -588,7 +589,7 @@ - {#if mode} + {#if $coolMode} - {#if mode} + {#if $coolMode} {statementConfig?.find( (item) => item?.propertyName === displayStatement, )?.label} @@ -392,7 +393,7 @@ /> - {#if mode} + {#if $coolMode} {statementConfig?.find( (item) => item?.propertyName === displayStatement, )?.text} @@ -458,14 +459,14 @@ - {#if mode} + {#if $coolMode} Cool Mode @@ -552,7 +553,7 @@ - {#if mode} + {#if $coolMode} import { stockTicker, screenWidth } from "$lib/store"; + import ArrowLogo from "lucide-svelte/icons/move-up-right"; + import { page } from "$app/stores"; export let data; + const formatDate = (dateString) => { + // Create a date object for the input dateString + const inputDate = new Date(dateString); + + // Create a date object for the current time in New York City + const nycTime = new Date().toLocaleString("en-US", { + timeZone: "America/New_York", + }); + const currentNYCDate = new Date(nycTime); + + // Calculate the difference in milliseconds + const difference = inputDate.getTime() - currentNYCDate.getTime(); + + // Convert the difference to minutes + const minutes = Math.abs(Math.round(difference / (1000 * 60))); + + if (minutes < 60) { + return `${minutes} minutes`; + } else if (minutes < 1440) { + const hours = Math.round(minutes / 60); + return `${hours} hour${hours !== 1 ? "s" : ""}`; + } else { + const days = Math.round(minutes / 1440); + return `${days} day${days !== 1 ? "s" : ""}`; + } + }; + let displaySubSection = ""; if (!displaySubSection || displaySubSection.length === 0) { @@ -39,73 +68,127 @@ } - - - + + + - - - changeSubSection("insider")} - class="text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === - 'insider' - ? 'text-white ' - : 'bg-[#09090B]'}" + + + - Insider Trading - - - - - changeSubSection("congress-trading")} - class="text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === - 'congress-trading' - ? 'text-white ' - : 'bg-[#09090B]'}" - > - Congress Trading - - - - - changeSubSection("transcripts")} - class="text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === - 'transcripts' - ? 'text-white ' - : 'bg-[#09090B]'}" - > - Transcripts - - - - - - + + changeSubSection("insider")} + class="text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === + 'insider' + ? 'text-white ' + : 'bg-[#09090B]'}" + > + Insider Trading + + + + + changeSubSection("congress-trading")} + class="text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === + 'congress-trading' + ? 'text-white ' + : 'bg-[#09090B]'}" + > + Congress Trading + + + + + changeSubSection("transcripts")} + class="text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySubSection === + 'transcripts' + ? 'text-white ' + : 'bg-[#09090B]'}" + > + Transcripts + + + + + + + - + + + diff --git a/src/routes/stocks/[tickerID]/insider/congress-trading/+layout.svelte b/src/routes/stocks/[tickerID]/insider/congress-trading/+layout.svelte deleted file mode 100644 index 49d20375..00000000 --- a/src/routes/stocks/[tickerID]/insider/congress-trading/+layout.svelte +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/routes/stocks/[tickerID]/options/+layout.svelte b/src/routes/stocks/[tickerID]/options/+layout.svelte index 49d20375..8956036b 100644 --- a/src/routes/stocks/[tickerID]/options/+layout.svelte +++ b/src/routes/stocks/[tickerID]/options/+layout.svelte @@ -40,17 +40,17 @@ class="w-full bg-[#141417] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-lg h-fit pb-4 mt-4 cursor-pointer" > - Price Alert ⏰ + Options Flow - Customize your alerts to never miss out again + Get realtime options flow and customize your screener @@ -64,7 +64,7 @@ > - Stock Screener 🔎 + Stock Screener