This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Podstalk — {{if .Editing}}Edit Episode{{else}}New Episode{{end}}</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/neobrutalismcss@latest" />
|
||||
<style>
|
||||
body { max-width: 960px; margin: 0 auto; padding: 2rem 1rem; }
|
||||
.container { margin-top: 2rem; }
|
||||
.flash { padding: 0.75rem 1rem; margin-bottom: 1rem; border: 2px solid #000; }
|
||||
.flash-error { background: #ffcdd2; }
|
||||
.form-group { margin-bottom: 1rem; }
|
||||
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: bold; }
|
||||
.form-actions { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
|
||||
.current-file { font-size: 0.85rem; color: #666; margin-top: 0.25rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="nb-navbar" role="navigation" aria-label="Main navigation">
|
||||
<a href="/" class="nb-navbar-brand" aria-label="Go to homepage">Podstalk</a>
|
||||
<ul class="nb-navbar-nav" role="menubar">
|
||||
<li class="nb-navbar-item" role="none">
|
||||
<a href="/" class="nb-navbar-link" role="menuitem">Dashboard</a>
|
||||
</li>
|
||||
<li class="nb-navbar-item" role="none">
|
||||
<a href="/signout" class="nb-navbar-link" role="menuitem">Sign Out</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="container">
|
||||
{{if .Error}}<div class="flash flash-error">{{.Error}}</div>{{end}}
|
||||
<h2>{{if .Editing}}Edit Episode{{else}}New Episode{{end}}</h2>
|
||||
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div class="nb-form-group">
|
||||
<label for="title">Title</label>
|
||||
<input type="text" id="title" name="title" class="nb-input blue" required autofocus
|
||||
value="{{if .Editing}}{{.Episode.Title}}{{end}}" />
|
||||
</div>
|
||||
<div class="nb-form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea id="description" name="description" class="nb-textarea"
|
||||
rows="4">{{if .Editing}}{{.Episode.Description}}{{end}}</textarea>
|
||||
</div>
|
||||
<div class="nb-form-group">
|
||||
<label for="audio_file">Audio File</label>
|
||||
<input type="file" id="audio_file" name="audio_file" accept="audio/*" />
|
||||
{{if .Editing}}
|
||||
<div class="current-file">
|
||||
{{if .Episode.AudioPath}}Current: {{.Episode.AudioPath}}{{else}}No audio file uploaded.{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="nb-form-group">
|
||||
<label for="image_file">Episode Image (optional)</label>
|
||||
<input type="file" id="image_file" name="image_file" accept="image/*" />
|
||||
{{if .Editing}}
|
||||
<div class="current-file">
|
||||
{{if .Episode.ImagePath}}Current: {{.Episode.ImagePath}}{{else}}No image uploaded.{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="nb-form-group">
|
||||
<label for="published_at">Published At</label>
|
||||
<input type="datetime-local" id="published_at" name="published_at" class="nb-input blue"
|
||||
value="{{if .Editing}}{{.PublishedAt}}{{end}}" />
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="nb-button green">{{if .Editing}}Save Changes{{else}}Create Episode{{end}}</button>
|
||||
<a href="/" class="nb-button default">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user