diff --git a/main.go b/main.go index 6aa92e7..ae3a230 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,9 @@ import ( //go:embed template/*.html var templateFS embed.FS +//go:embed static/* +var staticFS embed.FS + func main() { dbPath := os.Getenv("PODSTALK_DB") if dbPath == "" { @@ -81,6 +84,8 @@ func main() { // Public uploaded files. http.HandleFunc("/uploads/", epH.ServeUpload) + // Static files. + http.Handle("/static/", http.FileServer(http.FS(staticFS))) port := envOrDefault("PORT", "8080") addr := fmt.Sprintf(":%s", port) diff --git a/podstalk b/podstalk index d6ea5ae..8ec8bd1 100755 Binary files a/podstalk and b/podstalk differ diff --git a/podstalk.db b/podstalk.db index 71048bb..24e33fd 100644 Binary files a/podstalk.db and b/podstalk.db differ diff --git a/static/auth.css b/static/auth.css new file mode 100644 index 0000000..67f747d --- /dev/null +++ b/static/auth.css @@ -0,0 +1,7 @@ +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; } diff --git a/static/dashboard.css b/static/dashboard.css new file mode 100644 index 0000000..3f99f26 --- /dev/null +++ b/static/dashboard.css @@ -0,0 +1,20 @@ +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; } +.hidden { display: none; } +.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; } +.file-upload { position: relative; display: inline-block; } +.file-upload input[type="file"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; } +.file-name { margin-left: 0.5rem; font-size: 0.85rem; color: #666; } +.form-flex-1 { flex: 1; min-width: 200px; } +.form-flex-slug { flex: 1; min-width: 160px; } +.podcast-img-preview { margin-top: 1rem; } +.podcast-img-preview img { max-width: 150px; max-height: 150px; border: 2px solid #000; } +.rss-card { margin-bottom: 1.5rem; } +.new-ep-row { margin-bottom: 1.5rem; } +.ep-thumb { max-width: 48px; max-height: 48px; border: 1px solid #000; } diff --git a/static/episode.css b/static/episode.css new file mode 100644 index 0000000..c02b753 --- /dev/null +++ b/static/episode.css @@ -0,0 +1,11 @@ +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; } +.file-upload { position: relative; display: inline-block; } +.file-upload input[type="file"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; } +.file-name { margin-left: 0.5rem; font-size: 0.85rem; color: #666; } diff --git a/template/dashboard.html b/template/dashboard.html index e0ff5e8..35b4bd9 100644 --- a/template/dashboard.html +++ b/template/dashboard.html @@ -5,28 +5,7 @@ Podstalk — Dashboard - +