Contact page

main
Pantonshire 4 years ago
parent d1a7e29f58
commit c79d5a479a

@ -0,0 +1,34 @@
use maud::html;
use crate::template;
use super::response::HtmlResponse;
pub async fn handle() -> HtmlResponse {
HtmlResponse::new()
.with_title_static("Contact")
.with_crawler_permissive()
.with_head(html! {
link href="/static/styles/main.css" rel="stylesheet";
})
.with_body(template::main_page(html! {
section .content_section {
h1 { "Contact" }
p {
"If you want to contact me, you can find me at:"
}
ul {
li {
"Twitter: "
a href="https://twitter.com/pantonshire" { "@pantonshire" }
}
li {
"Mastodon: "
a href="https://tech.lgbt/web/@pantonshire#" { "@pantonshire@tech.lgbt" }
}
li {
"Discord: pantonshire#2076"
}
}
}
}))
}

@ -1,3 +1,4 @@
mod contact;
mod index;
mod post;
mod posts_list;

@ -13,6 +13,7 @@ use tracing::info;
use crate::posts_store::ConcurrentPostsStore;
use super::{
contact,
index,
post,
posts_list,
@ -28,6 +29,7 @@ pub fn service(
{
Router::new()
.route("/", get(index::handle))
.route("/contact", get(contact::handle))
.route("/articles", get(posts_list::handle))
.route("/articles/:post_id", get(post::handle))
.nest("/static", static_content::service(static_dir))

Loading…
Cancel
Save