diff --git a/backend/internal/api/static/style.css b/backend/internal/api/static/style.css index 4825f99..5d6c735 100644 --- a/backend/internal/api/static/style.css +++ b/backend/internal/api/static/style.css @@ -49,6 +49,15 @@ h2 { font-size: 1rem; font-weight: normal; letter-spacing: .05em; } .entry-desc { white-space: pre-wrap; font-size: .9rem; } .entry-images { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; } +/* Public feed */ +.pub-card { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--pico-muted-border-color); } +.pub-card:last-of-type { border-bottom: none; } +.pub-cover { width: 100%; max-height: 320px; object-fit: cover; display: block; margin-bottom: .7rem; } +.pub-meta { display: block; color: var(--pico-muted-color); margin-bottom: .3rem; } +.pub-title { display: block; font-size: 1rem; margin-bottom: .4rem; } +.pub-desc { margin: 0 0 .4rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; } +.pub-tags { margin-top: .3rem; } + /* Login */ .login-box { max-width: 360px; margin: 4rem auto; } diff --git a/backend/internal/api/templates/public.html b/backend/internal/api/templates/public.html index 5992cf1..98ef08d 100644 --- a/backend/internal/api/templates/public.html +++ b/backend/internal/api/templates/public.html @@ -1,12 +1,11 @@ -{{define "title"}}Journal — Öffentliche Einträge{{end}} +{{define "title"}}Journal{{end}} {{define "content"}}
- - +
{{template "feed_items" .}}
@@ -15,26 +14,18 @@ {{define "feed_items"}} {{range .Entries}} -
-
- {{.EntryDate}} · {{.EntryTime}} - {{if .Title}} · {{.Title}}{{end}} -
- {{if .Description}}

{{.Description}}

{{end}} +
{{if .Images}} -
- {{range .Images}} - - {{.OriginalName}} - - {{end}} + + + + {{end}} +
+ {{.EntryDate}} · {{.EntryTime}} + {{if .Title}}{{.Title}}{{end}} + {{if .Description}}

{{.Description}}

{{end}} + {{if .Hashtags}}
{{range .Hashtags}}#{{.}} {{end}}
{{end}}
- {{end}} - {{if .Hashtags}} -
- {{range .Hashtags}}#{{.}} {{end}} -
- {{end}}
{{else}}

// Noch keine öffentlichen Einträge

@@ -52,8 +43,7 @@ const obs = new IntersectionObserver(function(entries) { if (!entries[0].isIntersecting) return; obs.disconnect(); - const offset = sentinel.dataset.offset; - fetch('/feed?offset=' + offset) + fetch('/feed?offset=' + sentinel.dataset.offset) .then(r => r.text()) .then(html => { sentinel.remove();