This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Podstalk — Dashboard</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; }
|
||||
.flash-success { background: #c8e6c9; }
|
||||
.episode-actions { display: flex; gap: 0.5rem; }
|
||||
.settings-section { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 2px solid #ddd; }
|
||||
.settings-form { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
|
||||
.settings-form .form-group { margin-bottom: 0; }
|
||||
.inline-form { display: flex; gap: 0.5rem; align-items: center; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="nb-navbar" role="navigation" aria-label="Main navigation">
|
||||
<a href="/" class="nb-navbar-brand" aria-label="Go to homepage">{{.PodcastTitle}}</a>
|
||||
<ul class="nb-navbar-nav" role="menubar">
|
||||
<li class="nb-navbar-item" role="none">
|
||||
<a href="/" class="nb-navbar-link active" role="menuitem" aria-current="page">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">
|
||||
<div class="settings-section">
|
||||
<h2>Podcast Settings</h2>
|
||||
<form method="post" action="/settings" enctype="multipart/form-data">
|
||||
<div class="settings-form">
|
||||
<div class="form-group" style="flex: 1; min-width: 200px;">
|
||||
<label for="podcast_title">Podcast Title</label>
|
||||
<input type="text" id="podcast_title" name="podcast_title" class="nb-input blue"
|
||||
value="{{.PodcastTitle}}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="podcast_image">Podcast Image</label>
|
||||
<input type="file" id="podcast_image" name="podcast_image" accept="image/*" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="nb-button green">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{if .PodcastImage}}
|
||||
<div style="margin-top: 1rem;">
|
||||
<img src="/uploads/{{.PodcastImage}}" alt="Podcast image" style="max-width: 150px; max-height: 150px; border: 2px solid #000;" />
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="nb-card" style="margin-bottom: 1.5rem;">
|
||||
<div class="nb-card-content">
|
||||
<h4 class="nb-card-title">RSS Feed</h4>
|
||||
<p class="nb-card-text">
|
||||
<code id="rss-url"></code>
|
||||
<button class="nb-button default" onclick="copyRSS()" style="margin-left: 0.5rem;">Copy</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const rssURL = '{{.BaseURL}}/rss';
|
||||
document.getElementById('rss-url').textContent = rssURL;
|
||||
function copyRSS() {
|
||||
navigator.clipboard.writeText(rssURL).then(() => {
|
||||
const btn = event.target;
|
||||
btn.textContent = 'Copied!';
|
||||
setTimeout(() => btn.textContent = 'Copy', 1500);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<h2>Episodes</h2>
|
||||
|
||||
<div style="margin-bottom: 1.5rem;">
|
||||
<a href="/episodes/new" class="nb-button blue">+ New Episode</a>
|
||||
</div>
|
||||
|
||||
{{if .Episodes}}
|
||||
<div class="nb-table-container">
|
||||
<div class="nb-table-header">All Episodes ({{len .Episodes}})</div>
|
||||
<table class="nb-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Image</th>
|
||||
<th>Published</th>
|
||||
<th>Audio</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Episodes}}
|
||||
<tr>
|
||||
<td>{{.Title}}</td>
|
||||
<td>
|
||||
{{$img := .ImagePath}}
|
||||
{{if not $img}}{{$img = $.PodcastImage}}{{end}}
|
||||
{{if $img}}<img src="/uploads/{{$img}}" style="max-width: 48px; max-height: 48px; border: 1px solid #000;" />{{else}}—{{end}}
|
||||
</td>
|
||||
<td>{{.PublishedAt.Format "Jan 2, 2006"}}</td>
|
||||
<td>{{if .AudioPath}}✓{{else}}—{{end}}</td>
|
||||
<td>
|
||||
<div class="episode-actions">
|
||||
<a href="/episodes/edit?id={{.ID}}" class="nb-button default">Edit</a>
|
||||
<form method="post" action="/episodes/delete?id={{.ID}}" style="display:inline" onsubmit="return confirm('Delete this episode?')">
|
||||
<button type="submit" class="nb-button orange">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="nb-card">
|
||||
<div class="nb-card-content">
|
||||
<h4 class="nb-card-title">No episodes yet</h4>
|
||||
<p class="nb-card-text">Create your first episode to get started.</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Podstalk — Sign In</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; }
|
||||
</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="/signup" class="nb-navbar-link" role="menuitem">Sign Up</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="container">
|
||||
{{if .Error}}<div class="flash flash-error">{{.Error}}</div>{{end}}
|
||||
<h2>Sign In</h2>
|
||||
<p>Sign in to manage your podcast episodes.</p>
|
||||
|
||||
<form method="post" action="/signin">
|
||||
<div class="nb-form-group">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" id="email" name="email" class="nb-input blue" required autofocus />
|
||||
</div>
|
||||
<div class="nb-form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" class="nb-input blue" required />
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="nb-button blue">Sign In</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Podstalk — Sign Up</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; }
|
||||
</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="/signin" class="nb-navbar-link" role="menuitem">Sign In</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="container">
|
||||
{{if .Error}}<div class="flash flash-error">{{.Error}}</div>{{end}}
|
||||
<h2>Create Your Account</h2>
|
||||
<p>Set up your Podstalk account to start managing your podcast.</p>
|
||||
|
||||
<form method="post" action="/signup">
|
||||
<div class="nb-form-group">
|
||||
<label for="email">Email</label>
|
||||
<input type="email" id="email" name="email" class="nb-input blue" required autofocus />
|
||||
</div>
|
||||
<div class="nb-form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" class="nb-input blue" required />
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="nb-button blue">Sign Up</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user