mirror of
https://github.com/ProjectSegfault/website.git
synced 2025-05-31 14:12:04 +05:30
add custom instance page
This commit is contained in:
67
src/lib/Card/CardInner.svelte
Normal file
67
src/lib/Card/CardInner.svelte
Normal file
@@ -0,0 +1,67 @@
|
||||
<script lang="ts">
|
||||
export let title: any;
|
||||
export let position: any;
|
||||
export let description: any;
|
||||
export let icon: any;
|
||||
export let internal: boolean;
|
||||
|
||||
import IconCircleInfo from "~icons/fa6-solid/circle-info";
|
||||
</script>
|
||||
|
||||
<div class="card-inner">
|
||||
<div class="main">
|
||||
{#if icon}
|
||||
<div>
|
||||
<img src={icon} alt="{title} icon">
|
||||
</div>
|
||||
{/if}
|
||||
<div>
|
||||
<span>
|
||||
{title}
|
||||
|
||||
{#if position}
|
||||
- {position}
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
{#if description}
|
||||
<p class="description">{description}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.card-inner {
|
||||
background-color: var(--secondary);
|
||||
border-radius: 10px;
|
||||
padding: 1rem;
|
||||
width: 30em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 555px) {
|
||||
.card-inner {
|
||||
width: 18em;
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 5rem;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
12
src/lib/Card/CardOuter.svelte
Normal file
12
src/lib/Card/CardOuter.svelte
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="card-outer">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
</style>
|
||||
61
src/lib/Card/Link.svelte
Normal file
61
src/lib/Card/Link.svelte
Normal file
@@ -0,0 +1,61 @@
|
||||
<script lang="ts">
|
||||
export let url: any;
|
||||
export let classes: string;
|
||||
</script>
|
||||
|
||||
<a href={url} class="{classes}">
|
||||
<slot />
|
||||
</a>
|
||||
|
||||
<style>
|
||||
.web,
|
||||
.email,
|
||||
.picture,
|
||||
.pgp {
|
||||
background-color: var(--tertiary);
|
||||
color: #fff !important;
|
||||
font-size: 20px;
|
||||
height: 23px;
|
||||
transition: all 0.25s;
|
||||
}
|
||||
|
||||
.web:hover,
|
||||
.email:hover,
|
||||
.picture:hover,
|
||||
.pgp:hover {
|
||||
background-color: var(--accent);
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.matrixcolored {
|
||||
background-color: #333;
|
||||
color: #fff !important;
|
||||
font-size: 20px;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.discordcolored {
|
||||
background-color: #5865f2;
|
||||
color: #fff !important;
|
||||
font-size: 20px;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.githubcolored {
|
||||
background-color: #333;
|
||||
color: #fff !important;
|
||||
font-size: 20px;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
a {
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
padding: 0.5rem;
|
||||
cursor: pointer;
|
||||
font-family: var(--font-primary);
|
||||
color: var(--secondary);
|
||||
text-decoration: none;
|
||||
width: fit-content;
|
||||
}
|
||||
</style>
|
||||
11
src/lib/Card/LinksOuter.svelte
Normal file
11
src/lib/Card/LinksOuter.svelte
Normal file
@@ -0,0 +1,11 @@
|
||||
<div>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
4
src/lib/Card/index.ts
Normal file
4
src/lib/Card/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
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";
|
||||
112
src/lib/Instances.json
Normal file
112
src/lib/Instances.json
Normal file
@@ -0,0 +1,112 @@
|
||||
[
|
||||
{
|
||||
"name": "Invidious",
|
||||
"description": "A frontend for YouTube.",
|
||||
"website": "https://invidious.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/invidious-colored-vector.svg",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Libreddit",
|
||||
"description": "A frontend for Reddit.",
|
||||
"website": "https://libreddit.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/libreddit.png",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Librarian (LBRY)",
|
||||
"description": "A frontend for Odysee.",
|
||||
"website": "https://lbry.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/lbry.jpg",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Nitter",
|
||||
"description": "A frontend for Twitter.",
|
||||
"website": "https://nitter.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/nitter.png",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Quetre",
|
||||
"description": "A frontend for Quora.",
|
||||
"website": "https://quetre.projectsegfau.lt/",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Element",
|
||||
"description": "An alternative for Discord.",
|
||||
"website": "https://chat.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/matrix.png",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Piped",
|
||||
"description": "Another alternative for YouTube.",
|
||||
"website": "https://piped.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/piped.svg",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "SearXNG",
|
||||
"description": "A private meta-search engine.",
|
||||
"website": "https://search.projectsegfau.lt/search",
|
||||
"icon": "https://docs.searxng.org/_static/searxng-wordmark.svg",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Lingva Translate",
|
||||
"description": "A frontend for Google Translate.",
|
||||
"website": "https://translate.projectsegfau.lt",
|
||||
"icon": "https://github.com/thedaviddelta/lingva-translate/raw/main/public/logo.svg",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Bibliogram",
|
||||
"description": "A frontend for Instagram.",
|
||||
"website": "https://bib.projectsegfau.lt",
|
||||
"category": "Instances"
|
||||
},
|
||||
{
|
||||
"name": "Minecraft",
|
||||
"description": "Our invite-only Minecraft SMP.",
|
||||
"website": "https://projectsegfau.lt/minecraft",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/minecraft.png",
|
||||
"category": "Gameservers"
|
||||
},
|
||||
{
|
||||
"name": "Minetest",
|
||||
"description": "Minecraft \"alternative\".",
|
||||
"website": "https://matrix.to/#/#minetest:projectsegfau.lt",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/1024px-Minetest_logo.svg.png",
|
||||
"category": "Gameservers"
|
||||
},
|
||||
{
|
||||
"name": "Portainer (Soleil Levant)",
|
||||
"description": "A frontend for Google Translate.",
|
||||
"website": "https://portainer.soleil-levant.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/docker.svg",
|
||||
"category": "Internal"
|
||||
},
|
||||
{
|
||||
"name": "Portainer (Helios)",
|
||||
"description": "A frontend for Instagram.",
|
||||
"website": "https://portainer.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/docker.svg",
|
||||
"category": "Internal"
|
||||
},
|
||||
{
|
||||
"name": "mailcow",
|
||||
"description": "Our invite-only Minecraft SMP.",
|
||||
"website": "https://mail.projectsegfau.lt/",
|
||||
"icon": "https://instances.projectsegfau.lt/assets/icons/custom/cow_mailcow.svg",
|
||||
"category": "Internal"
|
||||
},
|
||||
{
|
||||
"name": "Plausible analytics",
|
||||
"description": "Minecraft \"alternative\".",
|
||||
"website": "https://analytics.projectsegfau.lt/projectsegfau.lt",
|
||||
"icon": "https://avatars.githubusercontent.com/u/54802774?s=200&v=4",
|
||||
"category": "Internal"
|
||||
}
|
||||
]
|
||||
@@ -8,7 +8,7 @@
|
||||
$: currentPage = $page.url.pathname;
|
||||
|
||||
const menus = [
|
||||
{name: "Instances", url: "https://instances.projectsegfau.lt/"},
|
||||
{name: "Instances", url: "/instances"},
|
||||
{name: "Projects", url: "/projects"},
|
||||
{name: "Minecraft", url: "/minecraft"},
|
||||
{name: "Donate", url: "/donate"},
|
||||
|
||||
Reference in New Issue
Block a user