add navbar + background + fading text
This commit is contained in:
+3
-5
@@ -1,8 +1,8 @@
|
||||
#[macro_use] extern crate rocket;
|
||||
|
||||
use rocket::form::Form;
|
||||
use rocket::form::FromForm;
|
||||
use rocket_dyn_templates::{Template, context};
|
||||
use rocket::fs::FileServer;
|
||||
|
||||
#[derive(FromForm)]
|
||||
struct LoginData {
|
||||
@@ -16,10 +16,7 @@ fn login(login_data: Form<LoginData>) -> Template {
|
||||
let correct_password = "password";
|
||||
|
||||
let message = if login_data.username == correct_username && login_data.password == correct_password {
|
||||
// On successful login, you can perform actions here like creating directories.
|
||||
println!("Login successful: performing server-side actions.");
|
||||
|
||||
"Login successful! Directories have been created."
|
||||
"Login successful!"
|
||||
} else {
|
||||
"Invalid username or password."
|
||||
};
|
||||
@@ -36,6 +33,7 @@ fn index() -> Template {
|
||||
fn rocket() -> _ {
|
||||
rocket::build()
|
||||
.mount("/", routes![index, login])
|
||||
.mount("/static", FileServer::from("static")) // Serves files in the `static` directory
|
||||
.attach(Template::fairing())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user