Contact page
This commit is contained in:
1 parent
d1a7e29f58
commit
c79d5a479a
3 files changed
+37
No files matched your search
@@ -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 index;
|
||||||
mod post;
|
mod post;
|
||||||
mod posts_list;
|
mod posts_list;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use tracing::info;
|
|||||||
|
|
||||||
use crate::posts_store::ConcurrentPostsStore;
|
use crate::posts_store::ConcurrentPostsStore;
|
||||||
use super::{
|
use super::{
|
||||||
|
contact,
|
||||||
index,
|
index,
|
||||||
post,
|
post,
|
||||||
posts_list,
|
posts_list,
|
||||||
@@ -28,6 +29,7 @@ pub fn service(
|
|||||||
{
|
{
|
||||||
Router::new()
|
Router::new()
|
||||||
.route("/", get(index::handle))
|
.route("/", get(index::handle))
|
||||||
|
.route("/contact", get(contact::handle))
|
||||||
.route("/articles", get(posts_list::handle))
|
.route("/articles", get(posts_list::handle))
|
||||||
.route("/articles/:post_id", get(post::handle))
|
.route("/articles/:post_id", get(post::handle))
|
||||||
.nest("/static", static_content::service(static_dir))
|
.nest("/static", static_content::service(static_dir))
|
||||||
|
|||||||
Reference in new issue
Block a user