This commit is contained in:
MuslemRahimi 2024-11-02 11:31:43 +01:00
parent 08e738352e
commit 102d5a36e0
37 changed files with 1060 additions and 1305 deletions

View File

@ -52,7 +52,7 @@
function getHref(symbol: string) {
let path = "";
if (symbol?.length !== 0) {
if (assetType?.toLowerCase() === "stock") {
if (["stocks", "stock"]?.includes(assetType?.toLowerCase())) {
path = `/stocks/${symbol}`;
} else if (assetType?.toLowerCase() === "etf") {
path = `/etf/${symbol}`;
@ -191,7 +191,8 @@
class=" text-sm flex flex-row items-center justify-start bg-[#09090B]"
>
<div class="flex flex-col items-start w-full">
<div class="-ml-2 flex flex-row items-center pb-1">
<div class=" flex flex-row items-center pb-1">
<!--
<Avatar.Root>
<Avatar.Image
class="w-5 h-5 rounded-full avatar text-center m-auto flex-shrink-0"
@ -199,6 +200,7 @@
/>
<Avatar.Fallback>SK</Avatar.Fallback>
</Avatar.Root>
-->
<h4 class="text-[1rem] font-semibold inline-block">{symbol}</h4>
</div>
<p>

View File

@ -465,7 +465,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -485,7 +485,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts/top-stocks"}
@ -504,7 +504,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/most-shorted-stocks"}

View File

@ -2,7 +2,7 @@
import { screenWidth, numberOfUnreadNotification } from "$lib/store";
import ArrowLogo from "lucide-svelte/icons/move-up-right";
import { onMount } from "svelte";
import HoverStockChart from "$lib/components/HoverStockChart.svelte";
export let data;
let analystStats = data?.getAnalystStats;
@ -364,12 +364,8 @@
</a>
{:else}
<div class="flex flex-col items-start">
<a
href={`/stocks/${item?.ticker}`}
class="sm:hover:text-white text-blue-400 text-sm sm:text-[1rem]"
>
{item?.ticker}
</a>
<HoverStockChart symbol={item?.ticker} />
<span class="text-white">
{item?.name?.length > charNumber
? item?.name?.slice(0, charNumber) + "..."
@ -464,7 +460,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -472,7 +468,7 @@
>
<div class="w-full flex justify-between items-center p-3 mt-3">
<h2 class="text-start text-xl font-semibold text-white ml-3">
Pro Subscriptio
Pro Subscription
</h2>
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
</div>
@ -484,7 +480,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts"}
@ -503,7 +499,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts/top-stocks"}

View File

@ -446,7 +446,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -466,7 +466,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts"}
@ -485,7 +485,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/most-shorted-stocks"}

View File

@ -247,7 +247,7 @@ let allBlogPosts = [
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -267,7 +267,7 @@ let allBlogPosts = [
<div
on:click={() => goto("/analysts")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -284,7 +284,7 @@ let allBlogPosts = [
<div
on:click={() => goto("/analysts/top-stocks")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -137,7 +137,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -154,7 +154,7 @@
<div
on:click={() => goto("/donation")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -171,7 +171,7 @@
<div
on:click={() => goto("/contact")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -1,10 +1,10 @@
<script lang="ts">
import { numberOfUnreadNotification, screenWidth } from "$lib/store";
import InfiniteLoading from "$lib/components/InfiniteLoading.svelte";
import { onMount } from "svelte";
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
import ArrowLogo from "lucide-svelte/icons/move-up-right";
import TableHeader from "$lib/components/Table/TableHeader.svelte";
import HoverStockChart from "$lib/components/HoverStockChart.svelte";
export let data;
@ -208,12 +208,7 @@
<td
class="text-blue-400 text-sm sm:text-[1rem] text-start"
>
<a
href={"/stocks/" + item?.ticker}
class="sm:hover:text-white text-blue-400"
>
{item?.ticker}
</a>
<HoverStockChart symbol={item?.ticker} />
</td>
<td
@ -271,7 +266,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -291,7 +286,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts"}
@ -310,7 +305,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/politicians"}

View File

@ -1,12 +1,11 @@
<script lang="ts">
import { numberOfUnreadNotification, screenWidth } from "$lib/store";
import { numberOfUnreadNotification } from "$lib/store";
import { onMount } from "svelte";
import ArrowLogo from "lucide-svelte/icons/move-up-right";
import HoverStockChart from "$lib/components/HoverStockChart.svelte";
export let data;
let cloudFrontUrl = import.meta.env.VITE_IMAGE_URL;
let isLoaded = false;
let rawData = data?.getCramerTracker ?? [];
let displayList = rawData?.slice(0, 50) ?? [];
@ -282,12 +281,7 @@
</a>
{:else}
<div class="flex flex-col items-start">
<a
href={`/stocks/${item?.ticker}`}
class="sm:hover:text-white text-blue-400 text-sm sm:text-[1rem]"
>
{item?.ticker}
</a>
<HoverStockChart symbol={item?.ticker} />
<span class="text-white">
{item?.name?.length > charNumber
? item?.name?.slice(0, charNumber) + "..."
@ -366,7 +360,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -386,7 +380,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/reddit-tracker"}
@ -405,7 +399,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/sentiment-tracker"}

View File

@ -225,7 +225,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -245,7 +245,7 @@
<div
on:click={() => goto("/analysts")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -262,7 +262,7 @@
<div
on:click={() => goto("/analysts/top-stocks")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -511,7 +511,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -531,7 +531,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/earnings-calendar"}
@ -550,7 +550,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/economic-calendar"}

View File

@ -210,7 +210,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -227,7 +227,7 @@
<div
on:click={() => goto("/about")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -244,7 +244,7 @@
<div
on:click={() => goto("/contact")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -576,7 +576,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -596,7 +596,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/dividends-calendar"}
@ -615,7 +615,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/economic-calendar"}

View File

@ -724,7 +724,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -744,7 +744,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/earnings-calendar"}
@ -763,7 +763,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/dividends-calendar"}

View File

@ -918,7 +918,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -938,7 +938,7 @@
<div
on:click={() => goto("/analysts")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -955,7 +955,7 @@
<div
on:click={() => goto("/politicians")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -234,7 +234,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -254,7 +254,7 @@
<div
on:click={() => goto("/analysts")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -271,7 +271,7 @@
<div
on:click={() => goto("/analysts/top-stocks")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -222,7 +222,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -242,7 +242,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts"}
@ -261,7 +261,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/politicians"}

View File

@ -314,7 +314,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -334,7 +334,7 @@
<div
on:click={() => goto("/analysts")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -351,7 +351,7 @@
<div
on:click={() => goto("/politicians")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -253,7 +253,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -270,7 +270,7 @@
<div
on:click={() => goto("/donation")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -287,7 +287,7 @@
<div
on:click={() => goto("/contact")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -5,9 +5,9 @@
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
import ArrowLogo from "lucide-svelte/icons/move-up-right";
import TableHeader from "$lib/components/Table/TableHeader.svelte";
import HoverStockChart from "$lib/components/HoverStockChart.svelte";
export let data;
let cloudFrontUrl = import.meta.env.VITE_IMAGE_URL;
let isLoaded = true;
let rawData = data?.getInsiderTracker ?? [];
@ -226,12 +226,7 @@
</td>
<td class="text-sm sm:text-[1rem] text-start">
<a
href={"/stocks/" + item?.symbol}
class="sm:hover:text-white text-blue-400"
>
{item?.symbol}
</a>
<HoverStockChart symbol={item?.symbol} />
</td>
<td
@ -311,7 +306,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href="/pricing"
@ -331,7 +326,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href="/sentiment-tracker"
@ -350,7 +345,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href="/reddit-tracker"

View File

@ -138,7 +138,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -158,7 +158,7 @@
<div
on:click={() => goto("/analysts")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -175,7 +175,7 @@
<div
on:click={() => goto("/politicians")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -263,7 +263,7 @@
<aside class="hidden lg:block relative fixed w-1/4 -mt-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -283,7 +283,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/watchlist/stocks"}
@ -302,7 +302,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/stock-screener"}

View File

@ -538,7 +538,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -558,7 +558,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts"}
@ -577,7 +577,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/politicians"}

View File

@ -35,9 +35,9 @@
</svelte:head>
<section
class="w-full max-w-3xl sm:max-w-screen-2xl overflow-hidden min-h-screen pt-5 pb-40 lg:px-3"
class="w-full max-w-3xl sm:max-w-screen-2xl overflow-hidden pb-20 pt-5 px-4 lg:px-3"
>
<div class="text-sm sm:text-[1rem] breadcrumbs ml-4">
<div class="text-sm sm:text-[1rem] breadcrumbs">
<ul>
<li><a href="/" class="text-gray-300">Home</a></li>
<li class="text-gray-300">Market News</li>
@ -50,86 +50,26 @@
class="relative flex justify-center items-start overflow-hidden w-full"
>
<main class="w-full lg:w-3/4 lg:pr-5">
<div
class="w-full m-auto sm:bg-[#27272A] sm:rounded-xl h-auto pl-10 pr-10 pt-5 sm:pb-10 sm:pt-10 mt-3 mb-8"
>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-10">
<!-- Start Column -->
<div>
<div class="flex flex-row justify-center items-center">
<h1
class="text-3xl sm:text-4xl text-white text-center font-bold mb-5"
>
Market News
</h1>
</div>
<h1 class="mb-6 text-white text-2xl sm:text-3xl font-bold">
Stock Market News
</h1>
<span
class="hidden sm:block text-white text-md font-medium text-center flex justify-center items-center"
>
Flush your stock worries away with our website's latest news!
</span>
</div>
<!-- End Column -->
<!-- Start Column -->
<div
class="hidden sm:block relative m-auto mb-5 mt-5 sm:mb-0 sm:mt-0"
>
<svg
class="w-40 -my-5"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<filter id="glow">
<feGaussianBlur stdDeviation="5" result="glow" />
<feMerge>
<feMergeNode in="glow" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>
<path
fill="#1E40AF"
d="M57.6,-58.7C72.7,-42.6,81.5,-21.3,82,0.5C82.5,22.3,74.7,44.6,59.7,60.1C44.6,75.6,22.3,84.3,0,84.3C-22.3,84.2,-44.6,75.5,-61.1,60.1C-77.6,44.6,-88.3,22.3,-87.6,0.7C-86.9,-20.8,-74.7,-41.6,-58.2,-57.7C-41.6,-73.8,-20.8,-85.2,0.2,-85.4C21.3,-85.6,42.6,-74.7,57.6,-58.7Z"
transform="translate(100 100)"
filter="url(#glow)"
/>
</svg>
<div class="z-1 absolute top-1 right-10">
<img class="w-24 mr-1" src={logo} alt="logo" loading="lazy" />
</div>
</div>
<!-- End Column -->
</div>
</div>
<div
class="bg-[#313131] w-52 sm:w-fit relative m-auto sm:m-0 sm:mr-auto flex sm:flex-wrap items-center justify-center rounded-lg p-1 -mt-3"
>
{#each tabs as item, i}
<a
href={item?.path}
class="group relative z-[1] rounded-full px-6 py-1 {activeIdx ===
i
? 'z-0'
: ''} "
>
{#if activeIdx === i}
<div class="absolute inset-0 rounded-lg bg-purple-600"></div>
{/if}
<span
class="relative text-[1rem] sm:text-lg block font-semibold duration-200 text-white"
<nav class=" border-b-[2px] overflow-x-scroll whitespace-nowrap">
<ul
class="flex flex-row items-center w-full text-[1rem] sm:text-lg text-white"
>
{#each tabs as item, i}
<a
href={item?.path}
class="p-2 px-5 cursor-pointer {activeIdx === i
? 'text-white bg-[#27272A] sm:hover:bg-opacity-[0.95]'
: 'text-gray-400 sm:hover:text-white sm:hover:bg-[#27272A] sm:hover:bg-opacity-[0.95]'}"
>
{item.title}
</span>
</a>
{/each}
</div>
<div class="border-b mt-5 border-slate-700" />
</a>
{/each}
</ul>
</nav>
<slot />
@ -139,7 +79,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -147,7 +87,7 @@
>
<div class="w-full flex justify-between items-center p-3 mt-3">
<h2 class="text-start text-xl font-semibold text-white ml-3">
Pro Subscription 🔥
Pro Subscription
</h2>
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
</div>
@ -159,7 +99,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/earnings-calendar"}
@ -167,7 +107,7 @@
>
<div class="w-full flex justify-between items-center p-3 mt-3">
<h2 class="text-start text-xl font-semibold text-white ml-3">
Earnings Calendar 🌟
Earnings Calendar
</h2>
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
</div>
@ -178,7 +118,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/dividends-calendar"}
@ -186,7 +126,7 @@
>
<div class="w-full flex justify-between items-center p-3 mt-3">
<h2 class="text-start text-xl font-semibold text-white ml-3">
Dividend Calendar 💸
Dividend Calendar
</h2>
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
</div>
@ -197,7 +137,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/economic-calendar"}
@ -205,7 +145,7 @@
>
<div class="w-full flex justify-between items-center p-3 mt-3">
<h2 class="text-start text-xl font-semibold text-white ml-3">
Economic Events 🌍
Economic Events
</h2>
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
</div>

View File

@ -1,165 +1,185 @@
<script lang="ts">
import { numberOfUnreadNotification } from "$lib/store";
import { onMount } from "svelte";
export let data;
import { numberOfUnreadNotification } from '$lib/store';
import { onMount } from 'svelte';
let rawData = data?.getMarketNews;
let news = rawData.slice(0, 15) ?? [];
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);
let rawData = data?.getMarketNews;
let news = rawData.slice(0,15) ?? [];
// Calculate the difference in milliseconds
const difference = inputDate.getTime() - currentNYCDate.getTime();
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' : ''}`;
}
};
// 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" : ""}`;
}
};
async function handleScroll() {
async function handleScroll() {
const scrollThreshold = document.body.offsetHeight * 0.8; // 80% of the website height
const isBottom = window.innerHeight + window.scrollY >= scrollThreshold;
if (isBottom && news?.length !== rawData?.length) {
const nextIndex = news?.length;
const filteredNewResults = rawData?.slice(nextIndex, nextIndex + 25);
news = [...news, ...filteredNewResults];
const nextIndex = news?.length;
const filteredNewResults = rawData?.slice(nextIndex, nextIndex + 25);
news = [...news, ...filteredNewResults];
}
}
onMount(async () => {
window.addEventListener('scroll', handleScroll);
return () => {
window.removeEventListener('scroll', handleScroll);
};
})
window.addEventListener("scroll", handleScroll);
return () => {
window.removeEventListener("scroll", handleScroll);
};
});
let videoId = null;
let videoId = null;
function checkIfYoutubeVideo(link) {
const url = new URL(link);
if (url.hostname === "www.youtube.com") {
const searchParams = url.searchParams;
searchParams?.delete("t"); // Remove the "t" parameter
const videoIdMatch = url?.search?.match(/v=([^&]+)/);
function checkIfYoutubeVideo(link) {
const url = new URL(link);
if (url.hostname === "www.youtube.com") {
const searchParams = url.searchParams;
searchParams?.delete('t'); // Remove the "t" parameter
const videoIdMatch = url?.search?.match(/v=([^&]+)/);
if (videoIdMatch) {
return videoIdMatch[1];
if (videoIdMatch) {
return videoIdMatch[1];
}
} else {
return null;
}
}
} else {
return null;
}
}
</script>
<svelte:head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Today's
Stock Market News and Breaking Stories · stocknear
</title>
<meta
name="description"
content={`Get the latest stock market news and breaking stories from the world's best finance and investing websites.`}
/>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ''} Today's Stock Market News and Breaking Stories · stocknear
</title>
<meta name="description" content={`Get the latest stock market news and breaking stories from the world's best finance and investing websites.`} />
<!-- Other meta tags -->
<meta property="og:title" content={`Today's Stock Market News and Breaking Stories · stocknear`}/>
<meta property="og:description" content={`Get the latest stock market news and breaking stories from the world's best finance and investing websites.`} />
<meta property="og:type" content="website"/>
<!-- Add more Open Graph meta tags as needed -->
<!-- Twitter specific meta tags -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:title" content={`Today's Stock Market News and Breaking Stories · stocknear`}/>
<meta name="twitter:description" content={`Get the latest stock market news and breaking stories from the world's best finance and investing websites.`} />
<!-- Add more Twitter meta tags as needed -->
<!-- Other meta tags -->
<meta
property="og:title"
content={`Today's Stock Market News and Breaking Stories · stocknear`}
/>
<meta
property="og:description"
content={`Get the latest stock market news and breaking stories from the world's best finance and investing websites.`}
/>
<meta property="og:type" content="website" />
<!-- Add more Open Graph meta tags as needed -->
<!-- Twitter specific meta tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:title"
content={`Today's Stock Market News and Breaking Stories · stocknear`}
/>
<meta
name="twitter:description"
content={`Get the latest stock market news and breaking stories from the world's best finance and investing websites.`}
/>
<!-- Add more Twitter meta tags as needed -->
</svelte:head>
<section class="w-full overflow-hidden m-auto mt-10">
<section class="w-full overflow-hidden m-auto mt-10">
<div class="flex justify-center w-full m-auto overflow-hidden">
<div class="relative flex justify-center items-center overflow-hidden">
<main>
<div class="w-screen sm:w-full m-auto">
<div class="grid grid-cols-1 sm:grid-cols-2 gap-5">
{#if news.length !== 0}
{#each news as item}
<div class="flex flex-col w-full mt-5 bg-[#141417] shadow-lg h-auto sm:h-[450px] xl:h-[430px] pb-10 sm:pb-5 rounded-none sm:rounded-lg m-auto">
{#if videoId = checkIfYoutubeVideo(item.url)}
<iframe
class="w-full h-60 rounded-none sm:rounded-lg"
src={`https://www.youtube.com/embed/${videoId}`}
frameborder="0"
allow="clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
{:else}
<a href={item.url} target="_blank">
<div class="h-48 sm:h-60 m-auto border border-slate-800 rounded-none sm:rounded-lg ">
<img src={item?.image} class="w-screen sm:w-full object-cover h-48 sm:h-60 rounded-none sm:rounded-t-lg" alt="news image" loading="lazy">
</div>
</a>
{/if}
<div class="relative flex justify-center items-center overflow-hidden">
<main>
<div class="w-full m-auto">
<div class="grid grid-cols-1 sm:grid-cols-2 gap-5">
{#if news.length !== 0}
{#each news as item}
<div
class="flex flex-col w-full mt-5 bg-[#141417] shadow-lg h-auto sm:h-[450px] xl:h-[430px] pb-10 sm:pb-5 rounded-md m-auto"
>
{#if (videoId = checkIfYoutubeVideo(item.url))}
<iframe
class="w-full h-60 rounded-none sm:rounded-lg"
src={`https://www.youtube.com/embed/${videoId}`}
frameborder="0"
allow="clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
{:else}
<a href={item.url} target="_blank">
<div
class="h-48 sm:h-60 m-auto border border-gray-600 rounded-none sm:rounded-lg"
>
<img
src={item?.image}
class="w-full object-cover h-48 sm:h-60 rounded-none sm:rounded-t-lg"
alt="news image"
loading="lazy"
/>
</div>
</a>
{/if}
<div class="pl-3 pr-3">
<label class="mt-3 mb-3 cursor-pointer text-xs text-gray-200 flex flex-row items-center">
<div class="rounded-full w-6 h-6 relative bg-gray-800 mr-1.5 mb-0.5">
<img class="rounded-full w-4 h-4 absolute inset-1/2 transform -translate-x-1/2 -translate-y-1/2" src={`https://financialmodelingprep.com/image-stock/${item?.symbol}.png`} loading="lazy" />
</div>
{item?.symbol} · {formatDate(item?.publishedDate)} ago
<span class="ml-auto text-gray-300 italic text-xs mr-2">
Source: {item?.site}
</span>
</label>
<a href={item.url} target="_blank" class="text-lg font-bold text-white">
{item?.title?.length > 120 ? item?.title?.slice(0,120) +'...' : item?.title}
</a>
<p class="text-white text-sm mt-2">
{item?.text?.length > 100 ? item?.text?.slice(0,100) + "..." : item?.text}
</p>
</div>
<div class="pl-3 pr-3">
<label
class="mt-3 mb-3 cursor-pointer text-xs text-gray-200 flex flex-row items-center"
>
<div
class="rounded-full w-6 h-6 relative bg-gray-800 mr-1.5 mb-0.5"
>
<img
class="rounded-full w-4 h-4 absolute inset-1/2 transform -translate-x-1/2 -translate-y-1/2"
src={`https://financialmodelingprep.com/image-stock/${item?.symbol}.png`}
loading="lazy"
/>
</div>
{item?.symbol} · {formatDate(item?.publishedDate)} ago
<span class="ml-auto text-gray-300 italic text-xs mr-2">
Source: {item?.site}
</span>
</label>
</div>
{/each}
{/if}
<a
href={item.url}
target="_blank"
class="text-lg font-bold text-white"
>
{item?.title?.length > 120
? item?.title?.slice(0, 120) + "..."
: item?.title}
</a>
<p class="text-white text-sm mt-2">
{item?.text?.length > 100
? item?.text?.slice(0, 100) + "..."
: item?.text}
</p>
</div>
</main>
</div>
</div>
{/each}
{/if}
</div>
</div>
</main>
</div>
</div>
</section>

View File

@ -1,168 +1,175 @@
<script lang="ts">
import { numberOfUnreadNotification } from "$lib/store";
import { onMount } from "svelte";
export let data;
import { numberOfUnreadNotification } from '$lib/store';
import { onMount } from 'svelte';
let rawData = data?.getGeneralNews;
let news = rawData.slice(0, 15) ?? [];
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);
let rawData = data?.getGeneralNews;
let news = rawData.slice(0,15) ?? [];
// Calculate the difference in milliseconds
const difference = inputDate.getTime() - currentNYCDate.getTime();
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' : ''}`;
}
};
// 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" : ""}`;
}
};
async function handleScroll() {
async function handleScroll() {
const scrollThreshold = document.body.offsetHeight * 0.8; // 80% of the website height
const isBottom = window.innerHeight + window.scrollY >= scrollThreshold;
if (isBottom && news?.length !== rawData?.length) {
const nextIndex = news?.length;
const filteredNewResults = rawData?.slice(nextIndex, nextIndex + 25);
news = [...news, ...filteredNewResults];
const nextIndex = news?.length;
const filteredNewResults = rawData?.slice(nextIndex, nextIndex + 25);
news = [...news, ...filteredNewResults];
}
}
onMount(async () => {
window.addEventListener('scroll', handleScroll);
return () => {
window.removeEventListener('scroll', handleScroll);
};
})
window.addEventListener("scroll", handleScroll);
return () => {
window.removeEventListener("scroll", handleScroll);
};
});
let videoId = null;
let videoId = null;
function checkIfYoutubeVideo(link) {
const url = new URL(link);
if (url.hostname === "www.youtube.com") {
const searchParams = url.searchParams;
searchParams?.delete("t"); // Remove the "t" parameter
const videoIdMatch = url?.search?.match(/v=([^&]+)/);
function checkIfYoutubeVideo(link) {
const url = new URL(link);
if (url.hostname === "www.youtube.com") {
const searchParams = url.searchParams;
searchParams?.delete('t'); // Remove the "t" parameter
const videoIdMatch = url?.search?.match(/v=([^&]+)/);
if (videoIdMatch) {
return videoIdMatch[1];
if (videoIdMatch) {
return videoIdMatch[1];
}
} else {
return null;
}
}
} else {
return null;
}
}
</script>
<svelte:head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Today's
General News and Breaking Stories · stocknear
</title>
<meta
name="description"
content={`Get the latest general news and breaking stories from the world's best finance and investing websites.`}
/>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ''} Today's General News and Breaking Stories · stocknear
</title>
<meta name="description" content={`Get the latest general news and breaking stories from the world's best finance and investing websites.`} />
<!-- Other meta tags -->
<meta property="og:title" content={`Today's General News and Breaking Stories · stocknear`}/>
<meta property="og:description" content={`Get the latest general news and breaking stories from the world's best finance and investing websites.`} />
<meta property="og:type" content="website"/>
<!-- Add more Open Graph meta tags as needed -->
<!-- Twitter specific meta tags -->
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:title" content={`Today's General News and Breaking Stories · stocknear`}/>
<meta name="twitter:description" content={`Get the latest general news and breaking stories from the world's best finance and investing websites.`} />
<!-- Add more Twitter meta tags as needed -->
<!-- Other meta tags -->
<meta
property="og:title"
content={`Today's General News and Breaking Stories · stocknear`}
/>
<meta
property="og:description"
content={`Get the latest general news and breaking stories from the world's best finance and investing websites.`}
/>
<meta property="og:type" content="website" />
<!-- Add more Open Graph meta tags as needed -->
<!-- Twitter specific meta tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:title"
content={`Today's General News and Breaking Stories · stocknear`}
/>
<meta
name="twitter:description"
content={`Get the latest general news and breaking stories from the world's best finance and investing websites.`}
/>
<!-- Add more Twitter meta tags as needed -->
</svelte:head>
<section class="w-full overflow-hidden m-auto mt-10">
<div class="flex justify-center w-full m-auto overflow-hidden">
<div class="relative flex justify-center items-center overflow-hidden">
<main>
<div class="w-screen sm:w-full m-auto">
<div class="grid grid-cols-1 sm:grid-cols-2 gap-5">
{#if news?.length !== 0}
{#each news as item}
<div class="flex flex-col w-full mt-5 bg-[#27272A] shadow-lg h-auto sm:h-[420px] pb-10 sm:pb-5 rounded-none sm:rounded-lg m-auto">
{#if videoId = checkIfYoutubeVideo(item.url)}
<iframe
class="w-full h-60 rounded-none sm:rounded-lg"
src={`https://www.youtube.com/embed/${videoId}`}
frameborder="0"
allow="clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
{:else}
<a href={item?.url} target="_blank">
<div class="h-48 sm:h-60 m-auto border border-slate-800 rounded-none sm:rounded-lg ">
<img src={item?.image} class="w-screen sm:w-full object-cover h-48 sm:h-60 rounded-none sm:rounded-t-lg" alt="news image" loading="lazy">
</div>
</a>
{/if}
<div class="relative flex justify-center items-center overflow-hidden">
<main>
<div class="w-full m-auto">
<div class="grid grid-cols-1 sm:grid-cols-2 gap-5">
{#if news?.length !== 0}
{#each news as item}
<div
class="flex flex-col w-full mt-5 bg-[#27272A] shadow-lg h-auto sm:h-[420px] pb-10 sm:pb-5 rounded-md m-auto"
>
{#if (videoId = checkIfYoutubeVideo(item.url))}
<iframe
class="w-full h-60 rounded-none sm:rounded-lg"
src={`https://www.youtube.com/embed/${videoId}`}
frameborder="0"
allow="clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
{:else}
<a href={item?.url} target="_blank">
<div
class="h-48 sm:h-60 m-auto border border-slate-800 rounded-none sm:rounded-lg"
>
<img
src={item?.image}
class="w-full object-cover h-48 sm:h-60 rounded-none sm:rounded-t-lg"
alt="news image"
loading="lazy"
/>
</div>
</a>
{/if}
<div class="pl-3 pr-3">
<label class="mt-3 mb-3 cursor-pointer text-xs text-gray-200 flex flex-row items-center">
Source: {item?.source} · {formatDate(item?.datetime*1000)} ago
</label>
<a href={item?.url} target="_blank" class="text-lg font-bold text-white">
{item?.headline?.length > 120 ? item?.headline?.slice(0,120) + "..." : item?.headline}
</a>
<p class="text-white text-sm mt-2">
{item?.summary?.length > 100 ? item?.summary?.slice(0,100) + "..." : item?.summary}
</p>
</div>
<div class="pl-3 pr-3">
<label
class="mt-3 mb-3 cursor-pointer text-xs text-gray-200 flex flex-row items-center"
>
Source: {item?.source} · {formatDate(
item?.datetime * 1000,
)} ago
</label>
</div>
{/each}
{/if}
<a
href={item?.url}
target="_blank"
class="text-lg font-bold text-white"
>
{item?.headline?.length > 120
? item?.headline?.slice(0, 120) + "..."
: item?.headline}
</a>
<p class="text-white text-sm mt-2">
{item?.summary?.length > 100
? item?.summary?.slice(0, 100) + "..."
: item?.summary}
</p>
</div>
</main>
</div>
</div>
{/each}
{/if}
</div>
</div>
</main>
</div>
</div>
</section>

View File

@ -303,7 +303,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -323,7 +323,7 @@
<div
on:click={() => goto("/cramer-tracker")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -340,7 +340,7 @@
<div
on:click={() => goto("/reddit-tracker")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -5,9 +5,8 @@
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
import ArrowLogo from "lucide-svelte/icons/move-up-right";
import TableHeader from "$lib/components/Table/TableHeader.svelte";
import HoverStockChart from "$lib/components/HoverStockChart.svelte";
export let data;
let cloudFrontUrl = import.meta.env.VITE_IMAGE_URL;
let isLoaded = false;
let rawData = [];
@ -211,12 +210,7 @@
<td
class="text-sm sm:text-[1rem] whitespace-nowrap text-start"
>
<a
href={"/stocks/" + item?.symbol}
class="sm:hover:text-white text-blue-400"
>
{item?.symbol}
</a>
<HoverStockChart symbol={item?.symbol} />
</td>
<td
@ -278,7 +272,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -298,7 +292,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts"}
@ -317,7 +311,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts/top-stocks"}

View File

@ -3,6 +3,7 @@
import { getPartyForPoliticians } from "$lib/utils";
import { screenWidth, numberOfUnreadNotification } from "$lib/store";
import { onMount } from "svelte";
import HoverStockChart from "$lib/components/HoverStockChart.svelte";
//import UpgradeToPro from '$lib/components/UpgradeToPro.svelte';
import ArrowLogo from "lucide-svelte/icons/move-up-right";
@ -25,8 +26,6 @@
let changeRowFilter = false;
let changeRuleFilter = false;
const rowList = [10, 20, 50, 100, 200];
async function handleScroll() {
const scrollThreshold = document.body.offsetHeight * 0.8; // 80% of the website height
const isBottom = window.innerHeight + window.scrollY >= scrollThreshold;
@ -37,18 +36,6 @@
}
}
function changeRows(rows: Number) {
changeRowFilter = true;
displayRows = rows;
}
function changeStructure() {
if (displayStructure === "Card") {
displayStructure = "Table";
} else {
displayStructure = "Card";
}
}
onMount(async () => {
rawData?.forEach((item) => {
let representative = item?.representative || "";
@ -106,225 +93,7 @@
return `${firstName?.charAt(0)}. ${lastName}`;
}
const exportData = (format = "csv") => {
const data = slicedRawData;
if (!data || data.length === 0) {
return;
}
let properties = [
{ key: "disclosureDate", label: "Disclosure Date" },
{ key: "transactionDate", label: "Transaction Date" },
{ key: "owner", label: "Owner" },
{ key: "ticker", label: "Ticker" },
{ key: "assetDescription", label: "Asset Description" },
{ key: "type", label: "Type" },
{ key: "amount", label: "Amount" },
{ key: "representative", label: "Representative" },
{ key: "district", label: "District" },
{ key: "link", label: "Link" },
{ key: "capitalGainsOver200USD", label: "Capital Gains Over $200" },
{ key: "assetType", label: "Asset Type" },
{ key: "party", label: "Party" },
];
// Create rows for CSV/Excel
let rows = data?.map((item) =>
properties?.map((property) => item[property.key] || ""),
);
// Include headers
const headers = properties.map((prop) => prop.label);
rows.unshift(headers);
// Check the format to export
if (format.toLowerCase() === "csv") {
const csvContent = rows.map((row) => row.join(",")).join("\n");
const blob = new Blob([csvContent], {
type: "data:text/csv;charset=utf-8",
});
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "data.csv";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
} else if (format.toLowerCase() === "excel") {
/*
const worksheet = XLSX.utils.aoa_to_sheet(rows);
const workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1");
XLSX.writeFile(workbook, "data.xlsx");
*/
}
};
async function handleFilter(e, newFilter) {
//e.preventDefault();
changeRuleFilter = true;
const filterSet = new Set(filterList);
// Check if the new filter already exists in the list
if (filterSet?.has(newFilter)) {
// If it exists, remove it from the list
filterSet?.delete(newFilter);
} else {
// If it doesn't exist, add it to the list
filterSet?.add(newFilter);
}
filterList = Array?.from(filterSet);
//console.log(filterList)
changeRuleFilter = true;
}
function filterData(data) {
const newData = data?.filter((item) => {
//Bought only nested conditions
if (
filterList?.includes("Bought") &&
item?.type === "Bought" &&
!filterList?.includes("Democratic") &&
!filterList?.includes("Republican") &&
!filterList?.includes("Other")
) {
return true;
}
//Sell only nested conditions
if (
filterList?.includes("Sold") &&
item?.type === "Sold" &&
!filterList?.includes("Democratic") &&
!filterList?.includes("Republican") &&
!filterList?.includes("Other")
) {
return true;
}
//Amount only nested conditions
if (
filterList?.includes("$1,001 - $15,000") &&
item?.amount === "$1,001 - $15,000"
) {
return true;
}
//Democratic Party nested conditions
if (
filterList?.includes("Democratic") &&
item?.party &&
item?.party?.toLowerCase() === "democratic"
) {
if (!filterList?.includes("Sold") && !filterList?.includes("Bought")) {
return true;
} else if (
filterList?.includes("Democratic") &&
item?.party &&
item?.party?.toLowerCase() === "democratic" &&
filterList?.includes("Bought") &&
item?.type === "Bought"
) {
return true;
} else if (
filterList?.includes("Democratic") &&
item?.party &&
item?.party?.toLowerCase() === "democratic" &&
filterList?.includes("Sold") &&
item?.type === "Sold"
) {
return true;
}
}
//Republican Party nested conditions
if (
filterList?.includes("Republican") &&
item?.party &&
item?.party?.toLowerCase() === "republican"
) {
if (!filterList?.includes("Sold") && !filterList?.includes("Bought")) {
return true;
} else if (
filterList.includes("Republican") &&
item?.party &&
item?.party?.toLowerCase() === "republican" &&
filterList?.includes("Bought") &&
item?.type === "Bought"
) {
return true;
} else if (
filterList.includes("Republican") &&
item?.party &&
item?.party?.toLowerCase() === "republican" &&
filterList?.includes("Sold") &&
item?.type === "Sold"
) {
return true;
}
}
//Other Party nested conditions
if (
filterList?.includes("Other") &&
item?.party &&
item?.party?.toLowerCase() === "other"
) {
if (!filterList?.includes("Sold") && !filterList?.includes("Bought")) {
return true;
} else if (
filterList.includes("Other") &&
item?.party &&
item?.party?.toLowerCase() === "other" &&
filterList?.includes("Bought") &&
item?.type === "Bought"
) {
return true;
} else if (
filterList.includes("Other") &&
item?.party &&
item?.party?.toLowerCase() === "other" &&
filterList?.includes("Sold") &&
item?.type === "Sold"
) {
return true;
}
} else {
return false;
}
});
return newData;
}
$: charNumber = $screenWidth < 640 ? 20 : 40;
$: {
if (displayRows && changeRowFilter === true) {
slicedRawData = rawData?.slice(0, displayRows);
slicedRawData =
filterList?.length !== 0 ? filterData(slicedRawData) : slicedRawData;
slicedRawData = [...slicedRawData];
displayList = slicedRawData?.slice(0, 20) ?? [];
displayList = [...displayList];
changeRowFilter = false;
}
}
$: {
if (filterList && changeRuleFilter === true) {
slicedRawData = rawData?.slice(0, displayRows);
slicedRawData =
filterList?.length !== 0 ? filterData(slicedRawData) : slicedRawData;
slicedRawData = [...slicedRawData];
displayList = slicedRawData?.slice(0, 20) ?? [];
displayList = [...displayList];
changeRuleFilter = false;
//console.log(slicedRawData?.length)
}
}
</script>
<!-- HEADER FOR BETTER SEO -->
@ -366,9 +135,9 @@
</svelte:head>
<section
class="w-full max-w-3xl sm:max-w-screen-2xl overflow-hidden min-h-screen pt-5 pb-40 lg:px-3"
class="w-full max-w-3xl sm:max-w-screen-2xl overflow-hidden pb-20 pt-5 px-4 lg:px-3"
>
<div class="text-sm sm:text-[1rem] breadcrumbs ml-4">
<div class="text-sm sm:text-[1rem] breadcrumbs">
<ul>
<li><a href="/" class="text-gray-300">Home</a></li>
<li class="text-gray-300">Congress Flow</li>
@ -381,74 +150,16 @@
class="relative flex justify-center items-start overflow-hidden w-full"
>
<main class="w-full lg:w-3/4 lg:pr-5">
<div
class="w-full m-auto sm:bg-[#27272A] sm:rounded-xl h-auto pl-10 pr-10 pt-5 sm:pb-10 sm:pt-10 mt-3 mb-8"
>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-10">
<!-- Start Column -->
<div>
<div class="flex flex-row justify-center items-center">
<h1
class="text-3xl sm:text-4xl text-white text-center font-bold mb-5 w-80 whitespace-normal"
>
Latest Trades of Politicians
</h1>
</div>
<span
class="hidden sm:block text-white text-md font-medium text-center flex justify-center items-center"
>
Gain from monitoring the latest trades of corrupt U.S.
politicians
</span>
</div>
<!-- End Column -->
<!-- Start Column -->
<div
class="hidden sm:block relative m-auto mb-5 mt-5 sm:mb-0 sm:mt-0"
>
<svg
class="w-40 -my-5"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<filter id="glow">
<feGaussianBlur stdDeviation="5" result="glow" />
<feMerge>
<feMergeNode in="glow" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>
<path
fill="#1E40AF"
d="M57.6,-58.7C72.7,-42.6,81.5,-21.3,82,0.5C82.5,22.3,74.7,44.6,59.7,60.1C44.6,75.6,22.3,84.3,0,84.3C-22.3,84.2,-44.6,75.5,-61.1,60.1C-77.6,44.6,-88.3,22.3,-87.6,0.7C-86.9,-20.8,-74.7,-41.6,-58.2,-57.7C-41.6,-73.8,-20.8,-85.2,0.2,-85.4C21.3,-85.6,42.6,-74.7,57.6,-58.7Z"
transform="translate(100 100)"
filter="url(#glow)"
/>
</svg>
<div class="z-1 absolute top-2 right-0">
<img
class="w-24 mr-8"
src={cloudFrontUrl + "/assets/politician_logo.png"}
alt="logo"
loading="lazy"
/>
</div>
</div>
<!-- End Column -->
</div>
<div class="mb-6 border-b-[2px]">
<h1 class="mb-1 text-white text-2xl sm:text-3xl font-bold">
Latest Trades of Politicians
</h1>
</div>
<body class="w-full overflow-hidden m-auto">
{#if isLoaded}
<section class="w-full overflow-hidden m-auto sm:mt-10">
<div
class="p-3 sm:p-0 flex justify-center w-full m-auto overflow-hidden"
>
<div class=" flex justify-center w-full m-auto overflow-hidden">
<div
class="relative flex justify-center items-center overflow-hidden w-full"
>
@ -458,7 +169,7 @@
class="w-full m-auto rounded-none sm:rounded-lg mb-4 overflow-x-scroll sm:overflow-hidden"
>
<table
class="table table-sm sm:table-md table-pin-cols table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B] m-auto"
class="table table-sm table-pin-cols table-compact rounded-none sm:rounded-md w-full bg-[#09090B] border-bg-[#09090B] m-auto"
>
<thead>
<tr
@ -474,15 +185,11 @@
>
Company
</td>
<td
class="text-end bg-[#09090B] text-white text-sm font-medium sm:font-semibold"
>
Transaction
</td>
<td
class="text-end bg-[#09090B] text-white text-sm font-medium sm:font-semibold"
>
Disclosure
Date
</td>
<td
class="text-center bg-[#09090B] text-white text-sm font-medium sm:font-semibold"
@ -551,18 +258,11 @@
class="text-start whitespace-nowrap text-sm sm:text-[1rem] text-blue-400"
>
<div class="flex flex-col items-start">
<a
href={item?.assetType === "stock"
? `/stocks/${item?.ticker}`
: item?.assetType ===
("etf" || "crypto")
? `/${item?.assetType}/${item?.ticker}`
: "#"}
class="sm:hover:text-white text-blue-400"
>{item?.ticker?.length !== 0
? item?.ticker
: "-"}</a
>
<HoverStockChart
symbol={item?.ticker}
assetType={item?.assetType}
/>
<span class="text-white"
>{item?.assetDescription.length >
charNumber
@ -582,19 +282,6 @@
</div>
</td>
<td
class="text-end text-sm sm:text-[1rem] text-white whitespace-nowrap"
>
{new Date(
item?.transactionDate,
)?.toLocaleString("en-US", {
month: "short",
day: "numeric",
year: "numeric",
daySuffix: "2-digit",
})}
</td>
<td
class="text-end text-sm sm:text-[1rem] text-white whitespace-nowrap"
>
@ -657,7 +344,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/pricing"}
@ -665,7 +352,7 @@
>
<div class="w-full flex justify-between items-center p-3 mt-3">
<h2 class="text-start text-xl font-semibold text-white ml-3">
Pro Subscription 🔥
Pro Subscription
</h2>
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
</div>
@ -677,7 +364,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts"}
@ -685,7 +372,7 @@
>
<div class="w-full flex justify-between items-center p-3 mt-3">
<h2 class="text-start text-xl font-semibold text-white ml-3">
Top Analyst 📊
Top Analyst
</h2>
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
</div>
@ -696,7 +383,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/politicians"}
@ -704,7 +391,7 @@
>
<div class="w-full flex justify-between items-center p-3 mt-3">
<h2 class="text-start text-xl font-semibold text-white ml-3">
Congress Trading 🇺🇸
Congress Trading
</h2>
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
</div>

View File

@ -565,7 +565,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -584,7 +584,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/watchlist/stocks"}
@ -603,7 +603,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/stock-screener"}

View File

@ -333,7 +333,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -350,7 +350,7 @@
<div
on:click={() => goto("/donation")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -367,7 +367,7 @@
<div
on:click={() => goto("/contact")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

File diff suppressed because it is too large Load Diff

View File

@ -6,9 +6,9 @@
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
import ArrowLogo from "lucide-svelte/icons/move-up-right";
import TableHeader from "$lib/components/Table/TableHeader.svelte";
import HoverStockChart from "$lib/components/HoverStockChart.svelte";
export let data;
let cloudFrontUrl = import.meta.env.VITE_IMAGE_URL;
let isLoaded = false;
let rawData = [];
@ -214,12 +214,7 @@
</td>
<td class="text-sm sm:text-[1rem] text-start">
<a
href={"/stocks/" + item?.symbol}
class="sm:hover:text-white text-blue-400"
>
{item?.symbol}
</a>
<HoverStockChart symbol={item?.symbol} />
</td>
<td
@ -306,7 +301,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -326,7 +321,7 @@
<div
on:click={() => goto("/cramer-tracker")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -343,7 +338,7 @@
<div
on:click={() => goto("/reddit-tracker")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -535,7 +535,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -555,7 +555,7 @@
<div
on:click={() => goto("/analysts")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -572,7 +572,7 @@
<div
on:click={() => goto("/politicians")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -237,7 +237,7 @@
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div
class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0"
@ -257,7 +257,7 @@
<div
on:click={() => goto("/analysts")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -274,7 +274,7 @@
<div
on:click={() => goto("/analysts/top-stocks")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -106,7 +106,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href="/pricing"
@ -130,7 +130,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/watchlist/stocks"}
@ -149,7 +149,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/analysts/top-stocks"}

View File

@ -422,7 +422,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
<div
on:click={() => goto("/pricing")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -439,7 +439,7 @@
<div
on:click={() => goto("/donation")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">
@ -456,7 +456,7 @@
<div
on:click={() => goto("/contact")}
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<div class="w-auto lg:w-full p-1 flex flex-col m-auto px-2 sm:px-0">
<div class="w-full flex justify-between items-center p-3 mt-3">

View File

@ -142,7 +142,7 @@
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href="/pricing"
@ -162,7 +162,7 @@
{/if}
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/price-alert"}
@ -181,7 +181,7 @@
</div>
<div
class="w-full bg-[#27272A] duration-100 ease-out sm:hover:text-white text-gray-400 sm:hover:border-gray-700 border border-gray-800 rounded-md h-fit pb-4 mt-4 cursor-pointer"
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer"
>
<a
href={"/stock-screener"}