add wikipedia fact

This commit is contained in:
grizzly 2025-08-23 16:41:40 -04:00
parent 3fb3c4f63f
commit 26a2cfb91b
3 changed files with 20 additions and 34 deletions

View file

@ -1,43 +1,26 @@
#set page(width: 86mm, height: 65mm)
#let weekdays = ("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")
#set page(width: 65mm, height: 86mm)
#let today = datetime.today()
#let weather = json("weather.json")
#align(center)[
#text(size:2em)[#today.display("[weekday] [month repr:long] [year]")]
#box(
stroke: 0.2em+black
)[
#grid(
columns: (1fr,1fr,1fr,1fr,1fr,1fr,1fr),
inset:0.5em,
rows:1,
align:center,
fill: (x, _) =>
if x>4 { luma(240) }
else { white },
stroke: (x, _) =>
if x== weekdays.position(it => {it == today.display("[weekday repr:short]")}) {0.15em+black}
else { none},
[Lun],[Mar],[Mer],[Jeu],[Ven],[Sam],[Dim]
)
]
#let icon = none
#if weather.current.weather_code == 0{
icon = image("icons/sun.svg", width:3em)
}
#grid(
columns: (1fr,4fr),
align: (center+horizon, left+horizon),
[#icon],[#text(size:3em)[#weather.current.temperature_2m #weather.current_units.temperature_2m]]
)
#align(center)[
#text(size:2em, weight: "bold")[#today.display("[weekday] [month repr:long] [year]")]
#v(1fr)
#grid(
columns: (1fr,2fr),
align: (center+horizon, left+horizon),
[#icon],[#text(size:3em)[#weather.current.temperature_2m #weather.current_units.temperature_2m]]
)
#v(1fr)
#read("event.txt")
#v(1fr)
]