30 lines
757 B
Typst
30 lines
757 B
Typst
#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
|
|
})
|
|
})
|
|
})
|
|
}
|