outage
This commit is contained in:
parent
012d34ce92
commit
328643144e
5 changed files with 60 additions and 18 deletions
|
@ -2,18 +2,29 @@ import { MainLayout } from "@/layout/MainLayout/MainLayout";
|
|||
import Link from "next/link";
|
||||
import buttons from "@/buttons.json";
|
||||
import Searchbar from "@/components/Searchbar/Searchbar";
|
||||
import { Outage } from "@/components/Outage/Outage";
|
||||
|
||||
export default async function Home() {
|
||||
const data = await fetch("https://pronouns.cc/api/v1/users/mtr").then(x=>x.json());
|
||||
const domainreq = await fetch("https://blog.abtmtr.link/api/collections/paste/posts/domain")
|
||||
.then(x=>x.json());
|
||||
const domains = JSON.parse(domainreq?.data?.body.replace(/[“”]/g, "\"")) ?? [];
|
||||
let domains;
|
||||
try {
|
||||
const domainreq = await fetch("https://blog.abtmtr.link/api/collections/paste/posts/domain")
|
||||
.then(x=>x.json());
|
||||
domains = JSON.parse(domainreq?.data?.body.replace(/[“”]/g, "\"")) ?? [];
|
||||
} catch(err) {
|
||||
domains = [];
|
||||
}
|
||||
|
||||
const goodNames = data.names.filter((x:{status:string})=>x.status == "okay");
|
||||
return (
|
||||
<MainLayout currentPage="/" title="Root">
|
||||
<img className="headerImage" src="/welcome.png" alt="WELCOME! Enjoy your stay at abtmtr.link!"></img>
|
||||
<Searchbar />
|
||||
<Outage title="abtmtr.link outage">
|
||||
<p>the server was being stinky and died on me</p>
|
||||
<p>feel free to support me during these trying times</p>
|
||||
<p><a href="https://liberapay.com/abtmtr.link/">https://liberapay.com/abtmtr.link/</a></p>
|
||||
</Outage>
|
||||
<p>abtmtr.link is a domain for a suite of services, ranging from micro-blogging to web search.</p>
|
||||
<p>I'm {goodNames[0].value}, otherwise known as {goodNames.slice(1).map((name:{value:string}, idx:number) => (
|
||||
idx == goodNames.length - 2 ? (<>or <b>{name.value}</b></>) : (<><b>{name.value}</b>{goodNames.length <= 2 ? ", " : " "}</>)
|
||||
|
|
8
src/components/Outage/Outage.tsx
Normal file
8
src/components/Outage/Outage.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import styles from "./styles.module.css";
|
||||
|
||||
export function Outage({title, children}:{title: string, children: React.ReactNode}) {
|
||||
return <div className={styles.Outage}>
|
||||
<h1>{title}</h1>
|
||||
{children}
|
||||
</div>
|
||||
}
|
15
src/components/Outage/styles.module.css
Normal file
15
src/components/Outage/styles.module.css
Normal file
|
@ -0,0 +1,15 @@
|
|||
.Outage {
|
||||
background-color: #c00000;
|
||||
color: white;
|
||||
padding: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.Outage a {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
.Outage h1,
|
||||
.Outage p {
|
||||
margin: 8px 0;
|
||||
}
|
|
@ -38,18 +38,18 @@ export function SidebarMain({currentPage}:{currentPage:string}) {
|
|||
<span className={styles.Main_List_Button_Badge}>NEW</span>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
{/* <Link
|
||||
href="/search/"
|
||||
className={currentPage.includes("/search/") ? styles.Main_List_CurrentLink : ""}
|
||||
tabIndex={-1}
|
||||
// onClick={() => currentPage === "/" ? impossiblePlay() : openPlay()}
|
||||
// onMouseEnter={hoverPlay}
|
||||
>
|
||||
> */}
|
||||
<div className={`fw ${styles.Main_List_Button}`}>
|
||||
<span className="icon">search</span>
|
||||
<span>Search</span>
|
||||
</div>
|
||||
</Link>
|
||||
{/* </Link> */}
|
||||
<Link
|
||||
href="/projects/"
|
||||
className={currentPage.includes("/projects/") ? styles.Main_List_CurrentLink : ""}
|
||||
|
@ -62,54 +62,54 @@ export function SidebarMain({currentPage}:{currentPage:string}) {
|
|||
<span>Projects</span>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
{/* <Link
|
||||
href="/characters/"
|
||||
className={currentPage.includes("/characters/") ? styles.Main_List_CurrentLink : ""}
|
||||
tabIndex={-1}
|
||||
// onClick={() => currentPage.includes("/characters/") ? impossiblePlay() : openPlay()}
|
||||
// onMouseEnter={hoverPlay}
|
||||
>
|
||||
> */}
|
||||
<div className={`fw ${styles.Main_List_Button}`}>
|
||||
<span className="icon">group</span>
|
||||
<span>Characters</span>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
{/* </Link> */}
|
||||
{/* <Link
|
||||
href="/blog/"
|
||||
className={currentPage.includes("/blog/") ? styles.Main_List_CurrentLink : ""}
|
||||
tabIndex={-1}
|
||||
// onClick={() => currentPage.includes("/blog/") ? impossiblePlay() : openPlay()}
|
||||
// onMouseEnter={hoverPlay}
|
||||
>
|
||||
> */}
|
||||
<div className={`fw ${styles.Main_List_Button}`}>
|
||||
<span className="icon">description</span>
|
||||
<span>Blog</span>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
{/* </Link> */}
|
||||
{/* <Link
|
||||
href="/gallery/"
|
||||
className={currentPage.includes("/gallery/") ? styles.Main_List_CurrentLink : ""}
|
||||
tabIndex={-1}
|
||||
// onClick={() => currentPage.includes("/gallery/") ? impossiblePlay() : openPlay()}
|
||||
// onMouseEnter={hoverPlay}
|
||||
>
|
||||
> */}
|
||||
<div className={`fw ${styles.Main_List_Button}`}>
|
||||
<span className="icon">image</span>
|
||||
<span>Gallery</span>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
{/* </Link> */}
|
||||
{/* <Link
|
||||
href="/stories/"
|
||||
className={currentPage.includes("/stories/") ? styles.Main_List_CurrentLink : ""}
|
||||
tabIndex={-1}
|
||||
// onClick={() => currentPage.includes("/stories/") ? impossiblePlay() : openPlay()}
|
||||
// onMouseEnter={hoverPlay}
|
||||
>
|
||||
> */}
|
||||
<div className={`fw ${styles.Main_List_Button}`}>
|
||||
<span className="icon">book</span>
|
||||
<span>Stories</span>
|
||||
</div>
|
||||
</Link>
|
||||
{/* </Link> */}
|
||||
<Link
|
||||
href="/links/"
|
||||
className={currentPage.includes("/links/") ? styles.Main_List_CurrentLink : ""}
|
||||
|
|
|
@ -9,6 +9,7 @@ export interface Database {
|
|||
content: ContentTable;
|
||||
judgements: JudgementTable;
|
||||
tokens: TokenTable;
|
||||
slowchat: SlowchatTable;
|
||||
}
|
||||
|
||||
export interface AppTable {
|
||||
|
@ -66,6 +67,13 @@ export interface JudgementTable {
|
|||
published: number;
|
||||
}
|
||||
|
||||
export interface SlowchatTable {
|
||||
id: string;
|
||||
author_id: string;
|
||||
content: string;
|
||||
published: number;
|
||||
}
|
||||
|
||||
export const db = createKysely<Database>({
|
||||
|
||||
});
|
Loading…
Reference in a new issue