Add TypeScript migration, image resizing, media upload UX, and multimedia support
All checks were successful
Deploy to NAS / deploy (push) Successful in 2m20s
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:
@@ -12,14 +12,22 @@
|
||||
{{range .Entries}}
|
||||
<article class="pub-card">
|
||||
{{if .Images}}
|
||||
<a href="/uploads/{{(index .Images 0).Filename}}" target="_blank">
|
||||
<img class="pub-cover" src="/uploads/{{(index .Images 0).Filename}}" alt="">
|
||||
{{with (index .Images 0)}}
|
||||
{{if isVideo .MimeType}}
|
||||
<video src="/uploads/{{.Filename}}" controls class="media-embed"></video>
|
||||
{{else if isAudio .MimeType}}
|
||||
<audio src="/uploads/{{.Filename}}" controls class="media-audio"></audio>
|
||||
{{else}}
|
||||
<a href="/uploads/{{.Filename}}" target="_blank">
|
||||
<img class="pub-cover" src="/uploads/{{.Filename}}" alt="">
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div class="pub-body">
|
||||
<small class="pub-meta">{{.EntryDate}} · {{.EntryTime}}</small>
|
||||
{{if .Title}}<strong class="pub-title">{{.Title}}</strong>{{end}}
|
||||
{{if .Description}}<p class="pub-desc">{{.Description}}</p>{{end}}
|
||||
{{if .Description}}<div class="pub-desc">{{markdown .Description}}</div>{{end}}
|
||||
{{if .Hashtags}}<div class="pub-tags">{{range .Hashtags}}<span class="tag">#{{.}}</span> {{end}}</div>{{end}}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user