make header optionnal
This commit is contained in:
parent
07a0392d8c
commit
9cefd6525a
2 changed files with 9 additions and 11 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/// Make the body of the webpage
|
||||
#let html_body(
|
||||
/// The visible header of the page
|
||||
header: [],
|
||||
header: none,
|
||||
/// Logo of the site
|
||||
logo: none,
|
||||
/// Navigation menu content, css style expect a list
|
||||
|
|
@ -72,16 +72,14 @@
|
|||
if menu != none {
|
||||
nav-menu(menu)
|
||||
}
|
||||
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 {
|
||||
if header != none or logo != none {
|
||||
html.header(style: "display: flex; flex-wrap: wrap-reverse;", {
|
||||
html.hgroup({
|
||||
header
|
||||
})
|
||||
logo
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
body
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
/// Title of the page, default to document.title
|
||||
title: none,
|
||||
/// Page header
|
||||
header: [],
|
||||
header: none,
|
||||
/// Use only for html 'lang' attribute.
|
||||
lang: "en",
|
||||
//-- <head> only args --
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue