remove blog page
This commit is contained in:
parent
d7b73672fa
commit
2bb3769fe4
@ -142,6 +142,7 @@
|
||||
Contact Us
|
||||
</a>
|
||||
</li>
|
||||
<!--
|
||||
<li class="mt-2 inline-block mr-2 md:block md:mr-0">
|
||||
<a
|
||||
href="/blog"
|
||||
@ -149,7 +150,7 @@
|
||||
>
|
||||
Blog
|
||||
</a>
|
||||
</li>
|
||||
</li>-->
|
||||
<!--
|
||||
<li class="mt-2 inline-block mr-2 md:block md:mr-0">
|
||||
<a href="/newsletter" class="no-underline sm:hover:underline text-gray-100 sm:hover:text-blue-400">
|
||||
|
||||
@ -1,305 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { articleId, numberOfUnreadNotification } from "$lib/store";
|
||||
import { goto } from "$app/navigation";
|
||||
import { getImageURL } from "$lib/utils";
|
||||
import ArrowLogo from "lucide-svelte/icons/move-up-right";
|
||||
|
||||
export let data;
|
||||
let cloudFrontUrl = import.meta.env.VITE_IMAGE_URL;
|
||||
|
||||
function blogSelector(state: string) {
|
||||
$articleId = state;
|
||||
goto("/blog/article/" + $articleId);
|
||||
}
|
||||
|
||||
/*
|
||||
let allBlogPosts = [
|
||||
{
|
||||
'title': 'How the Stock Market is Corrupted by Market Makers',
|
||||
'description': `If you've explored the stock market, you've probably heard of "Market Makers." In this article, we'll break down what Market Makers are and discuss why they faced allegations of corruption during the GameStop Rally.`,
|
||||
'created': '2023-11-04',
|
||||
'username': 'mrahimi',
|
||||
'userId': 'db5s41oatgoeh0q',
|
||||
'link': 'how-the-stock-market-is-corrupted-by-market-makers',
|
||||
'readingTime': '4',
|
||||
'image': coverLogo1,
|
||||
},
|
||||
{
|
||||
'title': `Ken Griffin's Vision for Miami: A Financial Hub Rivaling New York`,
|
||||
'description': `Ken Griffin, the founder of Citadel hedge fund, foresees a transformative shift in the financial landscape, with Miami poised to surpass New York as a financial hub. Griffin, who is currently overseeing the construction of Citadel's $1 billion headquarters in Miami's Brickell Bay district, emphasizes the city's potential to outpace its northern counterpart.`,
|
||||
'created': '2023-11-29',
|
||||
'username': 'mrahimi',
|
||||
'userId': 'db5s41oatgoeh0q',
|
||||
'link': 'ken-griffin-vision-for-miami',
|
||||
'readingTime': '2',
|
||||
'image': coverLogo2,
|
||||
},
|
||||
{
|
||||
'title': `Amazon's Expansion in Generative AI: A New Collaboration with Nvidia`,
|
||||
'description': `During the recent AWS re:Invent event, Amazon (NASDAQ: AMZN) made significant strides in amplifying its AI capabilities, unveiling an array of innovative products centered around generative AI. Wedbush's latest report highlights Amazon's triple-layered strategy in the generative AI landscape, spanning infrastructure, foundational models, and applications.`,
|
||||
'created': '2023-12-01',
|
||||
'username': 'mrahimi',
|
||||
'userId': 'db5s41oatgoeh0q',
|
||||
'link': 'amazon-expansion-in-generative-ai',
|
||||
'readingTime': '2',
|
||||
'image': coverLogo3,
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
*/
|
||||
let allBlogPosts = data?.getAllBlogPost;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>
|
||||
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} Stock
|
||||
Analysis Blog · stocknear</title
|
||||
>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
|
||||
<meta
|
||||
name="description"
|
||||
content="Get the latest blog post to understand and invest correctly into companies."
|
||||
/>
|
||||
<!-- Other meta tags -->
|
||||
<meta property="og:title" content="Stock Analysis Blog · stocknear" />
|
||||
<meta
|
||||
property="og:description"
|
||||
content="Get the latest blog post to understand and invest correctly into companies."
|
||||
/>
|
||||
<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="Stock Analysis Blog · stocknear" />
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="Get the latest blog post to understand and invest correctly into companies."
|
||||
/>
|
||||
<!-- Add more Twitter meta tags as needed -->
|
||||
</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"
|
||||
>
|
||||
<div class="text-sm sm:text-[1rem] breadcrumbs ml-4">
|
||||
<ul>
|
||||
<li><a href="/" class="text-gray-300">Home</a></li>
|
||||
<li class="text-gray-300">Blog Posts</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="w-full overflow-hidden m-auto mt-5">
|
||||
<div class="sm:p-0 flex justify-center w-full m-auto overflow-hidden">
|
||||
<div
|
||||
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"
|
||||
>
|
||||
Stock Analysis Blog
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<span
|
||||
class="w-3/4 m-auto text-white text-md font-medium text-center flex justify-center items-center"
|
||||
>
|
||||
An investment in knowledge pays the best
|
||||
</span>
|
||||
<!--
|
||||
<label for="marketMoverInfo" class="cursor-pointer flex justify-center items-center mt-2">
|
||||
<span class="text-white text-md font-medium">
|
||||
Learn more
|
||||
</span>
|
||||
<svg class="w-6 h-6 inline-block ml-2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <title></title> <g id="Complete"> <g id="info-circle"> <g> <circle cx="12" cy="12" data-name="--Circle" fill="none" id="_--Circle" r="10" stroke="#B46266" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></circle> <line fill="none" stroke="#B46266" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="12" x2="12" y1="12" y2="16"></line> <line fill="none" stroke="#B46266" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="12" x2="12" y1="8" y2="8"></line> </g> </g> </g> </g></svg>
|
||||
</label>
|
||||
-->
|
||||
</div>
|
||||
<!-- End Column -->
|
||||
|
||||
<!-- Start Column -->
|
||||
<div class="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-3 right-0">
|
||||
<img
|
||||
class="w-28 mr-6"
|
||||
src={cloudFrontUrl + "/assets/blog_logo.png"}
|
||||
alt="logo"
|
||||
loading="lazy"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Column -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-10 sm:mt-5 w-full m-auto px-3">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 sm:gap-5">
|
||||
{#if allBlogPosts?.length !== 0}
|
||||
{#each allBlogPosts as item}
|
||||
<div
|
||||
class="flex flex-col w-full min-h-fit mb-5 mt-5 bg-[#fff] bg-opacity-[0.01] sm:bg-opacity-[1.0] sm:bg-[#09090B] border border-slate-700 rounded-xl m-auto"
|
||||
>
|
||||
<label
|
||||
on:click={() => blogSelector(item?.id)}
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<div class="flex-shrink-0 m-auto">
|
||||
<img
|
||||
class="w-full object-cover h-56 rounded-t-xl"
|
||||
src={getImageURL(
|
||||
item?.collectionId,
|
||||
item?.id,
|
||||
item?.cover,
|
||||
)}
|
||||
alt="Wallpaper"
|
||||
loading="lazy"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="pl-4 pt-3 w-11/12">
|
||||
<h1 class="text-xl font-bold text-white">
|
||||
{item?.title}
|
||||
</h1>
|
||||
<p class="text-white text-sm mt-4">
|
||||
{item?.abstract.length > 250
|
||||
? item?.abstract?.slice(0, 250) + "..."
|
||||
: item?.abstract}
|
||||
</p>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<div class="flex flex-row items-center pl-4 pr-3 pt-8 pb-6">
|
||||
<a
|
||||
href={"/community/user/" + item?.expand?.user?.id}
|
||||
class="cursor-pointer text-sm text-white sm:text-opacity-[0.7] flex flex-row items-center"
|
||||
>
|
||||
<img
|
||||
class="rounded-full w-10 h-10 mr-2"
|
||||
src={item?.expand?.user?.avatar
|
||||
? getImageURL(
|
||||
item?.expand?.user?.collectionId,
|
||||
item?.expand?.user?.id,
|
||||
item?.expand?.user?.avatar,
|
||||
)
|
||||
: `https://avatar.vercel.sh/${item?.expand?.user?.username}`}
|
||||
alt="User avatar"
|
||||
loading="lazy"
|
||||
/>
|
||||
|
||||
{item?.expand?.user?.username} · {new Date(
|
||||
item?.created,
|
||||
)?.toLocaleString("en-US", {
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
daySuffix: "2-digit",
|
||||
})}
|
||||
</a>
|
||||
|
||||
<div class="ml-auto">
|
||||
<span
|
||||
class="text-white sm:text-opacity-[0.7] text-sm ml-1 mr-4"
|
||||
>
|
||||
{item?.readingTime} min read
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
|
||||
{#if data?.user?.tier !== "Pro" || data?.user?.freeTrial}
|
||||
<div
|
||||
on:click={() => goto("/pricing")}
|
||||
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">
|
||||
<h2 class="text-start text-xl font-semibold text-white ml-3">
|
||||
Pro Subscription 🔥
|
||||
</h2>
|
||||
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
|
||||
</div>
|
||||
<span class="text-white p-3 ml-3 mr-3">
|
||||
Upgrade now for unlimited access to all data and tools
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div
|
||||
on:click={() => goto("/analysts")}
|
||||
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">
|
||||
<h2 class="text-start text-xl font-semibold text-white ml-3">
|
||||
Top Analyst 📊
|
||||
</h2>
|
||||
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
|
||||
</div>
|
||||
<span class="text-white p-3 ml-3 mr-3">
|
||||
Get the latest top Wall Street analyst ratings
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
on:click={() => goto("/analysts/top-stocks")}
|
||||
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">
|
||||
<h2 class="text-start text-xl font-semibold text-white ml-3">
|
||||
Top Stocks Picks ⭐
|
||||
</h2>
|
||||
<ArrowLogo class="w-8 h-8 mr-3 flex-shrink-0" />
|
||||
</div>
|
||||
<span class="text-white p-3 ml-3 mr-3">
|
||||
Get the latest top Wall Street analyst ratings.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -1,30 +0,0 @@
|
||||
import { pb } from "$lib/pocketbase";
|
||||
import { getCache, setCache } from "$lib/store";
|
||||
|
||||
export const load = async () => {
|
||||
const getAllBlogPost = async () => {
|
||||
let output;
|
||||
|
||||
// Get cached data for the specific tickerID
|
||||
const cachedData = getCache("allBlogPost", "getAllBlogPost");
|
||||
if (cachedData) {
|
||||
output = cachedData;
|
||||
} else {
|
||||
// make the POST request to the endpoint
|
||||
output = await pb.collection("articles").getFullList({
|
||||
expand: "user",
|
||||
sort: "-created",
|
||||
});
|
||||
|
||||
// Cache the data for this specific tickerID with a specific name 'getAllBlogPost'
|
||||
setCache("allBlogPost", output, "getAllBlogPost");
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
// Make sure to return a promise
|
||||
return {
|
||||
getAllBlogPost: await getAllBlogPost(),
|
||||
};
|
||||
};
|
||||
@ -1,293 +0,0 @@
|
||||
<script lang 'ts'></script>
|
||||
|
||||
<svelte:head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>
|
||||
{$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""}
|
||||
{article?.title} · stocknear</title
|
||||
>
|
||||
<meta
|
||||
name="description"
|
||||
content="Latest articles on stocks, finance and investing"
|
||||
/>
|
||||
<!-- Other meta tags -->
|
||||
<meta property="og:title" content={article?.title} />
|
||||
<meta property="og:description" content={article?.abstract} />
|
||||
<meta property="og:type" content="article" />
|
||||
<!-- 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={article?.title} />
|
||||
<meta name="twitter:description" content={article?.abstract} />
|
||||
<!-- Add more Twitter meta tags as needed -->
|
||||
</svelte:head>
|
||||
|
||||
<section
|
||||
class="w-full max-w-3xl sm:max-w-screen-xl overflow-hidden min-h-screen pt-5 pb-40"
|
||||
>
|
||||
<div class="text-sm sm:text-[1rem] breadcrumbs">
|
||||
<ul>
|
||||
<li><a href="/" class="text-gray-300">Home</a></li>
|
||||
<li><a href="/blog" class="text-gray-300">All Blog Post</a></li>
|
||||
<li class="text-gray-300">Post</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="mt-3 w-full max-w-4xl h-72 flex flex-col bg-cover bg-center bg-no-repeat rounded-lg"
|
||||
style="background-image: url('{article?.cover
|
||||
? getImageURL(article?.collectionId, article?.id, article?.cover)
|
||||
: ''}');"
|
||||
/>
|
||||
|
||||
<main class="grow m-auto">
|
||||
<div class="w-full max-w-4xl">
|
||||
<div class="sm:flex sm:justify-start">
|
||||
<!-- Main content -->
|
||||
<div
|
||||
class="md:grow pt-6 pb-12 w-full sm:mr-4 rounded-2xl sm:rounded-none"
|
||||
>
|
||||
<div class="sm:pr-5">
|
||||
<!--Start Title-->
|
||||
<h1
|
||||
class="text-white font-bold text-3xl bg-[#111011] sm:bg-[#09090B] p-6 sm:p-3 rounded-t-xl -mt-36 sm:mt-0 bg-opacity-[0.9]"
|
||||
>
|
||||
{@html article?.title}
|
||||
</h1>
|
||||
<!--End Title-->
|
||||
<!--Start Writer-->
|
||||
<div class="flex flex-row items-center pl-3 pr-3 pt-8 pb-6">
|
||||
<a
|
||||
href={"/community/user/" + article?.user}
|
||||
class="cursor-pointer text-sm text-slate-200 flex flex-row items-center"
|
||||
>
|
||||
<img
|
||||
class="rounded-full w-10 h-10 mr-2"
|
||||
src={article?.expand?.user?.avatar
|
||||
? getImageURL(
|
||||
article?.expand?.user?.collectionId,
|
||||
article?.expand?.user?.id,
|
||||
article?.expand?.user?.avatar,
|
||||
)
|
||||
: `https://avatar.vercel.sh/${article?.expand?.user?.username}`}
|
||||
alt="User avatar"
|
||||
loading="lazy"
|
||||
/>
|
||||
<div class="flex flex-col items-start">
|
||||
<span class="text-white text-sm"> mrahimi </span>
|
||||
<span class="text-white text-opacity-[0.7] text-sm">
|
||||
{article?.readingTime} min read · {new Date(
|
||||
article?.created,
|
||||
)?.toLocaleString("en-US", {
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
year: "numeric",
|
||||
daySuffix: "2-digit",
|
||||
})}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<!--End Write-->
|
||||
|
||||
<!--Start Description-->
|
||||
<div class="text-white text-lg p-6 sm:p-3">
|
||||
{@html article?.description}
|
||||
</div>
|
||||
<!--End Description-->
|
||||
|
||||
{#if !data?.user}
|
||||
<div
|
||||
class="rounded-lg border border-slate-800 w-11/12 sm:w-full m-auto p-6 mt-16"
|
||||
>
|
||||
<span
|
||||
class="text-white text-md text-center p-4 mb-3 flex justify-center"
|
||||
>
|
||||
Stay up to date with the market without the redudant BS
|
||||
</span>
|
||||
<a
|
||||
class="w-64 flex mb-5 justify-center items-center m-auto btn text-white bg-[#fff] sm:hover:bg-gray-300 transition duration-150 ease-in-out group"
|
||||
href="/register"
|
||||
>
|
||||
Get Started
|
||||
<span
|
||||
class="tracking-normal group-hover:translate-x-0.5 transition-transform duration-150 ease-in-out"
|
||||
>
|
||||
<svg
|
||||
class="w-4 h-4"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
><g transform="rotate(90 12 12)"
|
||||
><g fill="none"
|
||||
><path
|
||||
d="M24 0v24H0V0h24ZM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018Zm.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022Zm-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01l-.184-.092Z"
|
||||
/><path
|
||||
fill="white"
|
||||
d="M13.06 3.283a1.5 1.5 0 0 0-2.12 0L5.281 8.939a1.5 1.5 0 0 0 2.122 2.122L10.5 7.965V19.5a1.5 1.5 0 0 0 3 0V7.965l3.096 3.096a1.5 1.5 0 1 0 2.122-2.122L13.06 3.283Z"
|
||||
/></g
|
||||
></g
|
||||
></svg
|
||||
>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<!--
|
||||
<aside class="hidden sm:inline-block min-h-screen sm:w-96 pt-[1rem]">
|
||||
|
||||
|
||||
<div class="z-20 fixed sticky">
|
||||
|
||||
|
||||
{#if discordData?.length !== 0}
|
||||
<div class="space-y-3 mb-5">
|
||||
<div class="rounded-2xl h-auto sm:w-96">
|
||||
|
||||
<div class="flex flex-row items-center w-full p-3">
|
||||
<svg class="w-12 mt-3 ml-2 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M19.27 5.33C17.94 4.71 16.5 4.26 15 4a.09.09 0 0 0-.07.03c-.18.33-.39.76-.53 1.09a16.09 16.09 0 0 0-4.8 0c-.14-.34-.35-.76-.54-1.09c-.01-.02-.04-.03-.07-.03c-1.5.26-2.93.71-4.27 1.33c-.01 0-.02.01-.03.02c-2.72 4.07-3.47 8.03-3.1 11.95c0 .02.01.04.03.05c1.8 1.32 3.53 2.12 5.24 2.65c.03.01.06 0 .07-.02c.4-.55.76-1.13 1.07-1.74c.02-.04 0-.08-.04-.09c-.57-.22-1.11-.48-1.64-.78c-.04-.02-.04-.08-.01-.11c.11-.08.22-.17.33-.25c.02-.02.05-.02.07-.01c3.44 1.57 7.15 1.57 10.55 0c.02-.01.05-.01.07.01c.11.09.22.17.33.26c.04.03.04.09-.01.11c-.52.31-1.07.56-1.64.78c-.04.01-.05.06-.04.09c.32.61.68 1.19 1.07 1.74c.03.01.06.02.09.01c1.72-.53 3.45-1.33 5.25-2.65c.02-.01.03-.03.03-.05c.44-4.53-.73-8.46-3.1-11.95c-.01-.01-.02-.02-.04-.02M8.52 14.91c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.84 2.12-1.89 2.12m6.97 0c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.83 2.12-1.89 2.12"/></svg>
|
||||
<div class="flex justify-center items-center text-2xl font-medium ml-3 mt-3">
|
||||
<span class="self-center text-2xl text-white font-bold whitespace-nowrap">
|
||||
Official Discord
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full p-4 text-white">
|
||||
Daily pre-market discussions, feature request, bug reports & more.
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt-4 mb-4 border-t border-slate-700 w-11/12 m-auto" />
|
||||
|
||||
<div class="w-full pl-5 pt-2 pb-2 flex flex-row items-center">
|
||||
<div class="flex flex-col">
|
||||
<span class="text-white font-bold text-lg">
|
||||
{$discordMembers}
|
||||
</span>
|
||||
<span class="text-white text-opacity-[0.7] text-[1rem">
|
||||
Members
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex flex-col ml-12">
|
||||
<div class="flex flex-row items-center text-white font-bold text-lg">
|
||||
<div class="mr-1 inline-block w-3.5 h-3.5 sm:w-4 sm:h-4 bg-[#75D377] border border-2 border-slate-800 rounded-full" />
|
||||
{discordData?.members?.length}
|
||||
</div>
|
||||
<span class="text-white text-opacity-[0.7] text-[1rem">
|
||||
Online
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="ml-12 avatar-group -space-x-6 rtl:space-x-reverse">
|
||||
{#each discordData?.members?.slice(0,5) as item, index}
|
||||
{#if index < 4}
|
||||
<div class="avatar">
|
||||
<div class="w-8">
|
||||
{#if item['avatar_url']?.length !== 0}
|
||||
<img src={item['avatar_url']} />
|
||||
{:else}
|
||||
<img src={`https://api.dicebear.com/7.x/thumbs/svg?seed=test`} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if index >=4}
|
||||
<div class="avatar placeholder">
|
||||
<div class="w-8 bg-neutral text-sm text-white">
|
||||
<span>+{discordData?.members?.length -4}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt-4 border-t border-slate-700 w-11/12 m-auto" />
|
||||
|
||||
<div class="flex justify-center items-center mb-8 pt-5">
|
||||
<a href={discordURL} rel="noopener noreferrer" target="_blank" class="text-[1rem] btn btn-md w-11/12 text-[#1A1A1B] rounded-full bg-[#C7CACC] cursor-pointer py-2.5 px-4 btn hover:bg-[#fff] mb-4">
|
||||
Join us
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</aside>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
#content {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#content:before,
|
||||
#content:after {
|
||||
position: absolute;
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
border-color: #ff8c6c; /* or whatever color */
|
||||
border-style: solid; /* or whatever style */
|
||||
content: " ";
|
||||
}
|
||||
|
||||
#content:before {
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-width: 1px 0 0 1px;
|
||||
}
|
||||
|
||||
#content:after {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
border-width: 0 1px 1px 0;
|
||||
}
|
||||
|
||||
.grid-background {
|
||||
background: linear-gradient(to bottom, #27272a, #111011);
|
||||
width: 24rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.grid-background::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
border-radius: 10%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: repeating-linear-gradient(
|
||||
to bottom,
|
||||
rgba(255, 255, 255, 0.15) 0,
|
||||
rgba(255, 255, 255, 0.15) 1px,
|
||||
transparent 1px,
|
||||
transparent 40px
|
||||
),
|
||||
repeating-linear-gradient(
|
||||
to right,
|
||||
rgba(255, 255, 255, 0.15) 0,
|
||||
rgba(255, 255, 255, 0.15) 1px,
|
||||
transparent 1px,
|
||||
transparent 40px
|
||||
);
|
||||
background-size: 20px 100% 100% 20px; /* Adjust the grid spacing as needed */
|
||||
}
|
||||
</style>
|
||||
@ -1,55 +0,0 @@
|
||||
import { pb } from "$lib/pocketbase";
|
||||
import { getCache, setCache } from "$lib/store";
|
||||
|
||||
export const load = async ({ params }) => {
|
||||
const getArticle = async () => {
|
||||
let output;
|
||||
|
||||
// Get cached data for the specific tickerID
|
||||
const cachedData = getCache(params?.slug, "getArticle");
|
||||
if (cachedData) {
|
||||
output = cachedData;
|
||||
} else {
|
||||
// make the POST request to the endpoint
|
||||
output = await pb
|
||||
?.collection("articles")
|
||||
?.getOne(params?.slug, { expand: "user" });
|
||||
|
||||
// Cache the data for this specific tickerID with a specific name 'getArticle'
|
||||
setCache(params?.slug, output, "getArticle");
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
/*
|
||||
const getDiscordWidget = async () => {
|
||||
let output;
|
||||
// Get cached data for the specific tickerID
|
||||
const cachedData = getCache('', 'getDiscordWidget');
|
||||
if (cachedData) {
|
||||
output = cachedData;
|
||||
} else {
|
||||
|
||||
// make the POST request to the endpoint
|
||||
const response = await fetch('https://discord.com/api/guilds/1165618982133436436/widget.json', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
"Content-Type": "application/json", "X-API-KEY": apiKey
|
||||
},
|
||||
});
|
||||
|
||||
output = await response.json();
|
||||
setCache('', output, 'getDiscordWidget');
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
*/
|
||||
|
||||
// Make sure to return a promise
|
||||
return {
|
||||
getArticle: await getArticle(),
|
||||
//getDiscordWidget: await getDiscordWidget()
|
||||
};
|
||||
};
|
||||
@ -86,7 +86,7 @@ const pages = [
|
||||
{ title: "/imprint" },
|
||||
{ title: "/about" },
|
||||
{ title: "/contact" },
|
||||
{ title: "/blog" },
|
||||
//{ title: "/blog" },
|
||||
{ title: "/politicians" },
|
||||
{ title: "/politicians/flow-data" },
|
||||
{ title: "/analysts" },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user