basic site

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2026-03-16 00:28:28 +01:00
parent e99be95ce6
commit a4337b3514
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
8 changed files with 207 additions and 2 deletions

30
lib/html_body.typ Normal file
View file

@ -0,0 +1,30 @@
#import "./custom_html.typ" as chtml
/// Make the body of the webpage
#let html_body(
/// The visible header of the page
header: [],
/// Logo of the site, must be an url (TODO)
logo,
/// Logo alt-text
logo_alt,
body
) = {
html.body({
chtml.site-wrapper({
chtml.site-container({
html.header(style: "display: flex; flex-wrap: wrap-reverse;", {
html.hgroup({
header
})
// typst `image` function embed the image in the html, which is not great,
// and logo is also used for icon, so it's necessarily an url
if logo != none {
html.img(src: logo, alt: logo_alt, height: 100) // TODO: height bad
}
})
body
})
})
})
}