Add TypeScript migration, image resizing, media upload UX, and multimedia support
All checks were successful
Deploy to NAS / deploy (push) Successful in 2m20s

- Migrate static JS to TypeScript (static-ts/ → compiled to internal/api/static/)
- Add image resizing on upload: JPEG/PNG/WebP scaled to max 1920px at quality 80
- Extract shared upload logic into upload.go (saveUpload, saveResizedImage, saveResizedWebP)
- Add POST /media endpoint for drag-drop/paste media uploads with markdown ref return
- Add background music player with video/audio coordination (autoplay.ts)
- Add global nav, public feed, hashtags, visibility, Markdown rendering for entries
- Add Dockerfile stage for TypeScript compilation (static-ts-builder)
- Add goldmark, disintegration/imaging, golang.org/x/image dependencies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christoph K.
2026-04-09 23:03:04 +02:00
parent 8eef933573
commit 17186e7b64
24 changed files with 890 additions and 179 deletions

View File

@@ -62,8 +62,23 @@ internal/
ingest.go POST /v1/trackpoints, POST /v1/trackpoints:batch
query.go GET /v1/days, /v1/trackpoints, /v1/stops, /v1/suggestions
webui.go server-side rendered web UI (login, /days, /days/{date})
journal.go journal entry endpoints
journal.go POST /entries, GET/POST /entries/{id}, GET /entries/{id}/edit
media.go POST /media — single-file upload, returns markdown reference
response.go shared response helpers
api/static/
style.css global styles (Pico CSS overrides)
day.js GPS button, time auto-fill
editor.js textarea drag-drop/paste upload → markdown ref insert
autoplay.js IntersectionObserver: videos autoplay when visible
api/templates/
base.html layout + global nav (LoggedIn, IsAdmin injected by render())
days.html day list + date picker
day.html day detail: new entry form, entries, stops, trackpoints
edit_entry.html edit existing entry
public.html public feed (infinite scroll)
login.html login form
register.html self-registration
admin/ admin layout + entries/users pages
```
Key invariants: