implement css logic for nav menu
This commit is contained in:
parent
7e0235fb88
commit
e7a8cf8a8e
6 changed files with 65 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue