Finished Initial Design of Login Page

modified:   src/app.rs
	modified:   src/lib.rs
	new file:   src/pages.rs
	new file:   src/pages/login.rs
	new file:   src/pages/signup.rs
	new file:   style/login.scss
	modified:   style/main.scss
	new file:   style/signup.scss
	modified:   style/theme.scss
This commit is contained in:
2024-02-09 17:15:00 -05:00
parent 9f1fece816
commit 598f3b2a18
9 changed files with 209 additions and 0 deletions

48
src/pages/login.rs Normal file
View File

@ -0,0 +1,48 @@
use leptos::ev;
use leptos::leptos_dom::*;
use leptos::*;
use leptos_router::*;
#[component]
pub fn Login() -> impl IntoView {
let (username, set_username) = create_signal("".to_string());
let (password, set_password) = create_signal("".to_string());
view! {
<div class="page-container">
<div class="login-container">
<div class="header">
<h1>LibreTunes</h1>
</div>
<form class="login-form" action="POST">
<div class="input-box">
<input class="login-info" type="text" required
on:input = move |ev| {
set_username(event_target_value(&ev));
log!("username changed to: {}", username.get());
}
prop:value=username
/>
<span>Username/Email</span>
<i></i>
</div>
<div class="input-box">
<input class="login-password" type="text" required
on:input = move |ev| {
set_password(event_target_value(&ev));
log!("password changed to: {}", password.get());
}
/>
<span>Password</span>
<i></i>
</div>
<p class="forgot-pw">Forgot Password?</p>
<input type="submit" value="Login" />
<p class="go-to-signup">
New here? <span>Create an Account</span>
</p>
</form>
</div>
</div>
}
}

14
src/pages/signup.rs Normal file
View File

@ -0,0 +1,14 @@
use leptos::leptos_dom::*;
use leptos::*;
#[component]
pub fn Signup() -> impl IntoView {
view!{
<div class="page-container">
<div class="signup-container">
<h1>"Signup"</h1>
</div>
</div>
}
}