forked from alemi/upub
feat(web): mock register page
doesnt work yet but its a work in progress
This commit is contained in:
parent
672ff178c7
commit
eaf780efb3
4 changed files with 61 additions and 4 deletions
|
@ -234,7 +234,8 @@
|
|||
code.cw {
|
||||
display: block;
|
||||
}
|
||||
input[type="submit"].active {
|
||||
input[type=button]:hover,
|
||||
input[type=submit].active {
|
||||
background-color: var(--accent);
|
||||
border-color: var(--accent);
|
||||
color: var(--background);
|
||||
|
|
|
@ -118,6 +118,7 @@ pub fn App() -> impl IntoView {
|
|||
<Route path="/web/objects/:id" view=move || view! { <ObjectPage tl=context_tl /> } />
|
||||
|
||||
<Route path="/web/search" view=SearchPage />
|
||||
<Route path="/web/register" view=RegisterPage />
|
||||
|
||||
<Route path="/" view=move || view! { <Redirect path="/web" /> } />
|
||||
</Routes>
|
||||
|
|
|
@ -80,9 +80,18 @@ pub fn LoginBox(
|
|||
});
|
||||
});
|
||||
} >
|
||||
<input class="w-100" type="text" node_ref=username_ref placeholder="username" />
|
||||
<input class="w-100" type="password" node_ref=password_ref placeholder="password" />
|
||||
<input class="w-100" type="submit" value="login" />
|
||||
<table class="w-100 align">
|
||||
<tr>
|
||||
<td colspan="2"><input class="w-100" type="text" node_ref=username_ref placeholder="username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input class="w-100" type="password" node_ref=password_ref placeholder="password" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="w-50"><input class="w-100" type="submit" value="login" /></td>
|
||||
<td class="w-50"><a href="/web/register"><input class="w-100" type="button" value="register" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -23,6 +23,52 @@ pub fn AboutPage() -> impl IntoView {
|
|||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn RegisterPage() -> impl IntoView {
|
||||
view! {
|
||||
<div>
|
||||
<Breadcrumb>register</Breadcrumb>
|
||||
<form>
|
||||
<table class="align ma-3">
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td><input type="email" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td><input type="password" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><hr /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>display name</td>
|
||||
<td><input type="text" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>summary</td>
|
||||
<td><input type="text" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>avatar url</td>
|
||||
<td><input type="text" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>banner url</td>
|
||||
<td><input type="text" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><hr /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input class="w-100" type="submit" value="register" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn ConfigPage(setter: WriteSignal<Config>) -> impl IntoView {
|
||||
let config = use_context::<Signal<Config>>().expect("missing config context");
|
||||
|
|
Loading…
Reference in a new issue