basic site
This commit is contained in:
parent
e99be95ce6
commit
a4337b3514
8 changed files with 207 additions and 2 deletions
30
lib/html_body.typ
Normal file
30
lib/html_body.typ
Normal 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
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue