implement css logic for nav menu

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2026-03-18 01:21:55 +01:00
parent 7e0235fb88
commit e7a8cf8a8e
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
6 changed files with 65 additions and 6 deletions

View file

@ -1,6 +1,7 @@
#import "./custom_html.typ" as chtml
#import "./theme_picker.typ": theme_picker
#import "./theme_colors.typ": theme_colors_css
#import "./theme_picker.typ": theme-picker
#import "./theme_colors.typ": theme-colors-css
#import "./nav_menu.typ": nav-menu, nav-menu-toggle
/// Make the body of the webpage
#let html_body(
@ -10,9 +11,11 @@
logo,
/// Logo alt-text
logo_alt,
/// Navigation menu content, css style expect a list
menu: none,
body
) = {
theme_colors_css
theme-colors-css
```raw-css
site-wrapper {
display: flex;
@ -61,8 +64,12 @@
chtml.site-wrapper({
chtml.site-container({
html.nav({
theme_picker()
theme-picker()
if menu != none { nav-menu-toggle() }
})
if menu != none {
nav-menu(menu)
}
html.header(style: "display: flex; flex-wrap: wrap-reverse;", {
html.hgroup({
header