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>
60 lines
2.9 KiB
HTML
60 lines
2.9 KiB
HTML
{{define "title"}}Eintrag bearbeiten{{end}}
|
|
|
|
{{define "content"}}
|
|
<main class="container">
|
|
<nav><a href="/days/{{.Entry.EntryDate}}">← {{.Entry.EntryDate}}</a></nav>
|
|
<h1>Eintrag bearbeiten</h1>
|
|
|
|
<form method="post" action="/entries/{{.Entry.EntryID}}" enctype="multipart/form-data">
|
|
<div class="gps-row">
|
|
<input type="time" name="time" required value="{{.Entry.EntryTime}}">
|
|
<select name="visibility">
|
|
<option value="private"{{if eq .Entry.Visibility "private"}} selected{{end}}>Privat</option>
|
|
<option value="public"{{if eq .Entry.Visibility "public"}} selected{{end}}>Öffentlich</option>
|
|
</select>
|
|
</div>
|
|
<input type="text" name="title" placeholder="Überschrift" value="{{.Entry.Title}}">
|
|
<div class="editor-wrap">
|
|
<textarea name="description" rows="6" placeholder="Beschreibung — Markdown unterstützt Medien: per Drag & Drop oder Einfügen (Strg+V)">{{.Entry.Description}}</textarea>
|
|
<div class="editor-bar">
|
|
<button type="button" class="media-picker">📎 Datei anhängen</button>
|
|
<span class="upload-status"></span>
|
|
<input type="file" class="media-file-input" multiple accept="image/*,video/*,audio/*" style="display:none">
|
|
</div>
|
|
</div>
|
|
<div class="gps-row">
|
|
<input type="number" name="lat" id="entry-lat" step="any" placeholder="Breite"{{if .Entry.Lat}} value="{{printf "%.6f" (deref .Entry.Lat)}}"{{end}}>
|
|
<input type="number" name="lon" id="entry-lon" step="any" placeholder="Länge"{{if .Entry.Lon}} value="{{printf "%.6f" (deref .Entry.Lon)}}"{{end}}>
|
|
<button type="button" id="btn-gps">◎ GPS</button>
|
|
</div>
|
|
<small id="gps-status"></small>
|
|
<input type="text" name="hashtags" placeholder="Hashtags (kommagetrennt)" value="{{join .Entry.Hashtags ", "}}">
|
|
{{if .Entry.Images}}
|
|
<div class="media-refs">
|
|
{{range .Entry.Images}}
|
|
<div class="media-ref-row">
|
|
{{if isVideo .MimeType}}
|
|
<code class="media-ref-code"></code>
|
|
{{else if isAudio .MimeType}}
|
|
<code class="media-ref-code">[{{.OriginalName}}](/uploads/{{.Filename}})</code>
|
|
{{else}}
|
|
<img src="/uploads/{{.Filename}}" alt="{{.OriginalName}}" class="thumb">
|
|
<code class="media-ref-code"></code>
|
|
{{end}}
|
|
<button type="button" class="btn-insert" data-ref="{{if isVideo .MimeType}}{{else if isAudio .MimeType}}[{{.OriginalName}}](/uploads/{{.Filename}}){{else}}{{end}}">↩ einfügen</button>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
<button type="submit">Speichern</button>
|
|
</form>
|
|
</main>
|
|
{{end}}
|
|
|
|
{{define "scripts"}}
|
|
<script src="/static/day.js"></script>
|
|
<script src="/static/editor.js"></script>
|
|
{{end}}
|
|
|
|
{{template "base" .}}
|