curry the example webpage() function in a common lib.typ
This commit is contained in:
parent
7fe9b99535
commit
500a6ad181
5 changed files with 46 additions and 81 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#import "@local/template-web:0.0.1": *
|
||||
#import "/lib.typ": webpage
|
||||
|
||||
#let summ = summary(
|
||||
base-url: "http://test.example.com",
|
||||
|
|
@ -17,40 +18,10 @@
|
|||
|
||||
#show: webpage.with(
|
||||
..summ.template-args,
|
||||
logo: image(
|
||||
"/assets/platypus.png",
|
||||
alt: "A drawing of a blue-ish round-ish platypus with big eyes, holding a laptop. This platypus is quite cute, but I might be biased.",
|
||||
height: 100pt,
|
||||
width: 100pt, // TODO 0.15 regression? in 0.14 setting the height was enough
|
||||
),
|
||||
header: [
|
||||
= Summary Cards
|
||||
Showcase summary cards
|
||||
],
|
||||
footer: context [
|
||||
|
||||
#sym.copyright #document.date.display("[year]") Histausse \
|
||||
Please don't train AI on my stuff without explicit permission
|
||||
],
|
||||
menu: [
|
||||
- #link(<index-page>)[Home]
|
||||
- #link(<pyscript-page>)[Demo Pyscript]
|
||||
- #link(<cards-page>)[Demo the card system]
|
||||
],
|
||||
site-name: "TTT",
|
||||
icon: "/img/platypus.png", // TODO: use <ico> somehow? probably not supported in 0.15
|
||||
|
||||
// Pyscript:
|
||||
pyscript-data-list: (
|
||||
"remote-2026.3.1": pyscript-data(
|
||||
"https://pyscript.net/releases/2026.3.1/core.js",
|
||||
additionnal-head-tags: {
|
||||
html.elem("script", attrs: (src: "/mini-coi.js")) // TODO: use <mini-coi> somehow? probably not supported in 0.15
|
||||
html.elem("link", attrs: (rel: "stylesheet", href: "https://pyscript.net/releases/2026.3.1/core.css"))
|
||||
},
|
||||
)
|
||||
),
|
||||
pyscript-version: "remote-2026.3.1",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue