parent
610c6adf31
commit
66d7c241d6
5 changed files with 18 additions and 60 deletions
|
@ -2,29 +2,18 @@ import { MainLayout } from "@/layout/MainLayout/MainLayout";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import buttons from "@/buttons.json";
|
import buttons from "@/buttons.json";
|
||||||
import Searchbar from "@/components/Searchbar/Searchbar";
|
import Searchbar from "@/components/Searchbar/Searchbar";
|
||||||
import { Outage } from "@/components/Outage/Outage";
|
|
||||||
|
|
||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
const data = await fetch("https://pronouns.cc/api/v1/users/mtr").then(x=>x.json());
|
const data = await fetch("https://pronouns.cc/api/v1/users/mtr").then(x=>x.json());
|
||||||
let domains;
|
const domainreq = await fetch("https://blog.abtmtr.link/api/collections/paste/posts/domain")
|
||||||
try {
|
.then(x=>x.json());
|
||||||
const domainreq = await fetch("https://blog.abtmtr.link/api/collections/paste/posts/domain")
|
const domains = JSON.parse(domainreq?.data?.body.replace(/[“”]/g, "\"")) ?? [];
|
||||||
.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");
|
const goodNames = data.names.filter((x:{status:string})=>x.status == "okay");
|
||||||
return (
|
return (
|
||||||
<MainLayout currentPage="/" title="Root">
|
<MainLayout currentPage="/" title="Root">
|
||||||
<img className="headerImage" src="/welcome.png" alt="WELCOME! Enjoy your stay at abtmtr.link!"></img>
|
<img className="headerImage" src="/welcome.png" alt="WELCOME! Enjoy your stay at abtmtr.link!"></img>
|
||||||
<Searchbar />
|
<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>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) => (
|
<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 ? ", " : " "}</>)
|
idx == goodNames.length - 2 ? (<>or <b>{name.value}</b></>) : (<><b>{name.value}</b>{goodNames.length <= 2 ? ", " : " "}</>)
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
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>
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
.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>
|
<span className={styles.Main_List_Button_Badge}>NEW</span>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
{/* <Link
|
<Link
|
||||||
href="/search/"
|
href="/search/"
|
||||||
className={currentPage.includes("/search/") ? styles.Main_List_CurrentLink : ""}
|
className={currentPage.includes("/search/") ? styles.Main_List_CurrentLink : ""}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
// onClick={() => currentPage === "/" ? impossiblePlay() : openPlay()}
|
// onClick={() => currentPage === "/" ? impossiblePlay() : openPlay()}
|
||||||
// onMouseEnter={hoverPlay}
|
// onMouseEnter={hoverPlay}
|
||||||
> */}
|
>
|
||||||
<div className={`fw ${styles.Main_List_Button}`}>
|
<div className={`fw ${styles.Main_List_Button}`}>
|
||||||
<span className="icon">search</span>
|
<span className="icon">search</span>
|
||||||
<span>Search</span>
|
<span>Search</span>
|
||||||
</div>
|
</div>
|
||||||
{/* </Link> */}
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href="/projects/"
|
href="/projects/"
|
||||||
className={currentPage.includes("/projects/") ? styles.Main_List_CurrentLink : ""}
|
className={currentPage.includes("/projects/") ? styles.Main_List_CurrentLink : ""}
|
||||||
|
@ -62,54 +62,54 @@ export function SidebarMain({currentPage}:{currentPage:string}) {
|
||||||
<span>Projects</span>
|
<span>Projects</span>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
{/* <Link
|
<Link
|
||||||
href="/characters/"
|
href="/characters/"
|
||||||
className={currentPage.includes("/characters/") ? styles.Main_List_CurrentLink : ""}
|
className={currentPage.includes("/characters/") ? styles.Main_List_CurrentLink : ""}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
// onClick={() => currentPage.includes("/characters/") ? impossiblePlay() : openPlay()}
|
// onClick={() => currentPage.includes("/characters/") ? impossiblePlay() : openPlay()}
|
||||||
// onMouseEnter={hoverPlay}
|
// onMouseEnter={hoverPlay}
|
||||||
> */}
|
>
|
||||||
<div className={`fw ${styles.Main_List_Button}`}>
|
<div className={`fw ${styles.Main_List_Button}`}>
|
||||||
<span className="icon">group</span>
|
<span className="icon">group</span>
|
||||||
<span>Characters</span>
|
<span>Characters</span>
|
||||||
</div>
|
</div>
|
||||||
{/* </Link> */}
|
</Link>
|
||||||
{/* <Link
|
<Link
|
||||||
href="/blog/"
|
href="/blog/"
|
||||||
className={currentPage.includes("/blog/") ? styles.Main_List_CurrentLink : ""}
|
className={currentPage.includes("/blog/") ? styles.Main_List_CurrentLink : ""}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
// onClick={() => currentPage.includes("/blog/") ? impossiblePlay() : openPlay()}
|
// onClick={() => currentPage.includes("/blog/") ? impossiblePlay() : openPlay()}
|
||||||
// onMouseEnter={hoverPlay}
|
// onMouseEnter={hoverPlay}
|
||||||
> */}
|
>
|
||||||
<div className={`fw ${styles.Main_List_Button}`}>
|
<div className={`fw ${styles.Main_List_Button}`}>
|
||||||
<span className="icon">description</span>
|
<span className="icon">description</span>
|
||||||
<span>Blog</span>
|
<span>Blog</span>
|
||||||
</div>
|
</div>
|
||||||
{/* </Link> */}
|
</Link>
|
||||||
{/* <Link
|
<Link
|
||||||
href="/gallery/"
|
href="/gallery/"
|
||||||
className={currentPage.includes("/gallery/") ? styles.Main_List_CurrentLink : ""}
|
className={currentPage.includes("/gallery/") ? styles.Main_List_CurrentLink : ""}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
// onClick={() => currentPage.includes("/gallery/") ? impossiblePlay() : openPlay()}
|
// onClick={() => currentPage.includes("/gallery/") ? impossiblePlay() : openPlay()}
|
||||||
// onMouseEnter={hoverPlay}
|
// onMouseEnter={hoverPlay}
|
||||||
> */}
|
>
|
||||||
<div className={`fw ${styles.Main_List_Button}`}>
|
<div className={`fw ${styles.Main_List_Button}`}>
|
||||||
<span className="icon">image</span>
|
<span className="icon">image</span>
|
||||||
<span>Gallery</span>
|
<span>Gallery</span>
|
||||||
</div>
|
</div>
|
||||||
{/* </Link> */}
|
</Link>
|
||||||
{/* <Link
|
<Link
|
||||||
href="/stories/"
|
href="/stories/"
|
||||||
className={currentPage.includes("/stories/") ? styles.Main_List_CurrentLink : ""}
|
className={currentPage.includes("/stories/") ? styles.Main_List_CurrentLink : ""}
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
// onClick={() => currentPage.includes("/stories/") ? impossiblePlay() : openPlay()}
|
// onClick={() => currentPage.includes("/stories/") ? impossiblePlay() : openPlay()}
|
||||||
// onMouseEnter={hoverPlay}
|
// onMouseEnter={hoverPlay}
|
||||||
> */}
|
>
|
||||||
<div className={`fw ${styles.Main_List_Button}`}>
|
<div className={`fw ${styles.Main_List_Button}`}>
|
||||||
<span className="icon">book</span>
|
<span className="icon">book</span>
|
||||||
<span>Stories</span>
|
<span>Stories</span>
|
||||||
</div>
|
</div>
|
||||||
{/* </Link> */}
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href="/links/"
|
href="/links/"
|
||||||
className={currentPage.includes("/links/") ? styles.Main_List_CurrentLink : ""}
|
className={currentPage.includes("/links/") ? styles.Main_List_CurrentLink : ""}
|
||||||
|
|
|
@ -9,7 +9,6 @@ export interface Database {
|
||||||
content: ContentTable;
|
content: ContentTable;
|
||||||
judgements: JudgementTable;
|
judgements: JudgementTable;
|
||||||
tokens: TokenTable;
|
tokens: TokenTable;
|
||||||
slowchat: SlowchatTable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AppTable {
|
export interface AppTable {
|
||||||
|
@ -67,13 +66,6 @@ export interface JudgementTable {
|
||||||
published: number;
|
published: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SlowchatTable {
|
|
||||||
id: string;
|
|
||||||
author_id: string;
|
|
||||||
content: string;
|
|
||||||
published: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const db = createKysely<Database>({
|
export const db = createKysely<Database>({
|
||||||
|
|
||||||
});
|
});
|
Loading…
Reference in a new issue