#set page(width: 86mm, height: 65mm) #let weekdays = ("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun") #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]] ) ]