2022-11-10 00:12:34 +05:30
|
|
|
<script lang="ts">
|
2022-08-10 13:55:26 +05:30
|
|
|
import { CardInner, CardOuter, LinksOuter, Link } from "$lib/Card";
|
2022-11-10 00:12:34 +05:30
|
|
|
import dayjs from "dayjs";
|
|
|
|
import type { PageData } from "../$types";
|
|
|
|
|
|
|
|
export let data: PageData;
|
2022-08-07 19:05:50 +05:30
|
|
|
|
2022-11-10 00:12:34 +05:30
|
|
|
let groups = [
|
|
|
|
{name: "General", data: data.status.General},
|
|
|
|
{name: "Internal", data: data.status.Internal}
|
|
|
|
]
|
2022-08-07 19:05:50 +05:30
|
|
|
</script>
|
|
|
|
|
2022-08-24 21:37:30 +05:30
|
|
|
<svelte:head>
|
2022-09-10 21:28:19 +05:30
|
|
|
<title>Our instances | Project Segfault</title>
|
|
|
|
<meta name="description" content="Our collection of instances." />
|
2022-08-24 21:37:30 +05:30
|
|
|
</svelte:head>
|
|
|
|
|
2022-09-10 21:28:19 +05:30
|
|
|
<h1>Our instances</h1>
|
2022-11-10 00:12:34 +05:30
|
|
|
<div class="flex flex-col gap-4">
|
|
|
|
<CardOuter>
|
|
|
|
<div class="wrapper">
|
|
|
|
{#each groups as group}
|
|
|
|
<h2>{group.name}</h2>
|
|
|
|
<div class="items">
|
|
|
|
{#each group.data as item}
|
|
|
|
<CardInner
|
|
|
|
title={item.name}
|
|
|
|
position={item.status === 200 ? "Up" : "Down"}
|
|
|
|
positionStyles={item.status === 200 ? "color: #4ade80;" : "color: #f87171;"}
|
|
|
|
description={item.description}
|
|
|
|
icon={item.icon}
|
|
|
|
>
|
|
|
|
<LinksOuter>
|
|
|
|
<Link url={item.website} class="web">
|
|
|
|
<div class="withText">
|
|
|
|
<div class="i-fa6-solid:globe" />
|
|
|
|
<span>Instance link</span>
|
|
|
|
</div>
|
|
|
|
</Link>
|
|
|
|
<Link url={item.projectWebsite} class="link">
|
|
|
|
<div class="withText">
|
|
|
|
<div class="i-fa6-solid:circle-info" />
|
|
|
|
<span>Project website</span>
|
|
|
|
</div>
|
|
|
|
</Link>
|
|
|
|
</LinksOuter>
|
|
|
|
</CardInner>
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
</CardOuter>
|
|
|
|
|
|
|
|
<span>Last updated: {dayjs
|
|
|
|
.unix(data.updated)
|
|
|
|
.format("DD/MM/YYYY HH:mm:ss")}
|
|
|
|
</span>
|
|
|
|
</div>
|
2022-08-07 19:05:50 +05:30
|
|
|
|
|
|
|
<style>
|
2022-08-27 22:07:37 +05:30
|
|
|
.wrapper {
|
2022-08-08 10:50:03 +05:30
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
2022-08-07 19:05:50 +05:30
|
|
|
|
2022-08-08 10:50:03 +05:30
|
|
|
.items {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
2022-08-27 22:07:37 +05:30
|
|
|
flex-wrap: wrap;
|
2022-08-08 10:50:03 +05:30
|
|
|
gap: 2rem;
|
|
|
|
}
|
2022-08-07 19:05:50 +05:30
|
|
|
|
2022-08-27 22:07:37 +05:30
|
|
|
.withText {
|
2022-08-10 13:55:26 +05:30
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
gap: 4px;
|
|
|
|
font-size: medium;
|
|
|
|
}
|
2022-08-08 10:50:03 +05:30
|
|
|
</style>
|