ft/adds some signup logic
This commit is contained in:
parent
d6d14af227
commit
b9266d5c46
@ -6,5 +6,7 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
web-sys = {version="0.3.69", features = ["HtmlInputElement"]}
|
||||
yew = { git = "https://github.com/yewstack/yew/", features = ["csr"] }
|
||||
yew-router = { git = "https://github.com/yewstack/yew.git" }
|
||||
gloo-console = "0.3.0"
|
||||
|
1
dist/digitaler-frieden-8f4f9cf3520f9f05.js
vendored
Normal file
1
dist/digitaler-frieden-8f4f9cf3520f9f05.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
dist/digitaler-frieden-8f4f9cf3520f9f05_bg.wasm
vendored
Normal file
BIN
dist/digitaler-frieden-8f4f9cf3520f9f05_bg.wasm
vendored
Normal file
Binary file not shown.
1
dist/digitaler-frieden-e66a5c81879325e7.js
vendored
1
dist/digitaler-frieden-e66a5c81879325e7.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/digitaler-frieden-e66a5c81879325e7_bg.wasm
vendored
BIN
dist/digitaler-frieden-e66a5c81879325e7_bg.wasm
vendored
Binary file not shown.
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -1 +1 @@
|
||||
<!doctype html><html lang=en><meta charset=UTF-8><meta content="width=device-width,initial-scale=1" name=viewport><title>Digitaler Frieden</title><link href=/styles-5591055ecd987932.css integrity=sha384-a1WEqxtAH6YUfKJ4yrHqkgiTWmHSE42XmyBtxbyCY/WaCq4Is/iVWx0Q1jgF3cVf rel=stylesheet><link href=/favicon-928ba63f33046eed.ico integrity=sha384-Neq57jnFrTfqAN1JvKAVVVcH1EW3//cZHmK2NRXRlNrxAZR6ErTvXzbOLSyHzkA4 rel=icon><link href=public/manifest.json rel=manifest><link as=fetch crossorigin href=/digitaler-frieden-e66a5c81879325e7_bg.wasm integrity=sha384-hFyV3zx6i2t6V0het6e+aBe5KuEWlg7f38exy2mv1fj5MNRvpg35ad9MplQDc8B5 rel=preload type=application/wasm><link crossorigin href=/digitaler-frieden-e66a5c81879325e7.js integrity=sha384-d5xM1yWyBXzDGnFqGn3j8akfQhcWxKw2usOBPzUizX1x9n5WH755UNP7A3cKWEo5 rel=modulepreload></head><body class="bg-black text-white"><script type=module>import a,*as b from"/digitaler-frieden-e66a5c81879325e7.js";a(`/digitaler-frieden-e66a5c81879325e7_bg.wasm`);window.wasmBindings=b</script></body></html>
|
||||
<!doctype html><html lang=en><meta charset=UTF-8><meta content="width=device-width,initial-scale=1" name=viewport><title>Digitaler Frieden</title><link href=/styles-5591055ecd987932.css integrity=sha384-a1WEqxtAH6YUfKJ4yrHqkgiTWmHSE42XmyBtxbyCY/WaCq4Is/iVWx0Q1jgF3cVf rel=stylesheet><link href=/favicon-928ba63f33046eed.ico integrity=sha384-Neq57jnFrTfqAN1JvKAVVVcH1EW3//cZHmK2NRXRlNrxAZR6ErTvXzbOLSyHzkA4 rel=icon><link href=public/manifest.json rel=manifest><link as=fetch crossorigin href=/digitaler-frieden-8f4f9cf3520f9f05_bg.wasm integrity=sha384-1OZgU1ywJdKBq9Ym7ErftvfqC92hvI2PHY554QybuY03AyOGF+sFFEC3IN3Y8oFv rel=preload type=application/wasm><link crossorigin href=/digitaler-frieden-8f4f9cf3520f9f05.js integrity=sha384-bL0c8ilZLc0IFsVtV9PmRvw73623VetDQvOScDD+vAF8JDW+19K/To6CRZyk4C8n rel=modulepreload></head><body class="bg-black text-white"><script type=module>import a,*as b from"/digitaler-frieden-8f4f9cf3520f9f05.js";a(`/digitaler-frieden-8f4f9cf3520f9f05_bg.wasm`);window.wasmBindings=b</script></body></html>
|
4
dist/public/styles.css
vendored
4
dist/public/styles.css
vendored
@ -642,6 +642,10 @@ video {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.h-10 {
|
||||
height: 2.5rem;
|
||||
}
|
||||
|
@ -642,6 +642,10 @@ video {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.h-10 {
|
||||
height: 2.5rem;
|
||||
}
|
||||
|
@ -1,10 +1,29 @@
|
||||
use crate::router::Route;
|
||||
use web_sys::HtmlInputElement;
|
||||
use yew::{classes, function_component, html, Html};
|
||||
use yew_router::components::Link;
|
||||
|
||||
use crate::router::Route;
|
||||
|
||||
#[function_component]
|
||||
pub fn SignUp() -> Html {
|
||||
let email: yew::NodeRef = yew::NodeRef::default();
|
||||
// let password = yew::functional::use_state(String::new);
|
||||
// let pwd = password.clone();
|
||||
let mail_check = yew::functional::use_state(|| true);
|
||||
let mc = mail_check.clone();
|
||||
let mail = email.clone();
|
||||
let onchange = yew::Callback::from(move |_| {
|
||||
// let pwd = pwd.clone();
|
||||
|
||||
if let Some(m) = mail.cast::<HtmlInputElement>() {
|
||||
gloo_console::log!(format!("E-Mail: {}", m.value()));
|
||||
if !m.value().is_empty() {
|
||||
mc.set(false);
|
||||
} else {
|
||||
mc.set(true);
|
||||
}
|
||||
};
|
||||
// pwd.set(v);
|
||||
});
|
||||
html! {
|
||||
<div class="flex flex-col justify-center items-center h-full space-y-16 px-8 m-0">
|
||||
<section id="navigation" class="mb-12">
|
||||
@ -57,9 +76,20 @@ pub fn SignUp() -> Html {
|
||||
<section id="content" class="w-full fade-in">
|
||||
<div class="min-height mt-64 md:flex md:flex-col md:items-center">
|
||||
<h3 class="text-3xl font-bold mb-6">{ "Jetzt registrieren" }</h3>
|
||||
<p>{ "Gib deine E-Mail Adresse ein." }</p>
|
||||
<div class="group max-w-xl w-full mb-4">
|
||||
<label for="email">{ "Gib deine E-Mail Adresse ein." }</label>
|
||||
<input
|
||||
id="email"
|
||||
ref={email}
|
||||
onchange={onchange}
|
||||
class="duration-700 font-bold text-lg transition group-hover:cursor-pointer bg-transparent border-white hover:border-[#33d9b2] hover:curser-pointer focus-within:bg-[#33d9b2] active:bg-[#33d9b2] border-2 text-center text-primary focus-within:text-black w-full h-16 mt-4 rounded-md"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
<div hidden={*mail_check} class="group max-w-xl w-full mb-4">
|
||||
<label for="password">{ "Gib deinem Konto ein Passwort" }</label>
|
||||
<input
|
||||
id="password"
|
||||
class="duration-700 font-bold text-lg transition group-hover:cursor-pointer bg-transparent border-white hover:border-[#33d9b2] hover:curser-pointer focus-within:bg-[#33d9b2] active:bg-[#33d9b2] border-2 text-center text-primary focus-within:text-black w-full h-16 mt-4 rounded-md"
|
||||
type="text"
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user