Compare commits

..

3 commits

Author SHA1 Message Date
634fc2c7c1
fix(web): breadcrumb on 404, field placeholders 2024-05-13 04:03:29 +02:00
78d6f425e3
fix(web): textarea font size
why is it 10 here but 11 elsewhere yet same size???
2024-05-13 04:03:03 +02:00
eaf780efb3
feat(web): mock register page
doesnt work yet but its a work in progress
2024-05-13 04:02:43 +02:00
5 changed files with 66 additions and 8 deletions

View file

@ -46,7 +46,7 @@
font-size: 11pt;
}
textarea {
font-size: 11pt;
font-size: 10pt;
}
nav {
z-index: 90;
@ -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);

View file

@ -85,6 +85,7 @@ pub fn App() -> impl IntoView {
<Router // TODO maybe set base="/web" ?
trailing_slash=TrailingSlash::Redirect
fallback=move || view! {
<Breadcrumb back=true >404</Breadcrumb>
<div class="center">
<h3>nothing to see here!</h3>
<p><a href="/web"><button type="button">back to root</button></a></p>
@ -118,6 +119,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>

View file

@ -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>

View file

@ -12,7 +12,7 @@ pub fn Navigator() -> impl IntoView {
<table class="align">
<tr>
<td class="w-100">
<input type="text" class="w-100" on:input=move |ev| {
<input type="text" placeholder="search" class="w-100" on:input=move |ev| {
set_query.set(event_target_value(&ev))
} />
</td>
@ -90,12 +90,12 @@ pub fn PostBox(advanced: WriteSignal<bool>) -> impl IntoView {
}
<table class="align w-100">
<tr>
<td><input type="checkbox" on:input=move |ev| advanced.set(event_target_checked(&ev)) title="advanced" /></td>
<td><input type="checkbox" on:input=move |ev| advanced.set(event_target_checked(&ev)) title="toggle advanced controls" /></td>
<td class="w-100"><input class="w-100" type="text" node_ref=summary_ref title="summary" /></td>
</tr>
</table>
<textarea rows="6" class="w-100" node_ref=content_ref title="content" ></textarea>
<textarea rows="6" class="w-100" node_ref=content_ref title="content" placeholder="\n look at nothing\n what do you see?" ></textarea>
<table class="align rev w-100">
<tr>

View file

@ -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");