homepage/src/utils/astro.js
Nathan Leclercq f795cc48b5 Homepage dashboard : horloge animée, todo, notes, RSS, pomodoro, recherche
- Frontend Vue 3 (Composition API) + Vite + Vue Router
- Backend Go (stdlib) : API REST todo/notes + proxy RSS + auth token
- Docker Compose : SPA nginx + backend + Miniflux + Postgres
- Widgets : horloge canvas météo, todo 3 colonnes, notes persistées,
  agrégateur RSS multi-feeds, pomodoro, recherche DuckDuckGo (Ctrl+K)
- Auth : dashboard public, todo/notes protégés par token
- Widgets expandables (mode agrandi centré)
2026-04-09 12:49:55 +02:00

17 lines
458 B
JavaScript

// Astro helpers + city list
// Extracted as-is from clock-lille.html
export const CITIES = [
{ label: 'LIL', lon: 3.067, lat: 50.63 },
{ label: 'TYO', lon: 139.69, lat: 35.68 },
{ label: 'NYC', lon: -74.006, lat: 40.71 },
]
export function solarDeclination(doy) {
return (-23.45 * Math.cos((2 * Math.PI / 365) * (doy + 10)) * Math.PI) / 180
}
export function dayOfYear(d) {
return Math.floor((d - new Date(d.getFullYear(), 0, 0)) / 86400000)
}