feat: add login page
This commit is contained in:
@@ -6,7 +6,7 @@ import ArticleLayout from '../../layouts/ArticleLayout.astro'
|
||||
export async function getStaticPaths() {
|
||||
const blogEntries = await getCollection('guides')
|
||||
return blogEntries.map(entry => ({
|
||||
params: { slug: entry.slug },
|
||||
params: { id: entry.data.id },
|
||||
props: { entry },
|
||||
}))
|
||||
}
|
||||
@@ -15,7 +15,7 @@ const { entry } = Astro.props
|
||||
const { Content } = await entry.render()
|
||||
---
|
||||
|
||||
<ArticleLayout {...entry.data} pageName={['guide', entry.slug]}>
|
||||
<ArticleLayout {...entry.data} pageName={['guide', entry.data.id]}>
|
||||
<div class="text-content">
|
||||
<h1>{entry.data.title}</h1>
|
||||
{entry.data.series && <h2>{entry.data.series}</h2>}
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
import PageLayout from '../layouts/PageLayout.astro'
|
||||
---
|
||||
|
||||
<PageLayout pageName="login">
|
||||
<h1>Login</h1>
|
||||
|
||||
<!-- form with username and password, and a button for oauth login -->
|
||||
<form action="/login" method="post">
|
||||
<h3>Accedi con Poisson</h3>
|
||||
<input type="text" id="username" placeholder="Username" name="username" required />
|
||||
<input type="password" id="password" placeholder="Password" name="password" required />
|
||||
|
||||
<button class="primary" type="submit">Login</button>
|
||||
|
||||
<hr />
|
||||
<h3>Accedi con Ateneo</h3>
|
||||
<a href="/auth/ateneo" class="primary" role="button">Login</a>
|
||||
</form>
|
||||
<!-- <span class="material-symbols-outlined">person</span> -->
|
||||
</PageLayout>
|
||||
@@ -2,7 +2,7 @@
|
||||
import PageLayout from '../layouts/PageLayout.astro'
|
||||
---
|
||||
|
||||
<PageLayout pageName="users">
|
||||
<PageLayout pageName="utenti">
|
||||
<h1>Utenti</h1>
|
||||
|
||||
<div class="search">
|
||||
|
||||
Reference in New Issue
Block a user