From 8e6a8b5808ade845339ca1231d959f9c98b0478a Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sat, 24 Aug 2024 12:33:16 +0200 Subject: [PATCH] add sidebar --- src/routes/dividends-calendar/+page.svelte | 81 +++++++++++++++++++--- src/routes/earnings-calendar/+page.svelte | 65 ++++++++++++++++- src/routes/fda-calendar/+page.svelte | 77 +++++++++++++++----- 3 files changed, 193 insertions(+), 30 deletions(-) diff --git a/src/routes/dividends-calendar/+page.svelte b/src/routes/dividends-calendar/+page.svelte index fde34822..93305291 100644 --- a/src/routes/dividends-calendar/+page.svelte +++ b/src/routes/dividends-calendar/+page.svelte @@ -6,7 +6,8 @@ import dividendsLogo from '$lib/images/dividends_calendar_logo.png'; import { goto } from '$app/navigation'; import { abbreviateNumber } from '$lib/utils'; - + import ArrowLogo from "lucide-svelte/icons/move-up-right"; + export let data; let currentWeek = startOfWeek(new Date(), { weekStartsOn: 1 }); let dividendCalendar = data?.getDividendCalendar; @@ -250,7 +251,7 @@ $: { -
+
-
-
+
+ +
+
+ + +
+ +
+
+
@@ -412,13 +422,64 @@ $: { {/if} {/if} {/each} - -
- - - + -
+ + + + + + + + +
+ diff --git a/src/routes/earnings-calendar/+page.svelte b/src/routes/earnings-calendar/+page.svelte index 2795fd55..fb89454a 100644 --- a/src/routes/earnings-calendar/+page.svelte +++ b/src/routes/earnings-calendar/+page.svelte @@ -5,7 +5,8 @@ import { screenWidth, numberOfUnreadNotification } from '$lib/store'; import { goto } from '$app/navigation'; import { abbreviateNumber } from '$lib/utils'; - + import ArrowLogo from "lucide-svelte/icons/move-up-right"; + export let data; let cloudFrontUrl = import.meta.env.VITE_IMAGE_URL; @@ -251,7 +252,7 @@ $: { -
+
+
+ +
+
+ + +
@@ -425,6 +433,59 @@ $: { {/if} {/each} +
+ + + +
+
+
diff --git a/src/routes/fda-calendar/+page.svelte b/src/routes/fda-calendar/+page.svelte index 51483cf3..09ebba10 100644 --- a/src/routes/fda-calendar/+page.svelte +++ b/src/routes/fda-calendar/+page.svelte @@ -2,9 +2,9 @@ import { goto } from '$app/navigation'; import { numberOfUnreadNotification, screenWidth } from '$lib/store'; import InfiniteLoading from '$lib/components/InfiniteLoading.svelte'; - import { abbreviateNumber } from '$lib/utils'; import { onMount } from 'svelte'; import UpgradeToPro from '$lib/components/UpgradeToPro.svelte'; + import ArrowLogo from "lucide-svelte/icons/move-up-right"; export let data; @@ -35,17 +35,7 @@ }) - let charNumber = 15; - $: { - if ($screenWidth < 640) - { - charNumber = 15; - } - else { - charNumber = 15; - } - } - + $: charNumber = $screenWidth < 640 ? 15 : 20; @@ -73,7 +63,7 @@ -
+
- -
-
-
+ +
+
+ + +
@@ -202,7 +194,7 @@ --> - {item?.drugName} + {item?.drugName?.length > charNumber ? item?.drugName?.slice(0,charNumber) + "..." : item?.drugName} @@ -250,6 +242,55 @@
+ + +