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