0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-10-30 05:05:52 +01:00

Improve webpage

This commit is contained in:
Delta1925 2023-04-16 13:55:06 +02:00
parent 625d9302d0
commit 5919c55808
No known key found for this signature in database
GPG key ID: 1C21ACE44193CB25
6 changed files with 32 additions and 6 deletions

View file

@ -0,0 +1,9 @@
---
export interface Props {
id: string;
}
const { id } = Astro.props;
---
<div class="absolute hidden h-full w-full cursor-wait" id={id}></div>

View file

@ -15,7 +15,10 @@ const { title } = Astro.props;
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<title>{title}</title> <title>{title}</title>
</head> </head>
<body class="h-full font-mono dark:bg-neutral-800 dark:text-neutral-300"> <body
class="h-full font-mono dark:bg-neutral-800 dark:text-neutral-300"
id="body"
>
<slot /> <slot />
</body> </body>
</html> </html>

View file

@ -1,15 +1,19 @@
--- ---
import Layout from "../layouts/Layout.astro"; import Layout from "../layouts/Layout.astro";
import CenterXy from "../components/center-xy.astro"; import CenterXy from "../components/center-xy.astro";
import CursorCatcher from "../components/cursor-catcher.astro";
import "../styles/global.css"; import "../styles/global.css";
--- ---
<Layout title="Delete a key"> <Layout title="Delete a key">
<CursorCatcher id="cursor-catcher" />
<CenterXy> <CenterXy>
<form <form
action="((%u))api/delete" action="((%u))api/delete"
method="get" method="get"
class="flex max-w-full flex-col" class="flex max-w-full flex-col"
onsubmit="document.getElementById('submit-button').classList.add('cursor-wait'); document.getElementById('cursor-catcher').classList.remove('hidden')"
> >
<label for="email" class="mt-3 text-xl font-bold" <label for="email" class="mt-3 text-xl font-bold"
>Request key deletion:</label >Request key deletion:</label
@ -23,7 +27,9 @@ import "../styles/global.css";
class="input mt-3 focus:rounded-lg" class="input mt-3 focus:rounded-lg"
required required
/> />
<button type="submit" class="button mt-4 self-end">Delete</button> <button type="submit" id="submit-button" class="button mt-4 self-end"
>Delete</button
>
</form> </form>
</CenterXy> </CenterXy>
</Layout> </Layout>

View file

@ -1,7 +1,8 @@
--- ---
import Layout from "../layouts/Layout.astro"; import Layout from "../layouts/Layout.astro";
import "../styles/global.css";
import CenterXy from "../components/center-xy.astro"; import CenterXy from "../components/center-xy.astro";
import "../styles/global.css";
--- ---
<Layout title="Manage keys"> <Layout title="Manage keys">

View file

@ -3,7 +3,7 @@ import Layout from "../layouts/Layout.astro";
import CenterXy from "../components/center-xy.astro"; import CenterXy from "../components/center-xy.astro";
--- ---
<Layout title="Success!"> <Layout title="((%s))">
<CenterXy> <CenterXy>
<h1 class="text-4xl font-bold">((%m))</h1> <h1 class="text-4xl font-bold">((%m))</h1>
</CenterXy> </CenterXy>

View file

@ -1,15 +1,19 @@
--- ---
import Layout from "../layouts/Layout.astro"; import Layout from "../layouts/Layout.astro";
import "../styles/global.css";
import CenterXy from "../components/center-xy.astro"; import CenterXy from "../components/center-xy.astro";
import CursorCatcher from "../components/cursor-catcher.astro";
import "../styles/global.css";
--- ---
<Layout title="Submit a key"> <Layout title="Submit a key">
<CursorCatcher id="cursor-catcher" />
<CenterXy> <CenterXy>
<form <form
action="((%u))api/submit" action="((%u))api/submit"
method="post" method="post"
class="flex max-w-full flex-col" class="flex max-w-full flex-col"
onsubmit="document.getElementById('submit-button').classList.add('cursor-wait'); document.getElementById('cursor-catcher').classList.remove('hidden')"
> >
<label for="key" class="text-xl font-bold" <label for="key" class="text-xl font-bold"
>Paste your pgp keyblock here:</label >Paste your pgp keyblock here:</label
@ -21,8 +25,11 @@ import CenterXy from "../components/center-xy.astro";
rows="20" rows="20"
class="input mt-3 resize-none" class="input mt-3 resize-none"
placeholder="-----BEGIN PGP PUBLIC KEY BLOCK-----" placeholder="-----BEGIN PGP PUBLIC KEY BLOCK-----"
spellcheck="false"
required></textarea> required></textarea>
<button type="submit" class="button mt-6 self-end">Submit</button> <button type="submit" id="submit-button" class="button mt-6 self-end"
>Submit</button
>
</form> </form>
</CenterXy> </CenterXy>
</Layout> </Layout>