add footer
This commit is contained in:
parent
9cefd6525a
commit
3e18a85d26
3 changed files with 39 additions and 6 deletions
|
|
@ -7,6 +7,8 @@
|
|||
#let html_body(
|
||||
/// The visible header of the page
|
||||
header: none,
|
||||
/// The footer of the page
|
||||
footer: none,
|
||||
/// Logo of the site
|
||||
logo: none,
|
||||
/// Navigation menu content, css style expect a list
|
||||
|
|
@ -15,7 +17,14 @@
|
|||
) = {
|
||||
theme-colors-css
|
||||
```raw-css
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
site-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
|
|
@ -33,6 +42,8 @@
|
|||
}
|
||||
|
||||
site-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 1050px;
|
||||
padding: 0 20px;
|
||||
|
||||
|
|
@ -45,6 +56,16 @@
|
|||
border-bottom: solid 1px var(--color-border);
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: solid 1px var(--color-border);
|
||||
padding: 15px 5px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
code-block {
|
||||
|
|
@ -80,7 +101,12 @@
|
|||
logo
|
||||
})
|
||||
}
|
||||
body
|
||||
|
||||
html.main(body)
|
||||
|
||||
if footer != none {
|
||||
html.footer(footer)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
11
lib/main.typ
11
lib/main.typ
|
|
@ -7,12 +7,8 @@
|
|||
#let webpage(
|
||||
/// Page url
|
||||
url,
|
||||
/// Logo in page header
|
||||
logo: none,
|
||||
/// Title of the page, default to document.title
|
||||
title: none,
|
||||
/// Page header
|
||||
header: none,
|
||||
/// Use only for html 'lang' attribute.
|
||||
lang: "en",
|
||||
//-- <head> only args --
|
||||
|
|
@ -34,6 +30,12 @@
|
|||
/// Navigation menu content, css style expect a list of links, but it can
|
||||
/// be anything
|
||||
menu: none,
|
||||
/// Logo in page header
|
||||
logo: none,
|
||||
/// Page header
|
||||
header: none,
|
||||
/// Page footer
|
||||
footer: none,
|
||||
/// Body of the page
|
||||
body
|
||||
) = {
|
||||
|
|
@ -53,6 +55,7 @@
|
|||
html_body(
|
||||
logo: logo,
|
||||
header: header,
|
||||
footer: footer,
|
||||
menu: menu,
|
||||
body
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@
|
|||
= Test TeTyTe
|
||||
Hello World!
|
||||
],
|
||||
footer: [
|
||||
#sym.copyright 2026 Histausse
|
||||
Please don't train AI on my stuff without explicit permission
|
||||
],
|
||||
menu: [
|
||||
- #link("example.com")[Hello Void!]
|
||||
- #link("example.com")[Demons]
|
||||
|
|
@ -34,7 +38,7 @@
|
|||
)
|
||||
|
||||
|
||||
#lorem(200)
|
||||
#lorem(400)
|
||||
|
||||
Test, `this is not a code block`, end test.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue