Add more pages
Some checks are pending
Deploy to Pages / Build (push) Waiting to run
Deploy to Pages / Deploy (push) Blocked by required conditions

This commit is contained in:
Henry Hiles 2025-08-03 00:24:24 -04:00
commit 291aab7ab8
No known key found for this signature in database
6 changed files with 48 additions and 8 deletions

BIN
public/images/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View file

@ -9,11 +9,11 @@ hero:
actions:
- text: Apply to Join
icon: email
link: "mailto:henry@henryhiles.com?subject=Federated%20Nexus%20Account%20Application&body=Hello%2C%0A%0AI%20would%20like%20to%20have%20a%20Federated%20Nexus%20account%20with%20the%20following%20username%3A%0A%0ABy%20sending%20this%20email%2C%20I%20agree%20to%20the%20Contributor%20Covenant%3A%20https%3A%2F%2Ffederated.nexus%2Fcode"
link: /register
- text: Join our Matrix room
variant: minimal
icon: matrix
link: "https://matrix.to/#/#community:federated.nexus"
link: https://matrix.to/#/#community:federated.nexus
---
import { CardGrid, Card } from "@astrojs/starlight/components"

View file

@ -1,6 +1,6 @@
---
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"
import "../styles/login.css"
import "../styles/page.css"
---
<StarlightPage
@ -28,7 +28,7 @@ import "../styles/login.css"
<span id="error"> </span>
<button type="submit"><span>Submit</span></button>
<a href="/">Don't have an account? Apply at our home page.</a>
<a href="/register">Don't have an account? Sign up now!</a>
</form>
</StarlightPage>
@ -36,7 +36,7 @@ import "../styles/login.css"
const params = new URLSearchParams(window.location.search)
for (const name of ["redirect_uri", "state", "nonce"]) {
const input = document.querySelector(
`input[name="${name}"]`,
`input[name="${name}"]`
) as HTMLInputElement
if (input && params.has(name)) input.value = params.get(name)!
}
@ -72,7 +72,7 @@ import "../styles/login.css"
identifier: { type: "m.id.user", user: username },
password,
}),
},
}
)
if (!res.ok) {
@ -82,12 +82,12 @@ import "../styles/login.css"
const data = await res.json()
const id = form.querySelector(
'input[name="user_id"]',
'input[name="user_id"]'
) as HTMLInputElement
id.value = data.user_id
const token = form.querySelector(
'input[name="access_token"]',
'input[name="access_token"]'
) as HTMLInputElement
token.value = data.access_token

26
src/pages/register.astro Normal file
View file

@ -0,0 +1,26 @@
---
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"
import "../styles/page.css"
---
<StarlightPage
frontmatter={{ title: "Register for Federated Nexus", template: "splash" }}
>
<form method="post" action="https://register.federated.nexus">
<label>
Username (alphanumeric only, no spaces)
<input
name="username"
type="text"
required
pattern="^[A-Za-z0-9]+$"
/>
</label>
<label>
Email
<input name="email" type="email" required />
</label>
<button type="submit"><span>Submit</span></button>
</form>
</StarlightPage>

14
src/pages/success.astro Normal file
View file

@ -0,0 +1,14 @@
---
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"
import "../styles/page.css"
---
<StarlightPage
frontmatter={{
title: "Successfully Registered for Federated Nexus",
template: "splash",
}}
>
Once approved, you will receive an email with a username and password.
Approval usually takes less than two business days.
</StarlightPage>