From 6eb6b661ce9bc3a5c4529f277cda67c84b273e50 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 25 Dec 2024 00:15:02 +0100 Subject: [PATCH] ui fix --- src/lib/components/ShareHolders.svelte | 50 ++++++++++--------- src/routes/stocks/[tickerID]/+layout.svelte | 36 ++++++------- .../stocks/[tickerID]/insider/+layout.svelte | 18 +++---- .../stocks/[tickerID]/insider/+page.svelte | 6 +-- .../insider/congress-trading/+page.svelte | 4 +- .../insider/transcripts/+page.svelte | 22 ++++---- 6 files changed, 69 insertions(+), 67 deletions(-) diff --git a/src/lib/components/ShareHolders.svelte b/src/lib/components/ShareHolders.svelte index 190ca175..33bce8d4 100644 --- a/src/lib/components/ShareHolders.svelte +++ b/src/lib/components/ShareHolders.svelte @@ -11,6 +11,7 @@ import TableHeader from "$lib/components/Table/TableHeader.svelte"; import DownloadData from "$lib/components/DownloadData.svelte"; import UpgradeToPro from "$lib/components/UpgradeToPro.svelte"; + import Infobox from "$lib/components/Infobox.svelte"; use([PieChart, GridComponent, CanvasRenderer]); @@ -203,31 +204,32 @@ // Sort using the generic comparison function displayList = [...originalData].sort(compareValues)?.slice(0, 50); }; + + function generateStatementInfoHTML() { + if (shareholderList?.length > 0) { + return ` + + 13F institutions, like mutual and pension funds, are large investors + required by the SEC to disclose their holdings quarterly, significantly + impacting company decisions and stock trends. + + `; + } else { + return ` + + There are currently no records available for the 13 institutional + holders of ${$displayCompanyName} + + `; + } + } + + let htmlOutput = generateStatementInfoHTML();
-
- - {#if shareholderList?.length !== 0} - 13F institutions, like mutual and pension funds, are large investors - required by the SEC to disclose their holdings quarterly, significantly - impacting company decisions and stock trends. - {:else} - There are currently no records available for the 13 institutional - holders of {$displayCompanyName} - {/if} -
+ {#if shareholderList?.length !== 0}
@@ -322,7 +324,7 @@ >
Put/Call @@ -378,7 +380,7 @@
Call Flow @@ -436,7 +438,7 @@
Put Flow diff --git a/src/routes/stocks/[tickerID]/+layout.svelte b/src/routes/stocks/[tickerID]/+layout.svelte index 48250ebd..374157e1 100644 --- a/src/routes/stocks/[tickerID]/+layout.svelte +++ b/src/routes/stocks/[tickerID]/+layout.svelte @@ -874,8 +874,8 @@ on:click={() => changeSection("overview")} class="p-2 px-5 cursor-pointer {displaySection === 'overview' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Overview @@ -884,8 +884,8 @@ on:click={() => changeSection("financials")} class="p-2 px-5 cursor-pointer {displaySection === 'financials' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Financials @@ -894,8 +894,8 @@ on:click={() => changeSection("statistics")} class="p-2 px-5 cursor-pointer {displaySection === 'statistics' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" >Statistics @@ -904,8 +904,8 @@ on:click={() => changeSection("metrics")} class="p-2 px-5 cursor-pointer {displaySection === 'metrics' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" >Metrics @@ -915,8 +915,8 @@ on:click={() => changeSection("forecast")} class="p-2 px-5 cursor-pointer {displaySection === 'forecast' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Forecast @@ -926,8 +926,8 @@ on:click={() => changeSection("options")} class="p-2 px-5 cursor-pointer {displaySection === 'options' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Options @@ -936,8 +936,8 @@ on:click={() => changeSection("insider")} class="p-2 px-5 cursor-pointer {displaySection === 'insider' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Insider @@ -946,8 +946,8 @@ on:click={() => changeSection("dividends")} class="p-2 px-5 cursor-pointer {displaySection === 'dividends' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Dividends @@ -956,8 +956,8 @@ on:click={() => changeSection("profile")} class="p-2 px-5 cursor-pointer {displaySection === 'profile' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95] font-semibold' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95] font-semibold' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Profile diff --git a/src/routes/stocks/[tickerID]/insider/+layout.svelte b/src/routes/stocks/[tickerID]/insider/+layout.svelte index b32b1224..1eace39d 100644 --- a/src/routes/stocks/[tickerID]/insider/+layout.svelte +++ b/src/routes/stocks/[tickerID]/insider/+layout.svelte @@ -87,8 +87,8 @@ href={`/stocks/${$stockTicker}/insider`} on:click={() => changeSubSection("insider")} class="p-2 px-5 cursor-pointer {displaySubSection === 'insider' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95]' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95]' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Insider Trading @@ -98,8 +98,8 @@ on:click={() => changeSubSection("institute")} class="p-2 px-5 cursor-pointer {displaySubSection === 'institute' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95]' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95]' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > 13F Institute @@ -109,8 +109,8 @@ on:click={() => changeSubSection("congress-trading")} class="p-2 px-5 cursor-pointer {displaySubSection === 'congress-trading' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95]' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95]' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Congress Trading @@ -119,8 +119,8 @@ on:click={() => changeSubSection("transcripts")} class="p-2 px-5 cursor-pointer {displaySubSection === 'transcripts' - ? 'text-white bg-primary sm:hover:bg-opacity-[0.95]' - : 'text-gray-400 sm:hover:text-white sm:hover:bg-primary sm:hover:bg-opacity-[0.95]'}" + ? 'text-white bg-secondary sm:hover:bg-opacity-[0.95]' + : 'text-gray-400 sm:hover:text-white sm:hover:bg-secondary sm:hover:bg-opacity-[0.95]'}" > Transcripts @@ -154,7 +154,7 @@ {#if newsList?.length !== 0}

diff --git a/src/routes/stocks/[tickerID]/insider/+page.svelte b/src/routes/stocks/[tickerID]/insider/+page.svelte index 6bc82d94..d62a34b5 100644 --- a/src/routes/stocks/[tickerID]/insider/+page.svelte +++ b/src/routes/stocks/[tickerID]/insider/+page.svelte @@ -397,7 +397,7 @@ >
@@ -250,21 +251,21 @@

{@html item?.description} @@ -292,7 +293,7 @@

{@html item?.description} @@ -309,12 +310,11 @@ Back to top {:else} -

- No transcript available for {$displayCompanyName} for the Q{displayQuarter} - of {displayYear} 🧐. -

+
+ +
{/if} {:else}