mirror of
https://github.com/ProjectSegfault/website.git
synced 2025-05-31 14:12:04 +05:30
better navbar
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<script>
|
||||
import { page } from '$app/stores';
|
||||
import { page } from "$app/stores";
|
||||
</script>
|
||||
|
||||
<h1>
|
||||
{$page.status}
|
||||
<p class="text-base font-normal mt-4">{$page.error?.message}</p>
|
||||
</h1>
|
||||
</h1>
|
||||
|
||||
@@ -13,18 +13,27 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{$page.data.title} | Project Segfault {$page.url.pathname.startsWith("/blog") ? "blog" : ""}</title>
|
||||
<title
|
||||
>{$page.data.title} | Project Segfault {$page.url.pathname.startsWith(
|
||||
"/blog"
|
||||
)
|
||||
? "blog"
|
||||
: ""}</title
|
||||
>
|
||||
{#if $page.data.description}
|
||||
<meta name="description" content={$page.data.description} />
|
||||
<meta
|
||||
name="description"
|
||||
content={$page.data.description}
|
||||
/>
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
<Nav />
|
||||
|
||||
<main class="px-8 mb-8 max-w-90rem m-auto">
|
||||
<PageTransition pathname={data.pathname}>
|
||||
<slot />
|
||||
</PageTransition>
|
||||
</main>
|
||||
<main class="px-8 mb-8 max-w-90rem m-auto">
|
||||
<PageTransition pathname={data.pathname}>
|
||||
<slot />
|
||||
</PageTransition>
|
||||
</main>
|
||||
|
||||
<Footer />
|
||||
|
||||
@@ -3,5 +3,5 @@ import type { LayoutLoad } from "./$types";
|
||||
export const load = (async ({ url: { pathname } }) => {
|
||||
return {
|
||||
pathname
|
||||
}
|
||||
}) satisfies LayoutLoad
|
||||
};
|
||||
}) satisfies LayoutLoad;
|
||||
|
||||
@@ -11,7 +11,7 @@ export const load = (async () => {
|
||||
const meta = {
|
||||
title: "Home",
|
||||
description: "Open source development and hosted services."
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await axios(env.KUMA_URL, { httpsAgent: agent });
|
||||
@@ -24,4 +24,4 @@ export const load = (async () => {
|
||||
} catch (err) {
|
||||
return { error: true, message: "Error: " + err };
|
||||
}
|
||||
}) satisfies PageServerLoad;
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -31,22 +31,40 @@
|
||||
{#if !data.error}
|
||||
{#if data.announcements.incident}
|
||||
<div class="flex flex-col items-center mt-16">
|
||||
<div class="flex flex-col prose break-words rounded p-4 lt-sm:max-w-74 sm:(p-8) {backgroundColor === "#212529" ? "text-text" : "text-black"}" style="background-color: {backgroundColor};">
|
||||
<div
|
||||
class="flex flex-col prose break-words rounded p-4 lt-sm:max-w-74 sm:(p-8) {backgroundColor ===
|
||||
'#212529'
|
||||
? 'text-text'
|
||||
: 'text-black'}"
|
||||
style="background-color: {backgroundColor};"
|
||||
>
|
||||
{#if data.announcements.incident.title}
|
||||
<span class="text-xl font-semibold">{data.announcements.incident.title}</span>
|
||||
<span class="text-xl font-semibold"
|
||||
>{data.announcements.incident.title}</span
|
||||
>
|
||||
{/if}
|
||||
|
||||
{#if data.announcements.incident.content}
|
||||
<p>{@html sanitizeHtml(data.announcements.incident.content.replace(/\n/g, "<br />"))}</p>
|
||||
<p>
|
||||
{@html sanitizeHtml(
|
||||
data.announcements.incident.content.replace(
|
||||
/\n/g,
|
||||
"<br />"
|
||||
)
|
||||
)}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<span>Created - {data.announcements.incident.createdDate}</span>
|
||||
{#if data.announcements.incident.lastUpdatedDate}
|
||||
<span>Updated - {data.announcements.incident.lastUpdatedDate}</span>
|
||||
<span
|
||||
>Updated - {data.announcements.incident
|
||||
.lastUpdatedDate}</span
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{:else}
|
||||
<p>{data.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
</script>
|
||||
|
||||
<h1>{data.title}</h1>
|
||||
<p>Nothing here yet.</p>
|
||||
<p>Nothing here yet.</p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Admin dashboard"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
return {
|
||||
title: "Admin dashboard"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
||||
@@ -4,10 +4,10 @@ import fetchGhost from "./fetchGhost";
|
||||
export const load = (async ({ fetch }) => {
|
||||
const meta = {
|
||||
title: "Blog"
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
posts: fetchGhost("posts"),
|
||||
...meta
|
||||
};
|
||||
}) satisfies PageServerLoad;
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -2,14 +2,35 @@
|
||||
import type { PageData } from "./$types";
|
||||
export let data: PageData;
|
||||
|
||||
import { PostsContainer, PostOuter, Title, Meta, ReadMore } from "$lib/BlogCard";
|
||||
import {
|
||||
PostsContainer,
|
||||
PostOuter,
|
||||
Title,
|
||||
Meta,
|
||||
ReadMore
|
||||
} from "$lib/BlogCard";
|
||||
</script>
|
||||
|
||||
<div class="h1-no-lg flex flex-col sm:(flex-row items-center) gap-4">
|
||||
<span class="text-4xl font-bold">{data.title}</span>
|
||||
<a href="/blog/tags" class="button sm:w-fit"><div class="i-ic:outline-bookmarks" /> Tags</a>
|
||||
<a href="/blog/authors" class="button sm:w-fit"><div class="i-ic:outline-people text-xl" /> Authors</a>
|
||||
<a href="https://blog.projectsegfau.lt/rss" class="button sm:w-fit !bg-[#ee802f]"><div class="i-simple-icons:rss" /> RSS</a>
|
||||
<a
|
||||
href="/blog/tags"
|
||||
class="button sm:w-fit"
|
||||
><div class="i-ic:outline-bookmarks" />
|
||||
Tags</a
|
||||
>
|
||||
<a
|
||||
href="/blog/authors"
|
||||
class="button sm:w-fit"
|
||||
><div class="i-ic:outline-people text-xl" />
|
||||
Authors</a
|
||||
>
|
||||
<a
|
||||
href="https://blog.projectsegfau.lt/rss"
|
||||
class="button sm:w-fit !bg-[#ee802f]"
|
||||
><div class="i-simple-icons:rss" />
|
||||
RSS</a
|
||||
>
|
||||
</div>
|
||||
|
||||
{#if !data.posts.error}
|
||||
@@ -24,4 +45,4 @@
|
||||
</PostsContainer>
|
||||
{:else}
|
||||
<p>{data.posts.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -8,11 +8,11 @@ export const load = (async ({ params, fetch }) => {
|
||||
|
||||
const meta = {
|
||||
title: !allPosts.error ? data.posts[0].title : ""
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
post: !allPosts.error ? data.posts[0] : {},
|
||||
allPosts: allPosts,
|
||||
...meta
|
||||
};
|
||||
}) satisfies PageServerLoad;
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -1,19 +1,39 @@
|
||||
<script lang="ts">
|
||||
import { PostOuter, Title, Meta, PostContent, ReadMore, PostsContainer } from "$lib/BlogCard";
|
||||
import {
|
||||
PostOuter,
|
||||
Title,
|
||||
Meta,
|
||||
PostContent,
|
||||
ReadMore,
|
||||
PostsContainer
|
||||
} from "$lib/BlogCard";
|
||||
|
||||
import type { PageData } from "./$types";
|
||||
export let data: PageData;
|
||||
|
||||
$: index = !data.allPosts.error ? data.allPosts.posts.findIndex((post: { slug: string; }) => post.slug === data.post.slug) : null;
|
||||
$: index = !data.allPosts.error
|
||||
? data.allPosts.posts.findIndex(
|
||||
(post: { slug: string }) => post.slug === data.post.slug
|
||||
)
|
||||
: null;
|
||||
$: next = !data.allPosts.error ? data.allPosts.posts[index - 1] : null;
|
||||
$: previous = !data.allPosts.error ? data.allPosts.posts[index + 1] : null;
|
||||
</script>
|
||||
|
||||
{#if !data.allPosts.error}
|
||||
<PostOuter url={data.post.url} isPost>
|
||||
<PostOuter
|
||||
url={data.post.url}
|
||||
isPost
|
||||
>
|
||||
<div class="text-center mt-4 flex flex-col items-center gap-4">
|
||||
<Title post={data.post} isPost />
|
||||
<Meta post={data.post} isPost />
|
||||
<Title
|
||||
post={data.post}
|
||||
isPost
|
||||
/>
|
||||
<Meta
|
||||
post={data.post}
|
||||
isPost
|
||||
/>
|
||||
</div>
|
||||
<PostContent {data} />
|
||||
</PostOuter>
|
||||
@@ -27,7 +47,7 @@
|
||||
<ReadMore post={previous} />
|
||||
</PostOuter>
|
||||
{/if}
|
||||
|
||||
|
||||
{#if next}
|
||||
<PostOuter>
|
||||
<h1 class="more-posts">Next post</h1>
|
||||
@@ -46,4 +66,4 @@
|
||||
</style>
|
||||
{:else}
|
||||
<p>{data.allPosts.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -6,7 +6,7 @@ export const load = (async ({ fetch }) => {
|
||||
|
||||
const meta = {
|
||||
title: "Blog authors"
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
authors: data,
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
<h1>{data.title}</h1>
|
||||
|
||||
{#if !data.authors.error}
|
||||
<SingleWordLists items={data.authors.authors} name="authors" />
|
||||
<SingleWordLists
|
||||
items={data.authors.authors}
|
||||
name="authors"
|
||||
/>
|
||||
{:else}
|
||||
<p>{data.authors.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -3,24 +3,25 @@ import fetchGhost from "../../fetchGhost";
|
||||
|
||||
export const load = (async ({ params, fetch }) => {
|
||||
const data = await fetchGhost("posts", "&filter=author:" + params.author);
|
||||
|
||||
const authorsLoop = !data.error ? data.posts[0].authors.map((author: { slug: string; name: any; }) => {
|
||||
if (author.slug === params.author) {
|
||||
return author.name;
|
||||
}
|
||||
}) : [];
|
||||
|
||||
const authorsLoop = !data.error
|
||||
? data.posts[0].authors.map((author: { slug: string; name: any }) => {
|
||||
if (author.slug === params.author) {
|
||||
return author.name;
|
||||
}
|
||||
})
|
||||
: [];
|
||||
|
||||
const authorName = authorsLoop.filter((tag: any) => tag !== undefined)[0];
|
||||
|
||||
const meta = {
|
||||
title: "Blog author " + authorName,
|
||||
description: "Blog posts by " + authorName,
|
||||
description: "Blog posts by " + authorName
|
||||
};
|
||||
|
||||
return {
|
||||
posts: data,
|
||||
authorName,
|
||||
...meta,
|
||||
...meta
|
||||
};
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
import type { PageData } from "./$types";
|
||||
export let data: PageData;
|
||||
|
||||
import { PostsContainer, PostOuter, Title, Meta, ReadMore } from "$lib/BlogCard";
|
||||
import {
|
||||
PostsContainer,
|
||||
PostOuter,
|
||||
Title,
|
||||
Meta,
|
||||
ReadMore
|
||||
} from "$lib/BlogCard";
|
||||
</script>
|
||||
|
||||
<h1>Blog author <span class="text-accent">{data.authorName}</span></h1>
|
||||
@@ -19,4 +25,4 @@
|
||||
</PostsContainer>
|
||||
{:else}
|
||||
<p>{data.posts.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -6,9 +6,18 @@ const agent = new Agent({
|
||||
family: 4
|
||||
});
|
||||
|
||||
const fetchGhost = async (action: string, additional?: string ) => {
|
||||
const fetchGhost = async (action: string, additional?: string) => {
|
||||
try {
|
||||
const request = await axios(env.GHOST_URL + "/ghost/api/content/" + action + "/?key=" + env.GHOST_API_KEY + "&include=authors,tags&limit=all&formats=html,plaintext" + (additional ? additional : ""), { httpsAgent: agent });
|
||||
const request = await axios(
|
||||
env.GHOST_URL +
|
||||
"/ghost/api/content/" +
|
||||
action +
|
||||
"/?key=" +
|
||||
env.GHOST_API_KEY +
|
||||
"&include=authors,tags&limit=all&formats=html,plaintext" +
|
||||
(additional ? additional : ""),
|
||||
{ httpsAgent: agent }
|
||||
);
|
||||
|
||||
if (request.status === 200) {
|
||||
return request.data;
|
||||
@@ -18,6 +27,6 @@ const fetchGhost = async (action: string, additional?: string ) => {
|
||||
} catch (err) {
|
||||
return { error: true, message: "Error: " + err };
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default fetchGhost;
|
||||
export default fetchGhost;
|
||||
|
||||
@@ -6,10 +6,10 @@ export const load = (async () => {
|
||||
|
||||
const meta = {
|
||||
title: "Blog tags"
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
tags: data,
|
||||
...meta
|
||||
}
|
||||
}) satisfies PageServerLoad;
|
||||
};
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
<h1>{data.title}</h1>
|
||||
|
||||
{#if !data.tags.error}
|
||||
<SingleWordLists items={data.tags.tags} name="tags" />
|
||||
<SingleWordLists
|
||||
items={data.tags.tags}
|
||||
name="tags"
|
||||
/>
|
||||
{:else}
|
||||
<p>{data.tags.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -4,21 +4,23 @@ import fetchGhost from "../../fetchGhost";
|
||||
export const load = (async ({ params, fetch }) => {
|
||||
const data = await fetchGhost("posts", "&filter=tags:" + params.tag);
|
||||
|
||||
const tagsLoop = !data.error ? data.posts[0].tags.map((tag: { slug: string; name: any; }) => {
|
||||
if (tag.slug === params.tag) {
|
||||
return tag.name;
|
||||
}
|
||||
}) : [];
|
||||
const tagsLoop = !data.error
|
||||
? data.posts[0].tags.map((tag: { slug: string; name: any }) => {
|
||||
if (tag.slug === params.tag) {
|
||||
return tag.name;
|
||||
}
|
||||
})
|
||||
: [];
|
||||
|
||||
const tagName = tagsLoop.filter((tag: any) => tag !== undefined)[0];
|
||||
|
||||
const meta = {
|
||||
title: "Blog tag " + tagName
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
posts: data,
|
||||
tagName: tagName,
|
||||
...meta
|
||||
}
|
||||
}) satisfies PageServerLoad;
|
||||
};
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
import type { PageData } from "./$types";
|
||||
export let data: PageData;
|
||||
|
||||
import { PostsContainer, PostOuter, Title, Meta, ReadMore } from "$lib/BlogCard";
|
||||
import {
|
||||
PostsContainer,
|
||||
PostOuter,
|
||||
Title,
|
||||
Meta,
|
||||
ReadMore
|
||||
} from "$lib/BlogCard";
|
||||
</script>
|
||||
|
||||
<h1>Blog tag <span class="text-accent">{data.tagName}</span></h1>
|
||||
@@ -19,4 +25,4 @@
|
||||
</PostsContainer>
|
||||
{:else}
|
||||
<p>{data.posts.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -4,17 +4,33 @@
|
||||
export let data: PageData;
|
||||
</script>
|
||||
|
||||
|
||||
<h1>{data.title}</h1>
|
||||
|
||||
<h2>Matrix</h2>
|
||||
|
||||
<p>We have a Matrix space for general discussion, support and announcements about Project Segfault over at <a href="https://matrix.to/#/#project-segfault:projectsegfau.lt/">this link</a>.</p>
|
||||
<p>
|
||||
We have a Matrix space for general discussion, support and announcements
|
||||
about Project Segfault over at <a
|
||||
href="https://matrix.to/#/#project-segfault:projectsegfau.lt/"
|
||||
>this link</a
|
||||
>.
|
||||
</p>
|
||||
|
||||
<h2>Email</h2>
|
||||
|
||||
<p>Our primary email address is <a href="mailto:contact@projectsegfau.lt">contact@projectsegfau.lt</a>. You can use this as a way to send feedback or other stuff to us if you don't have or don't want to make a Matrix account. When waiting for us to answer make sure to check your spam, since some email providers block non-popular domains.</p>
|
||||
<p>
|
||||
Our primary email address is <a href="mailto:contact@projectsegfau.lt"
|
||||
>contact@projectsegfau.lt</a
|
||||
>. You can use this as a way to send feedback or other stuff to us if you
|
||||
don't have or don't want to make a Matrix account. When waiting for us to
|
||||
answer make sure to check your spam, since some email providers block
|
||||
non-popular domains.
|
||||
</p>
|
||||
|
||||
<h2>Members</h2>
|
||||
|
||||
<p>You can contact individual members by using the links provided in <a href="/team">the team page</a>.</p>
|
||||
<p>
|
||||
You can contact individual members by using the links provided in <a
|
||||
href="/team">the team page</a
|
||||
>.
|
||||
</p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Contact"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
return {
|
||||
title: "Contact"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
<script lang="ts">
|
||||
import CryptoInfo from "./CryptoInfo.svelte";
|
||||
import type { PageData } from "./$types";
|
||||
@@ -10,26 +9,55 @@
|
||||
|
||||
<h2>What we do with donations</h2>
|
||||
|
||||
<p>These donations primarily help us pay for our VPSes, domain names and other expenses related to crucial infrastructure we have to maintain. We also sometimes donate to developers who maintain software we rely heavily on such as our authentication provider.</p>
|
||||
<p>
|
||||
These donations primarily help us pay for our VPSes, domain names and other
|
||||
expenses related to crucial infrastructure we have to maintain. We also
|
||||
sometimes donate to developers who maintain software we rely heavily on such
|
||||
as our authentication provider.
|
||||
</p>
|
||||
|
||||
<h2>Donation methods</h2>
|
||||
|
||||
<p>You can currently donate by credit card through <a href="https://liberapay.com">Liberapay</a> and cryptocurrencies.</p>
|
||||
<p>
|
||||
You can currently donate by credit card through <a
|
||||
href="https://liberapay.com">Liberapay</a
|
||||
> and cryptocurrencies.
|
||||
</p>
|
||||
|
||||
<h3>Credit card</h3>
|
||||
<a href="https://liberapay.com/ProjectSegfault/donate" class="button !bg-amber !text-black w-fit"><div class="i-simple-icons:liberapay" /> Liberapay</a>
|
||||
<a
|
||||
href="https://liberapay.com/ProjectSegfault/donate"
|
||||
class="button !bg-amber !text-black w-fit"
|
||||
><div class="i-simple-icons:liberapay" />
|
||||
Liberapay</a
|
||||
>
|
||||
|
||||
<h3>Cryptocurrencies</h3>
|
||||
<p>You can use <a href="https://projectsegfau.lt">projectsegfau.lt</a> as a crypto wallet address in supported OpenAlias clients such as <a href="https://mymonero.com">MyMonero</a>, <a href="https://electrum.org">Electrum</a> and <a href="https://electrum-ltc.org">Electrum-LTC</a>.</p>
|
||||
<p>
|
||||
You can use <a href="https://projectsegfau.lt">projectsegfau.lt</a> as a
|
||||
crypto wallet address in supported OpenAlias clients such as
|
||||
<a href="https://mymonero.com">MyMonero</a>,
|
||||
<a href="https://electrum.org">Electrum</a>
|
||||
and <a href="https://electrum-ltc.org">Electrum-LTC</a>.
|
||||
</p>
|
||||
|
||||
<h4>Monero</h4>
|
||||
|
||||
<CryptoInfo address="47L7Qsto7XcifY3CdG18ySe5Tt83kpFLDLve9jQwbc9taPBLNGv6ZrJNUKpMG9Nj9zHgCZ4FQMSyt75e8Jvx12JFLtJyFdA" qr="Monero.png" />
|
||||
<CryptoInfo
|
||||
address="47L7Qsto7XcifY3CdG18ySe5Tt83kpFLDLve9jQwbc9taPBLNGv6ZrJNUKpMG9Nj9zHgCZ4FQMSyt75e8Jvx12JFLtJyFdA"
|
||||
qr="Monero.png"
|
||||
/>
|
||||
|
||||
<h4>Bitcoin</h4>
|
||||
|
||||
<CryptoInfo address="bc1qrc8ywgp95a6p3zausp4nff70qzstp6h8z86sxd" qr="Bitcoin.png" />
|
||||
<CryptoInfo
|
||||
address="bc1qrc8ywgp95a6p3zausp4nff70qzstp6h8z86sxd"
|
||||
qr="Bitcoin.png"
|
||||
/>
|
||||
|
||||
<h4>Litecoin</h4>
|
||||
|
||||
<CryptoInfo address="ltc1qn3ald586h2ntt0n3zkvwsmju2e5vndgtvvgatj" qr="Litecoin.png" />
|
||||
<CryptoInfo
|
||||
address="ltc1qn3ald586h2ntt0n3zkvwsmju2e5vndgtvvgatj"
|
||||
qr="Litecoin.png"
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Donate"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
return {
|
||||
title: "Donate"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
||||
@@ -6,13 +6,19 @@
|
||||
{#if address}
|
||||
<details class="p-0">
|
||||
<summary>Address</summary>
|
||||
<code class="break-words whitespace-normal">49burTxWHyqa9NkkC9PV33D79PrwARMq8aic4XezTx36i66qyLA3afYXicycTTA5st93CV5Rr9AGkKpeE5GPueRN2PkfFQN</code>
|
||||
<code class="break-words whitespace-normal"
|
||||
>49burTxWHyqa9NkkC9PV33D79PrwARMq8aic4XezTx36i66qyLA3afYXicycTTA5st93CV5Rr9AGkKpeE5GPueRN2PkfFQN</code
|
||||
>
|
||||
</details>
|
||||
{/if}
|
||||
|
||||
{#if qr}
|
||||
<details class="p-0">
|
||||
<summary>QR code</summary>
|
||||
<img src="/qr/{qr}" alt="QR code" class="mt-2" />
|
||||
<img
|
||||
src="/qr/{qr}"
|
||||
alt="QR code"
|
||||
class="mt-2"
|
||||
/>
|
||||
</details>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { PageServerLoad } from "./$types";
|
||||
export const load = (() => {
|
||||
const meta = {
|
||||
title: "Instances"
|
||||
}
|
||||
};
|
||||
|
||||
return { instances, ...meta };
|
||||
}) satisfies PageServerLoad;
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
|
||||
<div class="h1-no-lg flex flex-col sm:(flex-row items-center) gap-4 !mb-0">
|
||||
<span class="text-4xl font-bold">{data.title}</span>
|
||||
<a href="/instances/advanced" class="button sm:w-fit"><div class="i-ic:outline-computer" /> Advanced</a>
|
||||
<a
|
||||
href="/instances/advanced"
|
||||
class="button sm:w-fit"
|
||||
><div class="i-ic:outline-computer" />
|
||||
Advanced</a
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
@@ -15,9 +20,16 @@
|
||||
<h2>{category.name}</h2>
|
||||
<div class="flex flex-row flex-wrap gap-4">
|
||||
{#each category.data as instance}
|
||||
<a href={instance.geo || instance.eu} class="flex flex-row items-center gap-4 rounded bg-secondary p-4 w-110 no-underline text-text">
|
||||
<a
|
||||
href={instance.geo || instance.eu}
|
||||
class="flex flex-row items-center gap-4 rounded bg-secondary p-4 w-110 no-underline text-text"
|
||||
>
|
||||
{#if instance.icon}
|
||||
<img src={instance.icon} alt="{instance.name} logo" class="h-20 rounded">
|
||||
<img
|
||||
src={instance.icon}
|
||||
alt="{instance.name} logo"
|
||||
class="h-20 rounded"
|
||||
/>
|
||||
{/if}
|
||||
<div>
|
||||
<span class="text-2xl">{instance.name}</span>
|
||||
@@ -27,5 +39,5 @@
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { PageServerLoad } from "./$types";
|
||||
export const load = (() => {
|
||||
const meta = {
|
||||
title: "Instances"
|
||||
}
|
||||
};
|
||||
|
||||
return { instances, ...meta };
|
||||
}) satisfies PageServerLoad;
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
|
||||
<div class="h1-no-lg flex flex-col sm:(flex-row items-center) gap-4 !mb-0">
|
||||
<span class="text-4xl font-bold">{data.title}</span>
|
||||
<a href="/instances" class="button sm:w-fit"><div class="i-ic:outline-computer" /> Simple</a>
|
||||
<a
|
||||
href="/instances"
|
||||
class="button sm:w-fit"
|
||||
><div class="i-ic:outline-computer" />
|
||||
Simple</a
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
@@ -40,5 +45,5 @@
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
{/each}
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -205,4 +205,4 @@ const instances: Instances[] = [
|
||||
}
|
||||
];
|
||||
|
||||
export default instances;
|
||||
export default instances;
|
||||
|
||||
@@ -12,21 +12,38 @@
|
||||
<ul>
|
||||
<li><a href="/legal/privacy-policy">Privacy policy</a></li>
|
||||
<li><a href="/legal/tos">Terms of service</a></li>
|
||||
<li><a href="https://git.projectsegfau.lt/ProjectSegfault/transparency/">Transparency reports</a></li>
|
||||
<li>
|
||||
<a href="https://git.projectsegfau.lt/ProjectSegfault/transparency/"
|
||||
>Transparency reports</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Legal FAQ</h2>
|
||||
|
||||
<h3>What do I do if a user is disturbing me?</h3>
|
||||
|
||||
<p>If some user of our services is disturbing you, you should immediately contact us. You can do that either by <a href="mailto:contact@projectsegfau.lt">emailing us</a> or sending us a message on <a href="https://matrix.to/#/#support:projectsegfau.lt">the Matrix support channel</a>. If you prefer to keep your report private on Matrix, contact one of our team members. You can find their info on <a href="/team">our team page</a>.</p>
|
||||
<p>
|
||||
If some user of our services is disturbing you, you should immediately
|
||||
contact us. You can do that either by <a
|
||||
href="mailto:contact@projectsegfau.lt">emailing us</a
|
||||
>
|
||||
or sending us a message on
|
||||
<a href="https://matrix.to/#/#support:projectsegfau.lt"
|
||||
>the Matrix support channel</a
|
||||
>. If you prefer to keep your report private on Matrix, contact one of our
|
||||
team members. You can find their info on <a href="/team">our team page</a>.
|
||||
</p>
|
||||
|
||||
<h3>How can I trust you?</h3>
|
||||
|
||||
<p>We have written a privacy policy, which is accessible through this website! You can find it <a href="/legal/privacy-policy">here</a>.</p>
|
||||
<p>
|
||||
We have written a privacy policy, which is accessible through this website!
|
||||
You can find it <a href="/legal/privacy-policy">here</a>.
|
||||
</p>
|
||||
|
||||
<style>
|
||||
li::before {
|
||||
content: "- ";
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Boring legal stuff",
|
||||
description: "These are some documents concerning transparency, privacy and safety."
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
return {
|
||||
title: "Boring legal stuff",
|
||||
description:
|
||||
"These are some documents concerning transparency, privacy and safety."
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
||||
@@ -9,36 +9,103 @@
|
||||
|
||||
<h2>We don't collect more information than we need to.</h2>
|
||||
|
||||
<PMargin>We have disabled request logging. This is because it is extremely identifiable. This means that, for example, what website you visited and what path you visited (like https://libreddit.projectsegfau.lt/r/cats), your IP address, your User-Agent will not be logged by us!</PMargin>
|
||||
<PMargin
|
||||
>We have disabled request logging. This is because it is extremely
|
||||
identifiable. This means that, for example, what website you visited and
|
||||
what path you visited (like https://libreddit.projectsegfau.lt/r/cats), your
|
||||
IP address, your User-Agent will not be logged by us!</PMargin
|
||||
>
|
||||
|
||||
<PMargin>Some of our services have things like databases and things, for example <a href="https://chat.projectsegfau.lt">Matrix</a>, but that should be pretty obvious the moment you make an account on there. They may collect some things, however we barely even access those databases so you should be fine.</PMargin>
|
||||
<PMargin
|
||||
>Some of our services have things like databases and things, for example <a
|
||||
href="https://chat.projectsegfau.lt">Matrix</a
|
||||
>, but that should be pretty obvious the moment you make an account on
|
||||
there. They may collect some things, however we barely even access those
|
||||
databases so you should be fine.</PMargin
|
||||
>
|
||||
|
||||
<PMargin><a href="https://chat.projectsegfau.lt">Matrix</a> logs IPs, there is nothing we can do to prevent that. We will only check IP addresses whenever there is serious abuse coming from someone's Matrix account, so we can ban their IP from using Project Segfault services. This includes, but is not limited to ban evading and harassment of communities and people.</PMargin>
|
||||
<PMargin
|
||||
><a href="https://chat.projectsegfau.lt">Matrix</a> logs IPs, there is nothing
|
||||
we can do to prevent that. We will only check IP addresses whenever there is
|
||||
serious abuse coming from someone's Matrix account, so we can ban their IP from
|
||||
using Project Segfault services. This includes, but is not limited to ban evading
|
||||
and harassment of communities and people.</PMargin
|
||||
>
|
||||
|
||||
<PMargin>If you want the data we've collected on you to be sent, please contact us on Matrix in <a href="https://matrix.to/#/#gdpr:projectsegfau.lt">this room</a>, or e-mail us at <a href="mailto:contact@projectsegfau.lt">contact@projectsegfau.lt</a>. You don't need an account on our Matrix instance in order to chat there, you can choose from a bunch of public instances or make your own.</PMargin>
|
||||
<PMargin
|
||||
>If you want the data we've collected on you to be sent, please contact us
|
||||
on Matrix in <a href="https://matrix.to/#/#gdpr:projectsegfau.lt"
|
||||
>this room</a
|
||||
>, or e-mail us at
|
||||
<a href="mailto:contact@projectsegfau.lt">contact@projectsegfau.lt</a>. You
|
||||
don't need an account on our Matrix instance in order to chat there, you can
|
||||
choose from a bunch of public instances or make your own.</PMargin
|
||||
>
|
||||
|
||||
<h2>For our website and blog</h2>
|
||||
|
||||
<PMargin>We have Plausible analytics installed on our website (the one you are on right now!), and our <a href="https://blog.projectsegfau.lt">blog</a>, which means we can just easily see what part of our site you're on, what country you are from, what platform you are from, potentially a referrer and all those get clumped up together.</PMargin>
|
||||
<PMargin
|
||||
>We have Plausible analytics installed on our website (the one you are on
|
||||
right now!), and our <a href="https://blog.projectsegfau.lt">blog</a>, which
|
||||
means we can just easily see what part of our site you're on, what country
|
||||
you are from, what platform you are from, potentially a referrer and all
|
||||
those get clumped up together.</PMargin
|
||||
>
|
||||
|
||||
<PMargin class="italic">Plausible Analytics is completely anonymous. We can't exactly figure out who you are through Plausible. It is also GDPR compliant.</PMargin>
|
||||
<PMargin class="italic"
|
||||
>Plausible Analytics is completely anonymous. We can't exactly figure out
|
||||
who you are through Plausible. It is also GDPR compliant.</PMargin
|
||||
>
|
||||
|
||||
<PMargin>We use analytics in order to see how many visitors we get every day, what pages get visited the most, what countries visit our website the most etc. uBlock and other privacy extensions block Plausible by default.</PMargin>
|
||||
<PMargin
|
||||
>We use analytics in order to see how many visitors we get every day, what
|
||||
pages get visited the most, what countries visit our website the most etc.
|
||||
uBlock and other privacy extensions block Plausible by default.</PMargin
|
||||
>
|
||||
|
||||
<PMargin>If you would like to see our website's statistics, <a href="https://analytics.projectsegfau.lt/projectsegfau.lt">look no further</a>.</PMargin>
|
||||
<PMargin
|
||||
>If you would like to see our website's statistics, <a
|
||||
href="https://analytics.projectsegfau.lt/projectsegfau.lt"
|
||||
>look no further</a
|
||||
>.</PMargin
|
||||
>
|
||||
|
||||
<h2>We don't give any of the data we collect to anyone outside of Project Segfault.</h2>
|
||||
<h2>
|
||||
We don't give any of the data we collect to anyone outside of Project
|
||||
Segfault.
|
||||
</h2>
|
||||
|
||||
<PMargin>What we just described above won't be sold or given to anyone outside of Project Segfault, except for anonymous analytics like the website. Some data could be given to law enforcement if they have a warrant.</PMargin>
|
||||
<PMargin
|
||||
>What we just described above won't be sold or given to anyone outside of
|
||||
Project Segfault, except for anonymous analytics like the website. Some data
|
||||
could be given to law enforcement if they have a warrant.</PMargin
|
||||
>
|
||||
|
||||
<PMargin>There is no reason for anyone outside of Project Segfault to see your data. In fact, Project Segfault really has no reason to see your data, unless there's something to suspect.</PMargin>
|
||||
<PMargin
|
||||
>There is no reason for anyone outside of Project Segfault to see your data.
|
||||
In fact, Project Segfault really has no reason to see your data, unless
|
||||
there's something to suspect.</PMargin
|
||||
>
|
||||
|
||||
<h2>Data may be cleared at any point upon request, but...</h2>
|
||||
|
||||
<PMargin>There are times when we are unable to delete "your" data because we sometimes we do not have a concept of "you". If you don't create an account on the services you use, we have no way to know what data is tied to "you" as most logs are anonymized.</PMargin>
|
||||
<PMargin
|
||||
>There are times when we are unable to delete "your" data because we
|
||||
sometimes we do not have a concept of "you". If you don't create an account
|
||||
on the services you use, we have no way to know what data is tied to "you"
|
||||
as most logs are anonymized.</PMargin
|
||||
>
|
||||
|
||||
<PMargin>Often times you can clear your own data simply by deleting your account.</PMargin>
|
||||
<PMargin
|
||||
>Often times you can clear your own data simply by deleting your account.</PMargin
|
||||
>
|
||||
|
||||
<PMargin>As we said, you can request any GDPR/Privacy things in <a href="https://matrix.to/#/#gdpr:projectsegfau.lt">this Matrix room</a>. But, if there's any ongoing investigations and a law enforcement agency contacts us, we will comply. But, we will only do it if we can verify it's official and they have a warrant.</PMargin>
|
||||
<PMargin
|
||||
>As we said, you can request any GDPR/Privacy things in <a
|
||||
href="https://matrix.to/#/#gdpr:projectsegfau.lt">this Matrix room</a
|
||||
>. But, if there's any ongoing investigations and a law enforcement agency
|
||||
contacts us, we will comply. But, we will only do it if we can verify it's
|
||||
official and they have a warrant.</PMargin
|
||||
>
|
||||
|
||||
<span class="italic">Last updated 09.08.2022 16:57 UTC+1</span>
|
||||
<span class="italic">Last updated 09.08.2022 16:57 UTC+1</span>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Privacy policy"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
return {
|
||||
title: "Privacy policy"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
||||
@@ -4,17 +4,41 @@
|
||||
|
||||
export let data: PageData;
|
||||
</script>
|
||||
|
||||
<h1>{data.title}</h1>
|
||||
|
||||
<ol class="list-decimal ml-7">
|
||||
<li>Do not use our services to (D)DOS or attempt to disrupt someone else’s online stability.</li>
|
||||
<li>
|
||||
Do not use our services to (D)DOS or attempt to disrupt someone else’s
|
||||
online stability.
|
||||
</li>
|
||||
<li>Do not use our services to dox someone.</li>
|
||||
<li>Do not do anything on our services that would be illegal in France, the USA, Luxembourg, and India.</li>
|
||||
<li>
|
||||
Do not do anything on our services that would be illegal in France, the
|
||||
USA, Luxembourg, and India.
|
||||
</li>
|
||||
<li>Do not harass people using our services.</li>
|
||||
<li>While we do try to keep your data safe, you have to acknowledge that we are not responsible if anything unintentional happens (such as data loss, inability to extract your data due to the server being down or something else.). It is also your responsibility to keep a backup of your data if it matters to you.</li>
|
||||
<li>The services provided by Project Segfault are provided as is. We do not warrant the reliability, accessibility or quality of our services and we are not responsible for ANY DAMAGES WHATSOEVER by using our services.</li>
|
||||
<li>
|
||||
While we do try to keep your data safe, you have to acknowledge that we
|
||||
are not responsible if anything unintentional happens (such as data
|
||||
loss, inability to extract your data due to the server being down or
|
||||
something else.). It is also your responsibility to keep a backup of
|
||||
your data if it matters to you.
|
||||
</li>
|
||||
<li>
|
||||
The services provided by Project Segfault are provided as is. We do not
|
||||
warrant the reliability, accessibility or quality of our services and we
|
||||
are not responsible for ANY DAMAGES WHATSOEVER by using our services.
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<PMargin>If you fail to comply with these terms we will terminate your access to our services and if you've done something illegal, report you to the police.</PMargin>
|
||||
<PMargin
|
||||
>If you fail to comply with these terms we will terminate your access to our
|
||||
services and if you've done something illegal, report you to the police.</PMargin
|
||||
>
|
||||
|
||||
<PMargin class="italic">We will only report people to the police if they are using our services to do something that is morally unacceptable. We will do so without issuing any warnings.</PMargin>
|
||||
<PMargin class="italic"
|
||||
>We will only report people to the police if they are using our services to
|
||||
do something that is morally unacceptable. We will do so without issuing any
|
||||
warnings.</PMargin
|
||||
>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Terms of service"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
return {
|
||||
title: "Terms of service"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
import { env } from "$env/dynamic/private";
|
||||
import type { PageServerLoad } from "./$types"
|
||||
import type { PageServerLoad } from "./$types";
|
||||
|
||||
export const load = (async ({ locals }) => {
|
||||
const meta = {
|
||||
title: "Login"
|
||||
}
|
||||
};
|
||||
|
||||
const hasAuth = !env.AUTH_CLIENT_ID || !env.AUTH_CLIENT_SECRET || !env.AUTH_ISSUER || !env.AUTH_TRUST_HOST || !env.AUTH_SECRET ? false : true;
|
||||
const hasAuth =
|
||||
!env.AUTH_CLIENT_ID ||
|
||||
!env.AUTH_CLIENT_SECRET ||
|
||||
!env.AUTH_ISSUER ||
|
||||
!env.AUTH_TRUST_HOST ||
|
||||
!env.AUTH_SECRET
|
||||
? false
|
||||
: true;
|
||||
|
||||
return {
|
||||
session: hasAuth ? await locals.getSession() : undefined,
|
||||
hasAuth,
|
||||
...meta
|
||||
}
|
||||
}) satisfies PageServerLoad;
|
||||
};
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { signIn, signOut } from '@auth/sveltekit/client';
|
||||
import { page } from '$app/stores';
|
||||
import type { PageData } from './$types';
|
||||
import { signIn, signOut } from "@auth/sveltekit/client";
|
||||
import { page } from "$app/stores";
|
||||
import type { PageData } from "./$types";
|
||||
const buttonStyles = "button w-fit";
|
||||
|
||||
export let data: PageData;
|
||||
@@ -14,20 +14,34 @@
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-row items-center gap-1">
|
||||
<span>Signed in as</span><br />
|
||||
<span class="font-extrabold">{$page?.data?.session?.user?.email}</span>
|
||||
<span class="font-extrabold"
|
||||
>{$page?.data?.session?.user?.email}</span
|
||||
>
|
||||
</div>
|
||||
<a href="/admin">Go to admin dashboard</a>
|
||||
<button on:click={() => signOut()} class={buttonStyles}><div class="i-ic:outline-logout" /> Sign out</button>
|
||||
<button
|
||||
on:click={() => signOut()}
|
||||
class={buttonStyles}
|
||||
><div class="i-ic:outline-logout" />
|
||||
Sign out</button
|
||||
>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex flex-col gap-4">
|
||||
<span>You are not signed in</span>
|
||||
<button on:click={() => signIn("authentik")} class={buttonStyles}><div class="i-ic:outline-login" /> Sign in using Authentik</button>
|
||||
<button
|
||||
on:click={() => signIn("authentik")}
|
||||
class={buttonStyles}
|
||||
><div class="i-ic:outline-login" />
|
||||
Sign in using Authentik</button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
{:else}
|
||||
<div class="flex flex-col gap-4">
|
||||
<span>Authentik is not configured</span>
|
||||
<a href="https://goauthentik.io/docs/installation">Configure Authentik</a>
|
||||
<a href="https://goauthentik.io/docs/installation"
|
||||
>Configure Authentik</a
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { PageServerLoad } from "./$types";
|
||||
export const load = (async ({ fetch }) => {
|
||||
const meta = {
|
||||
title: "Pubnix"
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
const request = await fetch("https://publapi.p.projectsegfau.lt/users");
|
||||
@@ -14,9 +14,13 @@ export const load = (async ({ fetch }) => {
|
||||
...meta
|
||||
};
|
||||
} else {
|
||||
return { error: true, message: "Error: " + request.status, ...meta };
|
||||
return {
|
||||
error: true,
|
||||
message: "Error: " + request.status,
|
||||
...meta
|
||||
};
|
||||
}
|
||||
} catch (err) {
|
||||
return { error: true, message: "Error: " + err, ...meta };
|
||||
}
|
||||
}) satisfies PageServerLoad;
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -4,14 +4,29 @@
|
||||
|
||||
import User, { type UserType } from "./User.svelte";
|
||||
|
||||
const isOnline = (user: UserType) => user.online
|
||||
const isOnline = (user: UserType) => user.online;
|
||||
</script>
|
||||
|
||||
<div class="h1-no-lg flex flex-col sm:(flex-row items-center) gap-4">
|
||||
<span class="text-4xl font-bold">Pubnix</span>
|
||||
<a href="/pubnix/register" class="button sm:w-fit"><div class="i-ic:outline-plus" /> Register</a>
|
||||
<a href="/pubnix/users" class="button sm:w-fit"><div class="i-ic:outline-people" /> Users</a>
|
||||
<a href="/pubnix/faq" class="button sm:w-fit"><div class="i-ic:outline-question-mark" /> FAQ</a>
|
||||
<a
|
||||
href="/pubnix/register"
|
||||
class="button sm:w-fit"
|
||||
><div class="i-ic:outline-plus" />
|
||||
Register</a
|
||||
>
|
||||
<a
|
||||
href="/pubnix/users"
|
||||
class="button sm:w-fit"
|
||||
><div class="i-ic:outline-people" />
|
||||
Users</a
|
||||
>
|
||||
<a
|
||||
href="/pubnix/faq"
|
||||
class="button sm:w-fit"
|
||||
><div class="i-ic:outline-question-mark" />
|
||||
FAQ</a
|
||||
>
|
||||
</div>
|
||||
|
||||
<h2>Online users</h2>
|
||||
@@ -30,4 +45,4 @@
|
||||
{/if}
|
||||
{:else}
|
||||
<p>{data.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<script lang="ts">
|
||||
export let user: UserType;
|
||||
import dayjs from "dayjs";
|
||||
</script>
|
||||
|
||||
<script context="module" lang="ts">
|
||||
<script
|
||||
context="module"
|
||||
lang="ts"
|
||||
>
|
||||
export type UserType = {
|
||||
name: string;
|
||||
fullName?: string;
|
||||
@@ -20,7 +18,14 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-4 rounded bg-secondary p-4 w-110 no-underline text-text">
|
||||
<script lang="ts">
|
||||
export let user: UserType;
|
||||
import dayjs from "dayjs";
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="flex flex-col gap-4 rounded bg-secondary p-4 w-110 no-underline text-text"
|
||||
>
|
||||
<div class="flex flex-col gap-2 flex-1">
|
||||
<div>
|
||||
{#if user.fullName}
|
||||
@@ -38,7 +43,9 @@
|
||||
{#if user.loc}
|
||||
<span class="button w-fit !bg-alt !text-text">{user.loc}</span>
|
||||
{/if}
|
||||
<span class="button w-fit !bg-alt !text-text">Joined: {dayjs.unix(user.created).format("DD/MM/YYYY")}</span>
|
||||
<span class="button w-fit !bg-alt !text-text"
|
||||
>Joined: {dayjs.unix(user.created).format("DD/MM/YYYY")}</span
|
||||
>
|
||||
</div>
|
||||
<div class="children:text-text flex flex-row items-center gap-4 text-lg">
|
||||
{#if user.email}
|
||||
@@ -58,7 +65,10 @@
|
||||
{/if}
|
||||
|
||||
{#if user.capsule}
|
||||
<a href={user.capsule} class="no-underline text-base">Gemini</a>
|
||||
<a
|
||||
href={user.capsule}
|
||||
class="no-underline text-base">Gemini</a
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,4 +7,7 @@
|
||||
<h1>{data.title}</h1>
|
||||
|
||||
<h2>What is a pubnix?</h2>
|
||||
<span>A pubnix is a [[Unix?]] server provided by a person or a group to a group for non-commercial recreational goals.</span>
|
||||
<span
|
||||
>A pubnix is a [[Unix?]] server provided by a person or a group to a group
|
||||
for non-commercial recreational goals.</span
|
||||
>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Pubnix FAQ"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
return {
|
||||
title: "Pubnix FAQ"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
||||
@@ -3,9 +3,9 @@ import Joi from "joi";
|
||||
import { fail } from "@sveltejs/kit";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Pubnix registration"
|
||||
};
|
||||
return {
|
||||
title: "Pubnix registration"
|
||||
};
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
export const actions: Actions = {
|
||||
@@ -13,36 +13,65 @@ export const actions: Actions = {
|
||||
const formData = await request.formData();
|
||||
|
||||
const BodyTypeSchema = Joi.object({
|
||||
username: Joi.string().required().alphanum().message("Username must be alphanumeric"),
|
||||
username: Joi.string()
|
||||
.required()
|
||||
.alphanum()
|
||||
.message("Username must be alphanumeric"),
|
||||
email: Joi.string().email().required(),
|
||||
ssh: Joi.string().required().pattern(/^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521) [A-Za-z0-9+/]+[=]{0,3}( [^@]+@[^@]+)?$/).message("Invalid SSH key"),
|
||||
ssh: Joi.string()
|
||||
.required()
|
||||
.pattern(
|
||||
/^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521) [A-Za-z0-9+/]+[=]{0,3}( [^@]+@[^@]+)?$/
|
||||
)
|
||||
.message("Invalid SSH key"),
|
||||
ip: Joi.string().required().ip()
|
||||
});
|
||||
|
||||
formData.append("ip", getClientAddress());
|
||||
|
||||
if (BodyTypeSchema.validate(Object.fromEntries(formData.entries())).error) {
|
||||
return fail(400, { error: true, message: String(BodyTypeSchema.validate(Object.fromEntries(formData.entries())).error) });
|
||||
if (
|
||||
BodyTypeSchema.validate(Object.fromEntries(formData.entries()))
|
||||
.error
|
||||
) {
|
||||
return fail(400, {
|
||||
error: true,
|
||||
message: String(
|
||||
BodyTypeSchema.validate(
|
||||
Object.fromEntries(formData.entries())
|
||||
).error
|
||||
)
|
||||
});
|
||||
} else {
|
||||
try {
|
||||
const request = await fetch("https://publapi.p.projectsegfau.lt/signup", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
body: new URLSearchParams(formData as any).toString()
|
||||
})
|
||||
const request = await fetch(
|
||||
"https://publapi.p.projectsegfau.lt/signup",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
body: new URLSearchParams(formData as any).toString()
|
||||
}
|
||||
);
|
||||
|
||||
const json = await request.json();
|
||||
|
||||
|
||||
if (request.ok) {
|
||||
return { success: true, message: json.message, username: json.username, email: json.email };
|
||||
return {
|
||||
success: true,
|
||||
message: json.message,
|
||||
username: json.username,
|
||||
email: json.email
|
||||
};
|
||||
} else {
|
||||
return fail(400, { error: true, message: "Error: " + request.status });
|
||||
return fail(400, {
|
||||
error: true,
|
||||
message: "Error: " + request.status
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
return { error: true, message: "Error: " + err };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,10 +9,21 @@
|
||||
method="POST"
|
||||
class="flex flex-col gap-4 w-fit children:(!bg-secondary text-start text-text rounded p-2)"
|
||||
>
|
||||
|
||||
<input type="text" name="username" placeholder="Username" />
|
||||
<input type="email" name="email" placeholder="Email" />
|
||||
<textarea name="ssh" placeholder="SSH public key" class="resize w-60 h-30 sm:(w-100 h-50)" />
|
||||
<input
|
||||
type="text"
|
||||
name="username"
|
||||
placeholder="Username"
|
||||
/>
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
placeholder="Email"
|
||||
/>
|
||||
<textarea
|
||||
name="ssh"
|
||||
placeholder="SSH public key"
|
||||
class="resize w-60 h-30 sm:(w-100 h-50)"
|
||||
/>
|
||||
|
||||
{#if form?.success}
|
||||
{form.message}
|
||||
@@ -21,5 +32,9 @@
|
||||
{#if form?.error}
|
||||
{form.message}
|
||||
{/if}
|
||||
<button type="submit" class="transition-all duration-200 text-text hover:brightness-70">Submit</button>
|
||||
</form>
|
||||
<button
|
||||
type="submit"
|
||||
class="transition-all duration-200 text-text hover:brightness-70"
|
||||
>Submit</button
|
||||
>
|
||||
</form>
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { PageServerLoad } from "./$types";
|
||||
export const load = (async ({ fetch }) => {
|
||||
const meta = {
|
||||
title: "Pubnix users"
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
const request = await fetch("https://publapi.p.projectsegfau.lt/users");
|
||||
@@ -14,9 +14,13 @@ export const load = (async ({ fetch }) => {
|
||||
...meta
|
||||
};
|
||||
} else {
|
||||
return { error: true, message: "Error: " + request.status, ...meta };
|
||||
return {
|
||||
error: true,
|
||||
message: "Error: " + request.status,
|
||||
...meta
|
||||
};
|
||||
}
|
||||
} catch (err) {
|
||||
return { error: true, message: "Error: " + err, ...meta };
|
||||
}
|
||||
}) satisfies PageServerLoad;
|
||||
}) satisfies PageServerLoad;
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
{/if}
|
||||
{:else}
|
||||
<p>{data.message}</p>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
|
||||
<div class="flex flex-row flex-wrap gap-4">
|
||||
{#each Team as member}
|
||||
<div class="flex flex-col gap-4 rounded bg-secondary p-4 w-110 no-underline text-text">
|
||||
<div
|
||||
class="flex flex-col gap-4 rounded bg-secondary p-4 w-110 no-underline text-text"
|
||||
>
|
||||
<div class="flex flex-col gap-2 flex-1">
|
||||
<span class="text-2xl">{member.name} - {member.position}</span>
|
||||
{#if member.description}
|
||||
@@ -18,11 +20,15 @@
|
||||
</div>
|
||||
<div class="children:text-text flex flex-row gap-4 text-lg">
|
||||
{#if member.website}
|
||||
<a href={member.website}><div class="i-ic:outline-language" /></a>
|
||||
<a href={member.website}
|
||||
><div class="i-ic:outline-language" /></a
|
||||
>
|
||||
{/if}
|
||||
|
||||
{#if member.matrix}
|
||||
<a href={member.matrix}><div class="i-simple-icons:matrix" /></a>
|
||||
<a href={member.matrix}
|
||||
><div class="i-simple-icons:matrix" /></a
|
||||
>
|
||||
{/if}
|
||||
|
||||
{#if member.git}
|
||||
@@ -30,13 +36,16 @@
|
||||
{/if}
|
||||
|
||||
{#if member.email}
|
||||
<a href="mailto:{member.email}"><div class="i-ic:outline-email" /></a>
|
||||
<a href="mailto:{member.email}"
|
||||
><div class="i-ic:outline-email" /></a
|
||||
>
|
||||
{/if}
|
||||
|
||||
{#if member.pgp}
|
||||
<a href={member.pgp}><div class="i-ic:outline-vpn-key" /></a>
|
||||
<a href={member.pgp}><div class="i-ic:outline-vpn-key" /></a
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load = (() => {
|
||||
return {
|
||||
title: "Team"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
return {
|
||||
title: "Team"
|
||||
};
|
||||
}) satisfies PageLoad;
|
||||
|
||||
@@ -39,4 +39,4 @@
|
||||
"position": "France server owner",
|
||||
"description": "using windows server for soleil levant was a mistake"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user