From 66e66108689b8233d3b0762e0bc804b977ec1f4c Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 24 Oct 2024 21:55:02 +0200 Subject: [PATCH] ui fix --- src/routes/cramer-tracker/+page.svelte | 863 ++++++++++++++----------- 1 file changed, 478 insertions(+), 385 deletions(-) diff --git a/src/routes/cramer-tracker/+page.svelte b/src/routes/cramer-tracker/+page.svelte index 537a6099..9e8c8c20 100644 --- a/src/routes/cramer-tracker/+page.svelte +++ b/src/routes/cramer-tracker/+page.svelte @@ -1,424 +1,517 @@ - - - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ''} Jim Carmer Tracker · stocknear - - - - - - - - - - - - - - - - - - - -
- - - -
- -
-
+ isLoaded = true; + window.addEventListener("scroll", handleScroll); + return () => { + window.removeEventListener("scroll", handleScroll); + }; + }); + $: charNumber = 20; + -
- -
-
- - -
-
-

- Jim Cramer Tracker -

-
- - - Track the stock recommendations and performance of CNBC's Jim Cramer - - - -
- - - - - -
- - - - -
- - {#if isLoaded} - -
+ + + + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Jim + Carmer Tracker · stocknear + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+
+ +
+
+

- - - - - Jim Cramer was accurate in {(winRate * 100)?.toFixed(0)}% of his last {rawData?.length} forecasts. - Is it time to consider the "Inverse Cramer" strategy? - -

+ Jim Cramer Tracker + +
+ + Track the stock recommendations and performance of CNBC's Jim + Cramer + +
+ - - -
- - -
- - - - - - - - - - - - {#each displayList as item, index} - - - - - - - - - - - - - - - - - {/each} - -
- Company Name - - Date - - Sentiment - - Return Since - - Sector -
- {#if index >= 5 && data?.user?.tier !== 'Pro'} - - - XXXX - - -
- XXXXXXXXXXXXXXXX -
- -
- - - - - - - Upgrade - -
-
- {:else} -
- - {item?.ticker} - - - {item?.name?.length > charNumber - ? item?.name?.slice(0, charNumber) + "..." - : item?.name} - -
- {/if} -
- {new Date(item?.date)?.toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })} - - {item?.sentiment} - - {item?.returnSince > 0 ? '+' : ''}{item?.returnSince}% - - - {item?.sector} - -
-
- -
- - {:else} -
-
- -
-
- {/if} - - -
- - + + +
-
- - +
+ + {#if isLoaded} +
+ + + + + Jim Cramer was accurate in {(winRate * 100)?.toFixed(0)}% + of his last {rawData?.length} forecasts. Is it time to consider the + "Inverse Cramer" strategy? + +
+ +
+
+ + + + + + + + + + + + {#each displayList as item, index} + + + + + + + + + + + + {/each} + +
+ Company Name + + Date + + Sentiment + + Return Since + + Sector +
+ {#if index >= 5 && data?.user?.tier !== "Pro"} + + + XXXX + + +
+ XXXXXXXXXXXXXXXX +
+ +
+ + + + + + + Upgrade + +
+
+ {:else} +
+ + {item?.ticker} + + + {item?.name?.length > charNumber + ? item?.name?.slice(0, charNumber) + "..." + : item?.name} + +
+ {/if} +
+ {new Date(item?.date)?.toLocaleString("en-US", { + month: "short", + day: "numeric", + year: "numeric", + daySuffix: "2-digit", + })} + + {item?.sentiment} + + {item?.returnSince > 0 ? "+" : ""}{item?.returnSince}% + + + {item?.sector} + +
+
+
+ {:else} +
+
+ +
+
+ {/if} +
+ +
- - - -
- + + + + \ No newline at end of file + .chart { + width: 100%; + } +