fixed typo and adding about page route in server

This commit is contained in:
shockrahwow 2019-11-27 21:28:04 -08:00
parent 38b7b7e26c
commit 780e8b26bb
2 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,7 @@ fn rocket() -> rocket::Rocket {
rocket::ignite()
.mount("/static", StaticFiles::from("/static"))
.mount("/", routes![
homepage, login_page, server_info,
homepage, login_page, about_page, server_info,
static_css,
])
.attach(Template::fairing())

View File

@ -34,7 +34,7 @@ fn context() -> PageAttrs {
favicon: "https://images.pexels.com/photos/146071/pexels-photo-146071.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260",
brand_url: "freechat.io",
brand_motto: "Freedom respecting chat platform",
brand_quip: "Join an realm",
brand_quip: "Join an instance",
}
}
@ -51,6 +51,12 @@ pub fn login_page() -> Template {
let ctx = context();
Template::render("login", &ctx)
}
#[get("/about")]
pub fn about_page() -> Template {
let ctx = context();
Template::render("about", &ctx)
}
#[get("/servers")]
pub fn server_info() -> Template {
let ctx = context();