forked from Vanille-N/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtml.typ
More file actions
28 lines (25 loc) · 724 Bytes
/
html.typ
File metadata and controls
28 lines (25 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// {func:
#let htmlfunc(label) = (..attrs) => {
let keyvals = attrs.named().pairs().filter(p => p.at(1) != none).to-dict()
html.elem(label, attrs: keyvals, ..attrs.pos())
}
// :func}
// {apply:
#let div = htmlfunc("div")
#let a = htmlfunc("a")
#let img = htmlfunc("img")
// :apply}
#let h1 = htmlfunc("h1")
#let h2 = htmlfunc("h2")
#let h3 = htmlfunc("h3")
#let p = htmlfunc("p")
#let span = htmlfunc("span")
#let link = htmlfunc("link")
#let pre = htmlfunc("pre")
#let style = htmlfunc("style")
#let button = htmlfunc("button")
#let code = htmlfunc("code")
#let footer = htmlfunc("footer")
#let script(..any) = {
panic("Do not emit a <script> element without getting it checked by `js.external` or `js.inline`")
}