mirror of
https://github.com/ProjectSegfault/website.git
synced 2025-05-31 14:12:04 +05:30
v3
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<div class="i-ic:outline-bookmarks text-xl -ml-1" />
|
||||
{#each post.tags as tag}
|
||||
<a href="/blog/tags/{tag.slug}" class="no-underline rounded-2 p-1 {isPost ? "bg-secondary" : "bg-primary"}">{tag.name}</a>
|
||||
<a href="/blog/tags/{tag.slug}" class="no-underline rounded p-1 {isPost ? "bg-secondary" : "bg-primary"}">{tag.name}</a>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
</script>
|
||||
|
||||
<div class="prose flex flex-col text-justify m-auto">
|
||||
<img src={data.post.feature_image} alt="{data.post.title} image" class="rounded-2">
|
||||
<img src={data.post.feature_image} alt="{data.post.title} image" class="rounded">
|
||||
{@html data.post.html}
|
||||
</div>
|
||||
@@ -3,7 +3,7 @@
|
||||
export let isPost: boolean = false;
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-4 p-4 rounded-2 {isPost ? "" : "w-120 bg-secondary"}">
|
||||
<div class="flex flex-col gap-4 p-4 rounded {isPost ? "" : "w-110 bg-secondary"}">
|
||||
<slot />
|
||||
|
||||
{#if url}
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
<script lang="ts">
|
||||
export let hasMt: boolean = false;
|
||||
export let isHome: boolean = false;
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row flex-wrap gap-10 {hasMt ? "mt-16" : ""} {isHome ? "justify-center" : ""}">
|
||||
<div class="flex flex-row flex-wrap gap-4">
|
||||
<slot />
|
||||
</div>
|
||||
@@ -6,6 +6,6 @@
|
||||
|
||||
<div class="flex flex-col gap-4">
|
||||
{#each items as item}
|
||||
<a href="/blog/{name}/{item.slug}" class="bg-secondary sm:w-md p-2 rounded-2 no-underline">{item.name}</a>
|
||||
<a href="/blog/{name}/{item.slug}" class="bg-secondary sm:w-md p-2 rounded no-underline">{item.name}</a>
|
||||
{/each}
|
||||
</div>
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
{#if !isPost}
|
||||
{#if post.feature_image}
|
||||
<img src={post.feature_image} alt="{post.title} image" class="rounded-2">
|
||||
<img src={post.feature_image} alt="{post.title} image" class="rounded">
|
||||
{/if}
|
||||
<a href="/blog/{post.slug}" class="text-text no-underline hover:underline"><span class="text-xl font-bold">{post.title}</span></a>
|
||||
{:else}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<script lang="ts">
|
||||
export let title: string = "";
|
||||
export let position: string = "";
|
||||
export let description: string = "";
|
||||
export let icon: string = "";
|
||||
export let positionStyles: string = "";
|
||||
</script>
|
||||
|
||||
<div class="bg-secondary rounded-2 p-4 w-[18rem] sm:w-md flex flex-col">
|
||||
<div class="flex-1 flex flex-row gap-4">
|
||||
{#if icon}
|
||||
<div>
|
||||
<img
|
||||
src={icon}
|
||||
class="h-20 rounded-2"
|
||||
alt="{title} icon"
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
<div>
|
||||
<span class="text-2xl font-bold">
|
||||
{title}
|
||||
|
||||
{#if position}
|
||||
<span>- </span>
|
||||
<span style={positionStyles}>{position}</span>
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
{#if description}
|
||||
<p class="description">{description}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
@@ -1,3 +0,0 @@
|
||||
<div class="flex gap-8 flex-row flex-wrap">
|
||||
<slot />
|
||||
</div>
|
||||
@@ -1,49 +0,0 @@
|
||||
<script lang="ts">
|
||||
export let url: string = "";
|
||||
let classes: string = "";
|
||||
export { classes as class };
|
||||
</script>
|
||||
|
||||
<a
|
||||
href={url}
|
||||
class="border-none rounded-2 p-2 cursor-pointer font-primary text-secondary decoration-none w-fit text-xl flex items-center {classes}"
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
|
||||
<style>
|
||||
.web,
|
||||
.email,
|
||||
.picture,
|
||||
.pgp,
|
||||
.link {
|
||||
@apply bg-alt text-alt-text transition-all duration-250;
|
||||
}
|
||||
|
||||
.web:hover,
|
||||
.email:hover,
|
||||
.picture:hover,
|
||||
.pgp:hover {
|
||||
@apply bg-accent text-alt;
|
||||
}
|
||||
|
||||
.matrixcolored {
|
||||
@apply bg-alt text-alt-text;
|
||||
}
|
||||
|
||||
.discordcolored {
|
||||
@apply bg-[#5865f2] text-white;
|
||||
}
|
||||
|
||||
.gitcolored {
|
||||
@apply bg-[#f05032] text-white;
|
||||
}
|
||||
|
||||
.githubcolored {
|
||||
@apply bg-alt text-alt-text;
|
||||
}
|
||||
|
||||
.torcolored {
|
||||
@apply bg-[#7d4698] text-white;
|
||||
}
|
||||
</style>
|
||||
@@ -1,3 +0,0 @@
|
||||
<div class="flex flex-row flex-wrap gap-2">
|
||||
<slot />
|
||||
</div>
|
||||
@@ -1,4 +0,0 @@
|
||||
export { default as CardOuter } from "./CardOuter.svelte";
|
||||
export { default as CardInner } from "./CardInner.svelte";
|
||||
export { default as LinksOuter } from "./LinksOuter.svelte";
|
||||
export { default as Link } from "./Link.svelte";
|
||||
@@ -1,8 +1,7 @@
|
||||
<footer class="flex flex-col text-xl sticky top-full">
|
||||
<div
|
||||
class="flex flex-col justify-center sm:flex-row gap-1 border-t border-t-solid border-t-grey p-3 text-sm"
|
||||
>
|
||||
<span class="flex flex-row items-center gap-1">Made with <div class="i-simple-icons:svelte text-[#FF3E00]" />SvelteKit <span class="hidden sm:block">-</span></span>
|
||||
<footer class="sticky top-full">
|
||||
<div class="flex flex-col justify-center sm:flex-row gap-1 border-t border-t-solid border-t-grey p-3 text-sm">
|
||||
<p class="flex flex-row items-center gap-1">Made with <i class="i-simple-icons:svelte text-[#FF3E00] block" /> SvelteKit</p>
|
||||
<span class="hidden sm:block">-</span>
|
||||
<a href="https://github.com/ProjectSegfault/website">Source code</a>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
@@ -1,33 +0,0 @@
|
||||
<script lang="ts">
|
||||
import HCaptcha from "svelte-hcaptcha";
|
||||
import { Note } from "$lib/Form";
|
||||
|
||||
let submit = false;
|
||||
|
||||
const showSubmitButton = () => {
|
||||
submit = !submit;
|
||||
};
|
||||
|
||||
export let sitekey: string = "";
|
||||
</script>
|
||||
|
||||
<Note
|
||||
content="The submit button will be visible when you complete the Captcha."
|
||||
icon="i-ic:outline-info text-xl"
|
||||
/>
|
||||
<HCaptcha
|
||||
{sitekey}
|
||||
on:success={showSubmitButton}
|
||||
/>
|
||||
|
||||
<slot />
|
||||
|
||||
{#if submit}
|
||||
<button
|
||||
type="submit"
|
||||
value="Submit"
|
||||
class="form-button"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
{/if}
|
||||
@@ -1,28 +0,0 @@
|
||||
<script lang="ts">
|
||||
export let action: string = "";
|
||||
export let method: string = "";
|
||||
export let id: string = "";
|
||||
</script>
|
||||
|
||||
<form
|
||||
{action}
|
||||
{method}
|
||||
{id}
|
||||
class="flex flex-col gap-4 w-fit"
|
||||
>
|
||||
<slot />
|
||||
</form>
|
||||
|
||||
<style>
|
||||
:global(.form-button) {
|
||||
@apply bg-secondary border-none rounded-2 p-2 cursor-pointer text-text font-primary decoration-none;
|
||||
}
|
||||
|
||||
:global(.form-button:not(select):hover) {
|
||||
@apply bg-accent decoration-none transition-all duration-500 text-secondary;
|
||||
}
|
||||
|
||||
:global(.form-textbox) {
|
||||
@apply bg-secondary text-text rounded-2 border-none p-2 font-primary outline-none;
|
||||
}
|
||||
</style>
|
||||
@@ -1,51 +0,0 @@
|
||||
<script lang="ts">
|
||||
export let inputType: string = "";
|
||||
export let inputName: string = "";
|
||||
export let inputPlaceholder: string = "";
|
||||
export let select: boolean = true;
|
||||
export let selectType: string = "";
|
||||
export let input2: boolean = false;
|
||||
export let input2Type: string = "";
|
||||
export let input2Name: string = "";
|
||||
export let input2Placeholder: string = "";
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="flex items-center flex-row gap-4 children:w-[50%] lt-sm:(flex-col items-start justify-center children:w-[calc(100%-1rem)])"
|
||||
>
|
||||
<input
|
||||
type={inputType}
|
||||
name={inputName}
|
||||
class="form-textbox"
|
||||
placeholder={inputPlaceholder}
|
||||
required
|
||||
/>
|
||||
{#if input2}
|
||||
<input
|
||||
type={input2Type}
|
||||
name={input2Name}
|
||||
class="form-textbox"
|
||||
placeholder={input2Placeholder}
|
||||
required
|
||||
/>
|
||||
{/if}
|
||||
{#if select}
|
||||
<select
|
||||
name={selectType}
|
||||
required
|
||||
class="form-button"
|
||||
>
|
||||
<slot />
|
||||
</select>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if select}
|
||||
<style>
|
||||
@media screen and (max-width: 640px) {
|
||||
div > :nth-child(2) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{/if}
|
||||
@@ -1,11 +0,0 @@
|
||||
<script lang="ts">
|
||||
export let content: string = "";
|
||||
export let icon: string = "";
|
||||
</script>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
{#if icon}
|
||||
<div class={icon} />
|
||||
{/if}
|
||||
<b>{content}</b>
|
||||
</div>
|
||||
@@ -1,15 +0,0 @@
|
||||
<script lang="ts">
|
||||
export let id: string = "";
|
||||
export let name: string = "";
|
||||
export let placeholder: string = "";
|
||||
</script>
|
||||
|
||||
<textarea
|
||||
{id}
|
||||
{name}
|
||||
rows="4"
|
||||
cols="25"
|
||||
required
|
||||
class="form-textbox resize-y"
|
||||
{placeholder}
|
||||
/>
|
||||
@@ -1,5 +0,0 @@
|
||||
export { default as Note } from "./Note.svelte";
|
||||
export { default as Captcha } from "./Captcha.svelte";
|
||||
export { default as Form } from "./Form.svelte";
|
||||
export { default as Meta } from "./Meta.svelte";
|
||||
export { default as TextArea } from "./TextArea.svelte";
|
||||
@@ -1,20 +1,8 @@
|
||||
<script lang="ts">
|
||||
export let title: string = "";
|
||||
export let description: string = "";
|
||||
export let marginTop: string = "";
|
||||
let styles: string = "";
|
||||
export { styles as style };
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="flex flex-col items-center justify-center children:(m-4 p-0 text-center)"
|
||||
style="margin-top: {marginTop}%; {styles}"
|
||||
>
|
||||
{#if title}
|
||||
<h1 class="text-5xl font-800 text-accent">{title}</h1>
|
||||
{/if}
|
||||
{#if description}
|
||||
<p class="text-3xl text-text">{description}</p>
|
||||
{/if}
|
||||
<slot />
|
||||
</div>
|
||||
<div class="flex flex-col gap-6 items-center text-center mt-[7%]">
|
||||
<h1 class="text-5xl font-extrabold text-accent my-0 border-b-0 pb-0">Project Segfault</h1>
|
||||
<p class="text-2xl">Open source development and hosted services.</p>
|
||||
<div class="flex flex-row gap-4">
|
||||
<a href="/instances" class="button"><div class="i-ic:outline-computer" /> Instances</a>
|
||||
<a href="/donate" class="button !bg-amber !text-black"><div class="i-ic:outline-attach-money" /> Donate</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,19 +0,0 @@
|
||||
<script lang="ts">
|
||||
export let url: string = "";
|
||||
export let icon: string = "";
|
||||
export let title: string = "";
|
||||
export let bg: string = "";
|
||||
export let color: string = "";
|
||||
export let styles: string = "";
|
||||
</script>
|
||||
|
||||
<a
|
||||
href={url}
|
||||
class="decoration-none bg-accent px-3 py-2 text-primary rounded-2 transition-filter hover:brightness-125 flex items-center w-fit gap-2"
|
||||
style="background-color: {bg}; color: {color}; {styles}"
|
||||
>
|
||||
{#if icon}
|
||||
<div class={icon} />
|
||||
{/if}
|
||||
{title}
|
||||
</a>
|
||||
@@ -6,61 +6,51 @@
|
||||
|
||||
$: currentPage = $page.url.pathname;
|
||||
|
||||
let showMenuButton = false;
|
||||
$: innerWidth = 0;
|
||||
|
||||
let innerWidth: number = 0;
|
||||
$: isMobile = innerWidth < 1090;
|
||||
|
||||
$: showMenuButton = innerWidth < 1090;
|
||||
$: hasJS = typeof Window !== "undefined";
|
||||
|
||||
let menuOpen = false;
|
||||
$: showMenuButton = hasJS && isMobile;
|
||||
|
||||
$: menuOpen = innerWidth > 1090;
|
||||
$: menuOpen = !hasJS || hasJS && !isMobile;
|
||||
|
||||
$: menuOpenMobile = innerWidth < 1090 && menuOpen;
|
||||
$: menuOpenMobile = isMobile && menuOpen;
|
||||
|
||||
let showThemeToggle: boolean = true;
|
||||
$: showThemeToggle = hasJS;
|
||||
|
||||
const toggleMenu = () => {
|
||||
menuOpen = !menuOpen;
|
||||
};
|
||||
const toggleMenu = () => menuOpen = !menuOpen;
|
||||
|
||||
const handleNavigation = () => {
|
||||
if (showMenuButton) {
|
||||
menuOpen = false;
|
||||
} else {
|
||||
menuOpen = true;
|
||||
}
|
||||
};
|
||||
const handleNavigation = () => showMenuButton ? menuOpen = false : menuOpen = true;
|
||||
|
||||
const menus = [
|
||||
{ name: "Instances", url: "/instances" },
|
||||
{ name: "Donate", url: "/donate" },
|
||||
// { name: "Pubnix", url: "/pubnix" },
|
||||
{ name: "Contact us", url: "/contact" },
|
||||
{ name: "Our team", url: "/team" },
|
||||
{ name: "Timeline", url: "/timeline" },
|
||||
{ name: "Contact", url: "/contact" },
|
||||
{ name: "Team", url: "/team" },
|
||||
{
|
||||
name: "Wiki",
|
||||
url: "https://wiki.projectsegfau.lt/",
|
||||
external: true
|
||||
},
|
||||
{ name: "Blog", url: "/blog" },
|
||||
{ name: "Legal", url: "/legal" },
|
||||
{
|
||||
name: "Status",
|
||||
url: "https://status.projectsegfau.lt/",
|
||||
external: true
|
||||
}
|
||||
},
|
||||
{ name: "Legal", url: "/legal" }
|
||||
];
|
||||
|
||||
$: if (typeof Window === "undefined") {
|
||||
menuOpen = true;
|
||||
showMenuButton = false;
|
||||
showThemeToggle = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:window bind:innerWidth />
|
||||
|
||||
<nav
|
||||
class="bg-primary {menuOpenMobile ? "border-none" : "border-b border-b-solid border-b-grey"} flex p-2 flex-col justify-between nav:(flex-row items-center)"
|
||||
class:hasJSNav={typeof Window !== "undefined"}
|
||||
class:noJSNav={typeof Window === "undefined"}
|
||||
class="bg-primary {menuOpenMobile ? "border-none" : "border-b border-b-solid border-b-grey"} {isMobile ? "py-2" : ""} flex px-2 flex-col justify-between nav:(flex-row items-center)"
|
||||
class:hasJSNav={hasJS}
|
||||
class:noJSNav={!hasJS}
|
||||
>
|
||||
<div class="flex flex-row items-center justify-between">
|
||||
<a
|
||||
@@ -85,9 +75,9 @@
|
||||
|
||||
{#if menuOpen}
|
||||
<div
|
||||
class="links"
|
||||
class:hasJS={typeof Window !== "undefined"}
|
||||
class:noJS={typeof Window === "undefined"}
|
||||
class="links {isMobile ? "!children:py-2" : ""}"
|
||||
class:hasJS={hasJS}
|
||||
class:noJS={!hasJS}
|
||||
transition:slide="{{duration: 300, easing: quintOut }}"
|
||||
>
|
||||
{#each menus as { url, name, external }}
|
||||
@@ -134,7 +124,7 @@
|
||||
}
|
||||
|
||||
.links > * {
|
||||
@apply p-2 cursor-pointer text-text decoration-none transition-color duration-250 text-sm font-500 flex items-center hover\:text-accent;
|
||||
@apply py-4 px-2 cursor-pointer text-text decoration-none transition-color duration-250 text-sm font-500 flex items-center hover\:(text-accent);
|
||||
}
|
||||
|
||||
.icon > span {
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<button
|
||||
on:click={toggle}
|
||||
class="cursor-pointer flex items-center py-1 px-0 bg-transparent border-0 font-primary color-text"
|
||||
class="text-text flex items-center text-sm"
|
||||
>
|
||||
<div class="i-ic:{theme === 'dark' ? 'outline-light-mode' : 'outline-dark-mode'} h-4 w-4" />
|
||||
<span class="ml-2 nav:(hidden ml-1)">Toggle theme</span>
|
||||
8
src/lib/PMargin.svelte
Normal file
8
src/lib/PMargin.svelte
Normal file
@@ -0,0 +1,8 @@
|
||||
<script lang="ts">
|
||||
let classes: string = "";
|
||||
export { classes as class };
|
||||
</script>
|
||||
|
||||
<p class="my-4 {classes}">
|
||||
<slot />
|
||||
</p>
|
||||
10
src/lib/PageTransition.svelte
Normal file
10
src/lib/PageTransition.svelte
Normal file
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
import { fly } from "svelte/transition";
|
||||
export let pathname = "";
|
||||
</script>
|
||||
|
||||
{#key pathname}
|
||||
<div in:fly={{ x: -10, duration: 250, delay: 250 }} out:fly={{ x: 5, duration: 250 }}>
|
||||
<slot />
|
||||
</div>
|
||||
{/key}
|
||||
@@ -1,42 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "akisblack",
|
||||
"description": "I am a soydev maintaining the website and api.",
|
||||
"position": "Web dev",
|
||||
"website": "https://akisblack.github.io/"
|
||||
},
|
||||
{
|
||||
"name": "Arya",
|
||||
"description": "Libre Software Enthusiast and Project Segfault Sysadmin",
|
||||
"position": "Sysadmin",
|
||||
"website": "https://aryak.vern.cc",
|
||||
"matrix": "https://matrix.to/#/@aryak:projectsegfau.lt",
|
||||
"git": "https://codeberg.org/aryak",
|
||||
"email": "arya@projectsegfau.lt",
|
||||
"pgp": "https://keys.openpgp.org/vks/v1/by-fingerprint/9D56914428A62CF1B6A32175842D12BDA50DF120"
|
||||
},
|
||||
{
|
||||
"name": "Devrand",
|
||||
"matrix": "https://matrix.to/#/@openssl_rand:projectsegfau.lt/",
|
||||
"position": "Sysadmin",
|
||||
"description": "High schooler who is interested in internet freedom, programming, and open source software. (Previously openssl_rand)",
|
||||
"email": "mailto:openssl_rand@projectsegfau.lt"
|
||||
},
|
||||
{
|
||||
"name": "Midou",
|
||||
"description": "A random person with an obsession to online cat pics, also happens to be the sysadmin of the project",
|
||||
"matrix": "https://matrix.to/#/@midou:projectsegfau.lt/",
|
||||
"position": "Sysadmin",
|
||||
"git": "https://github.com/Midou36O/",
|
||||
"website": "https://midou36o.github.io/",
|
||||
"email": "midou@projectsegfau.lt",
|
||||
"pgp": "https://keys.openpgp.org/vks/v1/by-fingerprint/E2CA3E4AAC6FF624A1EB993FFC7429AE78981D71"
|
||||
},
|
||||
{
|
||||
"name": "MrLeRien",
|
||||
"discord": "https://discord.com/users/213634643327582208/",
|
||||
"matrix": "https://matrix.to/#/@mrlerien:projectsegfau.lt/",
|
||||
"position": "France server owner",
|
||||
"description": "using windows server for soleil levant was a mistake"
|
||||
}
|
||||
]
|
||||
@@ -1,52 +0,0 @@
|
||||
@font-face {
|
||||
font-family: "JetBrains Mono";
|
||||
src: url("/JetBrainsMono.woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
html, html.light {
|
||||
--accent: #00a584;
|
||||
--accent-translucent: #00a58498;
|
||||
--font-primary: "JetBrains Mono", monospace;
|
||||
--primary: #ffffff;
|
||||
--secondary: #eeeeee;
|
||||
--tertiary: #939393;
|
||||
--text: #444444;
|
||||
--grey: #cecece;
|
||||
--alt: #ddd;
|
||||
--alt-text: #333;
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
--primary: #151515;
|
||||
--secondary: #252525;
|
||||
--tertiary: #353535;
|
||||
--text: #ffffffde;
|
||||
--grey: #5454547a;
|
||||
--alt: #333;
|
||||
--alt-text: #ddd;
|
||||
color-scheme: dark;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
@apply font-primary bg-primary text-text m-0 flex flex-col relative min-h-screen leading-relaxed transition-all duration-250;
|
||||
}
|
||||
|
||||
::selection {
|
||||
@apply bg-accentTranslucent;
|
||||
}
|
||||
|
||||
main {
|
||||
@apply p-4;
|
||||
}
|
||||
|
||||
a {
|
||||
@apply underline text-accent underline-offset-5 transition-filter duration-250;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
@apply brightness-125;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { env } from "$env/dynamic/private";
|
||||
|
||||
const fetchApi = async (action: string, additional?: string) => {
|
||||
const data = await fetch("https://blog.projectsegfau.lt/ghost/api/content/" + action + "/?key=" + env.GHOST_API_KEY + "&include=authors,tags&limit=all&formats=html,plaintext" + (additional ? additional : ""));
|
||||
|
||||
return data.json();
|
||||
};
|
||||
|
||||
export default fetchApi;
|
||||
@@ -1,3 +0,0 @@
|
||||
const map = new Map();
|
||||
|
||||
export default map;
|
||||
@@ -1,14 +0,0 @@
|
||||
import { env } from "$env/dynamic/private";
|
||||
import { building } from "$app/environment";
|
||||
import { MongoClient } from "mongodb";
|
||||
import type { Db } from "mongodb";
|
||||
|
||||
export let db: Db;
|
||||
|
||||
if (!building) {
|
||||
const client = new MongoClient(env.DB_URL);
|
||||
|
||||
await client.connect();
|
||||
|
||||
db = client.db("website");
|
||||
}
|
||||
@@ -1,206 +0,0 @@
|
||||
import axios from "axios";
|
||||
|
||||
const fetchStatus = (domain: string) => {
|
||||
const req = axios("https://" + domain, { timeout: 5000 })
|
||||
.then((res) => res.status)
|
||||
.catch((error) => (error.response ? error.response.status : 500));
|
||||
|
||||
return req;
|
||||
};
|
||||
|
||||
const statusData = [
|
||||
{
|
||||
name: "Privacy front-ends",
|
||||
data: [
|
||||
{
|
||||
name: "Invidious",
|
||||
description: "A frontend for YouTube.",
|
||||
eu: "https://invidious.projectsegfau.lt/",
|
||||
us: "https://inv.us.projectsegfau.lt",
|
||||
bp: "https://inv.bp.projectsegfau.lt",
|
||||
tor: "http://inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
torBp: "http://invbp.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/invidious.svg",
|
||||
statusEu: await fetchStatus("invidious.projectsegfau.lt"),
|
||||
statusUs: await fetchStatus("inv.us.projectsegfau.lt"),
|
||||
statusBp: await fetchStatus("inv.bp.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Librarian",
|
||||
description: "A frontend for LBRY/Odysee.",
|
||||
eu: "https://lbry.projectsegfau.lt/",
|
||||
geo: "https://lbry.g.projectsegfau.lt/",
|
||||
tor: "http://lbry.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/librarian.png",
|
||||
statusEu: await fetchStatus("lbry.projectsegfau.lt"),
|
||||
statusGeo: await fetchStatus("lbry.g.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Libreddit",
|
||||
description: "A frontend for Reddit.",
|
||||
eu: "https://libreddit.projectsegfau.lt/",
|
||||
us: "https://libreddit.us.projectsegfau.lt",
|
||||
geo: "https://libreddit.g.projectsegfau.lt/",
|
||||
tor: "http://libreddit.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/libreddit.png",
|
||||
statusEu: await fetchStatus("libreddit.projectsegfau.lt"),
|
||||
statusUs: await fetchStatus("libreddit.us.projectsegfau.lt"),
|
||||
statusGeo: await fetchStatus("libreddit.g.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Nitter",
|
||||
description: "A frontend for Twitter.",
|
||||
eu: "https://nitter.projectsegfau.lt/",
|
||||
us: "https://nitter.us.projectsegfau.lt",
|
||||
geo: "https://nitter.g.projectsegfau.lt/",
|
||||
tor: "http://nitter.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/nitter.png",
|
||||
statusEu: await fetchStatus("nitter.projectsegfau.lt"),
|
||||
statusUs: await fetchStatus("nitter.us.projectsegfau.lt"),
|
||||
statusGeo: await fetchStatus("nitter.g.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Piped",
|
||||
description: "Another frontend for YouTube.",
|
||||
eu: "https://piped.projectsegfau.lt/",
|
||||
us: "https://piped.us.projectsegfau.lt",
|
||||
icon: "/icons/piped.svg",
|
||||
statusEu: await fetchStatus("piped.projectsegfau.lt"),
|
||||
statusUs: await fetchStatus("piped.us.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Beatbump",
|
||||
description: "A frontend for YouTube Music.",
|
||||
eu: "https://bb.eu.projectsegfau.lt/",
|
||||
us: "https://bb.us.projectsegfau.lt/",
|
||||
geo: "https://bb.g.projectsegfau.lt/",
|
||||
tor: "http://beatbump.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/beatbump.svg",
|
||||
statusEu: await fetchStatus("bb.eu.projectsegfau.lt"),
|
||||
statusUs: await fetchStatus("bb.us.projectsegfau.lt"),
|
||||
statusGeo: await fetchStatus("bb.g.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "BreezeWiki",
|
||||
description: "A frontend for Fandom.",
|
||||
eu: "https://bw.eu.projectsegfau.lt/",
|
||||
us: "https://bw.us.projectsegfau.lt/",
|
||||
geo: "https://bw.g.projectsegfau.lt/",
|
||||
tor: "http://breezewiki.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/breezewiki.svg",
|
||||
statusEu: await fetchStatus("bw.eu.projectsegfau.lt"),
|
||||
statusUs: await fetchStatus("bw.us.projectsegfau.lt"),
|
||||
statusGeo: await fetchStatus("bw.g.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Scribe",
|
||||
description: "A frontend for Medium.",
|
||||
eu: "https://scribe.eu.projectsegfau.lt/",
|
||||
us: "https://scribe.us.projectsegfau.lt/",
|
||||
geo: "https://scribe.g.projectsegfau.lt/",
|
||||
tor: "http://scribe.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
statusEu: await fetchStatus("scribe.eu.projectsegfau.lt"),
|
||||
statusUs: await fetchStatus("scribe.us.projectsegfau.lt"),
|
||||
statusGeo: await fetchStatus("scribe.g.projectsegfau.lt")
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Useful tools and services",
|
||||
data: [
|
||||
{
|
||||
name: "Element",
|
||||
description: "A feature-rich Matrix client.",
|
||||
eu: "https://chat.projectsegfau.lt/",
|
||||
tor: "http://element.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/element.svg",
|
||||
statusEu: await fetchStatus("chat.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Hydrogen",
|
||||
description: "A lightweight Matrix client.",
|
||||
eu: "https://hydrogen.projectsegfau.lt/",
|
||||
tor: "http://hydrogen.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/hydrogen.svg",
|
||||
statusEu: await fetchStatus("hydrogen.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Cinny",
|
||||
description: "An elegant Matrix client.",
|
||||
eu: "https://cinny.projectsegfau.lt/",
|
||||
tor: "http://cinny.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/cinny.svg",
|
||||
statusEu: await fetchStatus("cinny.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "SearXNG",
|
||||
description: "A private meta-search engine.",
|
||||
eu: "https://search.projectsegfau.lt/",
|
||||
us: "https://search.us.projectsegfau.lt",
|
||||
tor: "http://search.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/searxng.svg",
|
||||
statusEu: await fetchStatus("search.projectsegfau.lt"),
|
||||
statusUs: await fetchStatus("search.us.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Gitea",
|
||||
description: "A web interface for Git, alternative to GitHub.",
|
||||
eu: "https://git.projectsegfau.lt/",
|
||||
tor: "http://git.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/gitea.png",
|
||||
statusEu: await fetchStatus("git.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Akkoma",
|
||||
description: "Federated microblogging platform.",
|
||||
eu: "https://social.projectsegfau.lt/",
|
||||
tor: "http://social.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/akkoma.png",
|
||||
statusEu: await fetchStatus("social.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Vikunja",
|
||||
description: "A task management platform.",
|
||||
eu: "https://todo.projectsegfau.lt/",
|
||||
tor: "http://todo.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
|
||||
icon: "/icons/vikunja.png",
|
||||
statusEu: await fetchStatus("todo.projectsegfau.lt")
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Internal services",
|
||||
data: [
|
||||
{
|
||||
name: "Portainer",
|
||||
description: "Portainer instance for our servers.",
|
||||
eu: "https://portainer.projectsegfau.lt/",
|
||||
icon: "/icons/portainer.png",
|
||||
statusEu: await fetchStatus("portainer.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Authentik",
|
||||
description: "Our OAuth provider.",
|
||||
eu: "https://sekuritee.projectsegfau.lt/",
|
||||
icon: "/icons/authentik.png",
|
||||
statusEu: await fetchStatus("sekuritee.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "mailcow",
|
||||
description: "Our mail server and webmail.",
|
||||
eu: "https://mail.projectsegfau.lt/",
|
||||
icon: "/icons/mailcow.svg",
|
||||
statusEu: await fetchStatus("mail.projectsegfau.lt")
|
||||
},
|
||||
{
|
||||
name: "Plausible analytics",
|
||||
description: "Analytics for our website.",
|
||||
eu: "https://analytics.projectsegfau.lt/projectsegfau.lt",
|
||||
icon: "/icons/plausible.png",
|
||||
statusEu: await fetchStatus("analytics.projectsegfau.lt")
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
export default statusData;
|
||||
Reference in New Issue
Block a user