forked from federated-nexus/website
Add more pages
This commit is contained in:
parent
6b924a1c34
commit
291aab7ab8
6 changed files with 48 additions and 8 deletions
BIN
public/images/icon.png
Normal file
BIN
public/images/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
|
@ -9,11 +9,11 @@ hero:
|
||||||
actions:
|
actions:
|
||||||
- text: Apply to Join
|
- text: Apply to Join
|
||||||
icon: email
|
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
|
- text: Join our Matrix room
|
||||||
variant: minimal
|
variant: minimal
|
||||||
icon: matrix
|
icon: matrix
|
||||||
link: "https://matrix.to/#/#community:federated.nexus"
|
link: https://matrix.to/#/#community:federated.nexus
|
||||||
---
|
---
|
||||||
|
|
||||||
import { CardGrid, Card } from "@astrojs/starlight/components"
|
import { CardGrid, Card } from "@astrojs/starlight/components"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"
|
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"
|
||||||
import "../styles/login.css"
|
import "../styles/page.css"
|
||||||
---
|
---
|
||||||
|
|
||||||
<StarlightPage
|
<StarlightPage
|
||||||
|
@ -28,7 +28,7 @@ import "../styles/login.css"
|
||||||
<span id="error"> </span>
|
<span id="error"> </span>
|
||||||
<button type="submit"><span>Submit</span></button>
|
<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>
|
</form>
|
||||||
</StarlightPage>
|
</StarlightPage>
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ import "../styles/login.css"
|
||||||
const params = new URLSearchParams(window.location.search)
|
const params = new URLSearchParams(window.location.search)
|
||||||
for (const name of ["redirect_uri", "state", "nonce"]) {
|
for (const name of ["redirect_uri", "state", "nonce"]) {
|
||||||
const input = document.querySelector(
|
const input = document.querySelector(
|
||||||
`input[name="${name}"]`,
|
`input[name="${name}"]`
|
||||||
) as HTMLInputElement
|
) as HTMLInputElement
|
||||||
if (input && params.has(name)) input.value = params.get(name)!
|
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 },
|
identifier: { type: "m.id.user", user: username },
|
||||||
password,
|
password,
|
||||||
}),
|
}),
|
||||||
},
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
@ -82,12 +82,12 @@ import "../styles/login.css"
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
|
|
||||||
const id = form.querySelector(
|
const id = form.querySelector(
|
||||||
'input[name="user_id"]',
|
'input[name="user_id"]'
|
||||||
) as HTMLInputElement
|
) as HTMLInputElement
|
||||||
id.value = data.user_id
|
id.value = data.user_id
|
||||||
|
|
||||||
const token = form.querySelector(
|
const token = form.querySelector(
|
||||||
'input[name="access_token"]',
|
'input[name="access_token"]'
|
||||||
) as HTMLInputElement
|
) as HTMLInputElement
|
||||||
token.value = data.access_token
|
token.value = data.access_token
|
||||||
|
|
||||||
|
|
26
src/pages/register.astro
Normal file
26
src/pages/register.astro
Normal 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
14
src/pages/success.astro
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue