Files
webpage/crates/service/service-webpage/src/pages/index.rs
rm-dr df1b5f5c64
Some checks failed
CI / Check typos (push) Successful in 8s
CI / Check links (push) Failing after 1m0s
CI / Clippy (push) Failing after 1m0s
CI / Build and test (push) Successful in 1m22s
CI / Build container (push) Has been skipped
CI / Deploy on waypoint (push) Has been skipped
404
2025-11-10 21:43:07 -08:00

84 lines
1.7 KiB
Rust

use maud::html;
use page::page::{Page, PageMetadata};
use crate::{
components::{
fa::FAIcon,
mangle::{MangledBetaEmail, MangledGoogleEmail},
md::Markdown,
misc::FarLink,
},
pages::page_wrapper,
};
pub fn index() -> Page {
Page {
meta: PageMetadata {
title: "Betalupi: About".into(),
author: Some("Mark".into()),
description: None,
image: Some("/assets/img/icon.png".to_owned()),
backlinks: Some(false),
},
generate_html: Box::new(move |page, _ctx| {
Box::pin(async {
let inner = html! {
h2 id="about" { "About" }
div {
img
class="img-placeholder"
src="/assets/img/cover-small.jpg?t=maxdim(20,20)"
data-large="/assets/img/cover-small.jpg"
style="image-rendering:pixelated;float:left;margin:10px;display:block;width:25%;"
{}
div style="margin:2ex 1ex 2ex 1ex;display:inline-block;overflow:hidden;width:60%;" {
"Welcome, you've reached Mark's main page. Here you'll find"
" links to various projects I've worked on."
ul {
li { (MangledBetaEmail {}) }
li { (MangledGoogleEmail {}) }
li {
(
FarLink(
"https://github.com/rm-dr",
html!(
(FAIcon::Github)
"rm-dr"
)
)
)
}
li {
(
FarLink(
"https://git.betalupi.com",
html!(
(FAIcon::Git)
"git.betalupi.com"
)
)
)
}
}
}
br style="clear:both;" {}
}
(Markdown(include_str!("index.md")))
};
page_wrapper(&page.meta, inner, true).await
})
}),
..Default::default()
}
}