nandi/gleanpublic⑂ Fork 0
⑂ 9e0ffc8
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Replace HTML entities with SVG icons and unify button stylesUnverified

Julien Robert committed 2026-04-20T20:40:16+02:00 Browse files
9e0ffc8 parent: 6017bda
modified internal/server/articles_handler.go +6 -3
@@ -14,12 +14,15 @@ import (
1414 )
1515
1616 func writeLikeButton(w http.ResponseWriter, articleID int64, liked bool, count int) {
17- cls := "text-gray-300 hover:text-red-500"
17+ fill := "none"
18+ colorCls := "text-spot-muted"
1819 if liked {
19- cls = "text-red-500"
20+ fill = "currentColor"
21+ colorCls = "text-spot-red"
2022 }
23+ const heartPath = `<path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"/>`
2124 w.Header().Set("Content-Type", "text/html")
22- _, _ = fmt.Fprintf(w, `<button hx-post="/articles/%d/like" hx-target="#like-btn" hx-swap="outerHTML" id="like-btn" class="text-lg %s">&#9829; <span class="text-sm text-gray-600">%d</span></button>`, articleID, cls, count)
25+ _, _ = fmt.Fprintf(w, `<button hx-post="/articles/%d/like" hx-target="#like-btn" hx-swap="outerHTML" id="like-btn" class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5"><svg class="w-3.5 h-3.5 %s" fill="%s" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">%s</svg><span>%d</span></button>`, articleID, colorCls, fill, heartPath, count)
2326 }
2427
2528 func (s *Server) handleArticles(w http.ResponseWriter, r *http.Request) {
@@ -14,12 +14,15 @@ import (
14 )14 )
15 15
16 func writeLikeButton(w http.ResponseWriter, articleID int64, liked bool, count int) {16 func writeLikeButton(w http.ResponseWriter, articleID int64, liked bool, count int) {
17- cls := "text-gray-300 hover:text-red-500"17+ fill := "none"
18+ colorCls := "text-spot-muted"
18 if liked {19 if liked {
19- cls = "text-red-500"20+ fill = "currentColor"
21+ colorCls = "text-spot-red"
20 }22 }
23+ const heartPath = `<path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"/>`
21 w.Header().Set("Content-Type", "text/html")24 w.Header().Set("Content-Type", "text/html")
22- _, _ = fmt.Fprintf(w, `<button hx-post="/articles/%d/like" hx-target="#like-btn" hx-swap="outerHTML" id="like-btn" class="text-lg %s">&#9829; <span class="text-sm text-gray-600">%d</span></button>`, articleID, cls, count)25+ _, _ = fmt.Fprintf(w, `<button hx-post="/articles/%d/like" hx-target="#like-btn" hx-swap="outerHTML" id="like-btn" class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5"><svg class="w-3.5 h-3.5 %s" fill="%s" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">%s</svg><span>%d</span></button>`, articleID, colorCls, fill, heartPath, count)
23 }26 }
24 27
25 func (s *Server) handleArticles(w http.ResponseWriter, r *http.Request) {28 func (s *Server) handleArticles(w http.ResponseWriter, r *http.Request) {
modified internal/tmpl/article_detail.html +22 -25
@@ -1,6 +1,9 @@
11 {{define "article_detail.html"}}
22 <div class="max-w-3xl mx-auto">
3- <a href="/articles" class="text-sm text-spot-secondary hover:text-spot-text mb-4 inline-block transition">&larr; Back to articles</a>
3+ <a href="/articles" class="text-sm text-spot-secondary hover:text-spot-text mb-6 inline-flex items-center gap-1.5 transition">
4+ <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5"/></svg>
5+ Back to articles
6+ </a>
47
58 <article>
69 <h1 class="text-2xl font-bold leading-tight">
@@ -8,55 +11,49 @@
811 {{else}}<span class="text-spot-text">{{.Article.Title}}</span>{{end}}
912 </h1>
1013
11- <div class="flex items-center gap-3 mt-3 text-sm text-spot-secondary">
14+ <div class="flex items-center gap-2.5 mt-3 text-sm text-spot-secondary flex-wrap">
1215 {{if .Article.Author.Valid}}<span>{{.Article.Author.String}}</span>{{end}}
1316 {{if .Article.Published.Valid}}<span>{{.Article.Published.Time.Format "Jan 2, 2006 15:04"}}</span>{{end}}
1417 {{if .Feed}}
15- <a href="/articles?feed={{.Feed.FeedURL}}" class="hover:text-spot-green transition">
16- {{if .Feed.FaviconURL.Valid}}<img src="{{.Feed.FaviconURL.String}}" class="w-4 h-4 inline-block mr-1 align-text-bottom rounded-sm">{{end}}
18+ <a href="/articles?feed={{.Feed.FeedURL}}" class="inline-flex items-center gap-1 hover:text-spot-green transition">
19+ {{if .Feed.FaviconURL.Valid}}<img src="{{.Feed.FaviconURL.String}}" class="w-4 h-4 rounded-sm">{{end}}
1720 {{if .Feed.Title.Valid}}{{.Feed.Title.String}}{{else}}{{.Feed.FeedURL}}{{end}}
1821 </a>
1922 {{end}}
2023 </div>
2124
22- <div class="flex items-center gap-2 mt-6 flex-wrap">
25+ <div class="flex items-center gap-2 mt-6">
26+ <button hx-post="/articles/{{.Article.ID}}/like" hx-target="#like-btn" hx-swap="outerHTML"
27+ id="like-btn"
28+ class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
29+ <svg class="w-3.5 h-3.5 {{if .HasLiked}}text-spot-red{{else}}text-spot-muted{{end}}" fill="{{if .HasLiked}}currentColor{{else}}none{{end}}" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
30+ <span>{{.LikeCount}}</span>
31+ </button>
32+
2333 <button hx-post="/articles/{{.Article.ID}}/{{if .ReadState.IsRead}}unread{{else}}read{{end}}"
2434 hx-target="#read-btn" hx-swap="outerHTML"
2535 id="read-btn"
26- class="border border-spot-outline text-spot-text rounded-pill px-5 py-2 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
27- {{if .ReadState.IsRead}}
28- <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.64 0 8.577 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.64 0-8.577-3.007-9.963-7.178z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
29- Mark unread
30- {{else}}
31- <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.64 0 8.577 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.64 0-8.577-3.007-9.963-7.178z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
32- Mark read
33- {{end}}
34- </button>
35-
36- <button hx-post="/articles/{{.Article.ID}}/like" hx-target="#like-btn" hx-swap="outerHTML"
37- id="like-btn"
38- class="border border-spot-outline text-spot-text rounded-pill px-5 py-2 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
39- <span class="{{if .HasLiked}}text-spot-red{{end}}">&#9829;</span>
40- {{.LikeCount}}
36+ class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition">
37+ {{if .ReadState.IsRead}}Mark unread{{else}}Mark read{{end}}
4138 </button>
4239
4340 {{if .Article.URL.Valid}}
4441 <a href="{{.Article.URL.String}}" target="_blank" rel="noopener noreferrer"
45- class="border border-spot-outline text-spot-text rounded-pill px-5 py-2 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
42+ class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
4643 <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-4.5-6H18m0 0v4.5m0-4.5L10.5 13.5"/></svg>
4744 Original
4845 </a>
4946
5047 <a href="https://bsky.app/intent/compose?text={{.Article.Title}}%20{{.Article.URL.String}}"
5148 target="_blank" rel="noopener noreferrer"
52- class="border border-spot-outline text-spot-text rounded-pill px-5 py-2 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
49+ class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
5350 <span class="w-3.5 h-3.5 inline-flex">{{template "icon-bluesky"}}</span>
5451 Share
5552 </a>
5653 {{end}}
5754 </div>
5855
59- <hr class="my-6 border-spot-divider-30">
56+ <hr class="my-8 border-spot-divider">
6057
6158 {{if .Article.Content.Valid}}
6259 <div class="article-body">
@@ -71,7 +68,7 @@
7168 {{end}}
7269 </article>
7370
74- <hr class="my-8 border-spot-divider-30">
71+ <hr class="my-8 border-spot-divider">
7572
7673 <section>
7774 <h2 class="text-lg font-semibold text-spot-text mb-4">Annotations</h2>
@@ -92,7 +89,7 @@
9289 </div>
9390 <div class="flex gap-2">
9491 <input type="text" name="tags" placeholder="Tags (comma separated)"
95- class="flex-1 bg-spot-hover text-spot-text rounded-lg px-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-spot-green placeholder:text-spot-placeholder">
92+ class="flex-1 bg-spot-hover text-spot-text rounded-pill px-5 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-spot-green placeholder:text-spot-placeholder">
9693 <button type="submit" class="bg-spot-green text-white rounded-pill px-5 py-2 text-sm font-bold uppercase tracking-button hover:brightness-110 transition">Annotate</button>
9794 </div>
9895 </form>
@@ -1,6 +1,9 @@
1 {{define "article_detail.html"}}1 {{define "article_detail.html"}}
2 <div class="max-w-3xl mx-auto">2 <div class="max-w-3xl mx-auto">
3- <a href="/articles" class="text-sm text-spot-secondary hover:text-spot-text mb-4 inline-block transition">&larr; Back to articles</a>3+ <a href="/articles" class="text-sm text-spot-secondary hover:text-spot-text mb-6 inline-flex items-center gap-1.5 transition">
4+ <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5"/></svg>
5+ Back to articles
6+ </a>
4 7
5 <article>8 <article>
6 <h1 class="text-2xl font-bold leading-tight">9 <h1 class="text-2xl font-bold leading-tight">
@@ -8,55 +11,49 @@
8 {{else}}<span class="text-spot-text">{{.Article.Title}}</span>{{end}}11 {{else}}<span class="text-spot-text">{{.Article.Title}}</span>{{end}}
9 </h1>12 </h1>
10 13
11- <div class="flex items-center gap-3 mt-3 text-sm text-spot-secondary">14+ <div class="flex items-center gap-2.5 mt-3 text-sm text-spot-secondary flex-wrap">
12 {{if .Article.Author.Valid}}<span>{{.Article.Author.String}}</span>{{end}}15 {{if .Article.Author.Valid}}<span>{{.Article.Author.String}}</span>{{end}}
13 {{if .Article.Published.Valid}}<span>{{.Article.Published.Time.Format "Jan 2, 2006 15:04"}}</span>{{end}}16 {{if .Article.Published.Valid}}<span>{{.Article.Published.Time.Format "Jan 2, 2006 15:04"}}</span>{{end}}
14 {{if .Feed}}17 {{if .Feed}}
15- <a href="/articles?feed={{.Feed.FeedURL}}" class="hover:text-spot-green transition">18+ <a href="/articles?feed={{.Feed.FeedURL}}" class="inline-flex items-center gap-1 hover:text-spot-green transition">
16- {{if .Feed.FaviconURL.Valid}}<img src="{{.Feed.FaviconURL.String}}" class="w-4 h-4 inline-block mr-1 align-text-bottom rounded-sm">{{end}}19+ {{if .Feed.FaviconURL.Valid}}<img src="{{.Feed.FaviconURL.String}}" class="w-4 h-4 rounded-sm">{{end}}
17 {{if .Feed.Title.Valid}}{{.Feed.Title.String}}{{else}}{{.Feed.FeedURL}}{{end}}20 {{if .Feed.Title.Valid}}{{.Feed.Title.String}}{{else}}{{.Feed.FeedURL}}{{end}}
18 </a>21 </a>
19 {{end}}22 {{end}}
20 </div>23 </div>
21 24
22- <div class="flex items-center gap-2 mt-6 flex-wrap">25+ <div class="flex items-center gap-2 mt-6">
26+ <button hx-post="/articles/{{.Article.ID}}/like" hx-target="#like-btn" hx-swap="outerHTML"
27+ id="like-btn"
28+ class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
29+ <svg class="w-3.5 h-3.5 {{if .HasLiked}}text-spot-red{{else}}text-spot-muted{{end}}" fill="{{if .HasLiked}}currentColor{{else}}none{{end}}" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
30+ <span>{{.LikeCount}}</span>
31+ </button>
32+
23 <button hx-post="/articles/{{.Article.ID}}/{{if .ReadState.IsRead}}unread{{else}}read{{end}}"33 <button hx-post="/articles/{{.Article.ID}}/{{if .ReadState.IsRead}}unread{{else}}read{{end}}"
24 hx-target="#read-btn" hx-swap="outerHTML"34 hx-target="#read-btn" hx-swap="outerHTML"
25 id="read-btn"35 id="read-btn"
26- class="border border-spot-outline text-spot-text rounded-pill px-5 py-2 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">36+ class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition">
27- {{if .ReadState.IsRead}}37+ {{if .ReadState.IsRead}}Mark unread{{else}}Mark read{{end}}
28- <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.64 0 8.577 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.64 0-8.577-3.007-9.963-7.178z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
29- Mark unread
30- {{else}}
31- <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.64 0 8.577 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.64 0-8.577-3.007-9.963-7.178z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
32- Mark read
33- {{end}}
34- </button>
35-
36- <button hx-post="/articles/{{.Article.ID}}/like" hx-target="#like-btn" hx-swap="outerHTML"
37- id="like-btn"
38- class="border border-spot-outline text-spot-text rounded-pill px-5 py-2 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
39- <span class="{{if .HasLiked}}text-spot-red{{end}}">&#9829;</span>
40- {{.LikeCount}}
41 </button>38 </button>
42 39
43 {{if .Article.URL.Valid}}40 {{if .Article.URL.Valid}}
44 <a href="{{.Article.URL.String}}" target="_blank" rel="noopener noreferrer"41 <a href="{{.Article.URL.String}}" target="_blank" rel="noopener noreferrer"
45- class="border border-spot-outline text-spot-text rounded-pill px-5 py-2 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">42+ class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
46 <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-4.5-6H18m0 0v4.5m0-4.5L10.5 13.5"/></svg>43 <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-4.5-6H18m0 0v4.5m0-4.5L10.5 13.5"/></svg>
47 Original44 Original
48 </a>45 </a>
49 46
50 <a href="https://bsky.app/intent/compose?text={{.Article.Title}}%20{{.Article.URL.String}}"47 <a href="https://bsky.app/intent/compose?text={{.Article.Title}}%20{{.Article.URL.String}}"
51 target="_blank" rel="noopener noreferrer"48 target="_blank" rel="noopener noreferrer"
52- class="border border-spot-outline text-spot-text rounded-pill px-5 py-2 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">49+ class="border border-spot-outline text-spot-text rounded-pill px-4 py-1.5 text-xs font-bold uppercase tracking-button hover:border-spot-text transition inline-flex items-center gap-1.5">
53 <span class="w-3.5 h-3.5 inline-flex">{{template "icon-bluesky"}}</span>50 <span class="w-3.5 h-3.5 inline-flex">{{template "icon-bluesky"}}</span>
54 Share51 Share
55 </a>52 </a>
56 {{end}}53 {{end}}
57 </div>54 </div>
58 55
59- <hr class="my-6 border-spot-divider-30">56+ <hr class="my-8 border-spot-divider">
60 57
61 {{if .Article.Content.Valid}}58 {{if .Article.Content.Valid}}
62 <div class="article-body">59 <div class="article-body">
@@ -71,7 +68,7 @@
71 {{end}}68 {{end}}
72 </article>69 </article>
73 70
74- <hr class="my-8 border-spot-divider-30">71+ <hr class="my-8 border-spot-divider">
75 72
76 <section>73 <section>
77 <h2 class="text-lg font-semibold text-spot-text mb-4">Annotations</h2>74 <h2 class="text-lg font-semibold text-spot-text mb-4">Annotations</h2>
@@ -92,7 +89,7 @@
92 </div>89 </div>
93 <div class="flex gap-2">90 <div class="flex gap-2">
94 <input type="text" name="tags" placeholder="Tags (comma separated)"91 <input type="text" name="tags" placeholder="Tags (comma separated)"
95- class="flex-1 bg-spot-hover text-spot-text rounded-lg px-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-spot-green placeholder:text-spot-placeholder">92+ class="flex-1 bg-spot-hover text-spot-text rounded-pill px-5 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-spot-green placeholder:text-spot-placeholder">
96 <button type="submit" class="bg-spot-green text-white rounded-pill px-5 py-2 text-sm font-bold uppercase tracking-button hover:brightness-110 transition">Annotate</button>93 <button type="submit" class="bg-spot-green text-white rounded-pill px-5 py-2 text-sm font-bold uppercase tracking-button hover:brightness-110 transition">Annotate</button>
97 </div>94 </div>
98 </form>95 </form>
modified internal/tmpl/articles.html +2 -2
@@ -31,8 +31,8 @@
3131 {{range .Articles}}
3232 {{template "article-card.html" .}}
3333 {{else}}
34- <div class="flex flex-col items-center justify-center py-16 text-center">
35- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">
34+ <div class="bg-spot-surface rounded-xl py-12 px-6 text-center">
35+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
3636 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2"/></svg>
3737 </div>
3838 <p class="text-sm text-spot-secondary mb-1">No articles found</p>
@@ -31,8 +31,8 @@
31 {{range .Articles}}31 {{range .Articles}}
32 {{template "article-card.html" .}}32 {{template "article-card.html" .}}
33 {{else}}33 {{else}}
34- <div class="flex flex-col items-center justify-center py-16 text-center">34+ <div class="bg-spot-surface rounded-xl py-12 px-6 text-center">
35- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">35+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
36 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2"/></svg>36 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2"/></svg>
37 </div>37 </div>
38 <p class="text-sm text-spot-secondary mb-1">No articles found</p>38 <p class="text-sm text-spot-secondary mb-1">No articles found</p>
modified internal/tmpl/dashboard.html +3 -3
@@ -34,8 +34,8 @@
3434 {{range .Articles}}
3535 {{template "article-card.html" .}}
3636 {{else}}
37- <div class="flex flex-col items-center justify-center py-12 text-center">
38- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">
37+ <div class="bg-spot-surface rounded-xl py-12 px-6 text-center">
38+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
3939 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
4040 </div>
4141 <p class="text-sm text-spot-secondary mb-1">No unread articles</p>
@@ -79,7 +79,7 @@
7979 <span class="text-spot-muted">{{if .FeedTitle}}{{.FeedTitle}}{{end}}</span>
8080 </div>
8181 <div class="flex items-center gap-3 mt-2 text-xs text-spot-secondary">
82- <span>&#9829; {{.LikeCount}}</span>
82+ <span class="inline-flex items-center gap-1"><svg class="w-4 h-4 text-spot-muted" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg> {{.LikeCount}}</span>
8383 <span class="text-spot-muted">{{.AnnotationCount}} notes</span>
8484 </div>
8585 </a>
@@ -34,8 +34,8 @@
34 {{range .Articles}}34 {{range .Articles}}
35 {{template "article-card.html" .}}35 {{template "article-card.html" .}}
36 {{else}}36 {{else}}
37- <div class="flex flex-col items-center justify-center py-12 text-center">37+ <div class="bg-spot-surface rounded-xl py-12 px-6 text-center">
38- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">38+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
39 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>39 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
40 </div>40 </div>
41 <p class="text-sm text-spot-secondary mb-1">No unread articles</p>41 <p class="text-sm text-spot-secondary mb-1">No unread articles</p>
@@ -79,7 +79,7 @@
79 <span class="text-spot-muted">{{if .FeedTitle}}{{.FeedTitle}}{{end}}</span>79 <span class="text-spot-muted">{{if .FeedTitle}}{{.FeedTitle}}{{end}}</span>
80 </div>80 </div>
81 <div class="flex items-center gap-3 mt-2 text-xs text-spot-secondary">81 <div class="flex items-center gap-3 mt-2 text-xs text-spot-secondary">
82- <span>&#9829; {{.LikeCount}}</span>82+ <span class="inline-flex items-center gap-1"><svg class="w-4 h-4 text-spot-muted" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg> {{.LikeCount}}</span>
83 <span class="text-spot-muted">{{.AnnotationCount}} notes</span>83 <span class="text-spot-muted">{{.AnnotationCount}} notes</span>
84 </div>84 </div>
85 </a>85 </a>
modified internal/tmpl/feeds.html +2 -2
@@ -86,8 +86,8 @@
8686 </div>
8787 </div>
8888 {{else}}
89- <div class="flex flex-col items-center justify-center py-12 text-center">
90- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">
89+ <div class="flex flex-col items-center justify-center py-12 px-6 text-center">
90+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
9191 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 5c7.18 0 13 5.82 13 13M6 11a7 7 0 017 7m-7-1a1 1 0 11-2 0 1 1 0 012 0z"/></svg>
9292 </div>
9393 <p class="text-sm text-spot-secondary mb-1">No feeds yet</p>
@@ -86,8 +86,8 @@
86 </div>86 </div>
87 </div>87 </div>
88 {{else}}88 {{else}}
89- <div class="flex flex-col items-center justify-center py-12 text-center">89+ <div class="flex flex-col items-center justify-center py-12 px-6 text-center">
90- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">90+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
91 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 5c7.18 0 13 5.82 13 13M6 11a7 7 0 017 7m-7-1a1 1 0 11-2 0 1 1 0 012 0z"/></svg>91 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 5c7.18 0 13 5.82 13 13M6 11a7 7 0 017 7m-7-1a1 1 0 11-2 0 1 1 0 012 0z"/></svg>
92 </div>92 </div>
93 <p class="text-sm text-spot-secondary mb-1">No feeds yet</p>93 <p class="text-sm text-spot-secondary mb-1">No feeds yet</p>
modified internal/tmpl/index.html +1 -1
@@ -46,7 +46,7 @@
4646 <div class="text-xs text-spot-secondary mt-0.5">example.com &middot; 2h ago</div>
4747 </div>
4848 <div class="flex items-center gap-1 text-spot-green shrink-0">
49- <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"/></svg>
49+ <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
5050 <span class="text-xs">12</span>
5151 </div>
5252 </div>
@@ -46,7 +46,7 @@
46 <div class="text-xs text-spot-secondary mt-0.5">example.com &middot; 2h ago</div>46 <div class="text-xs text-spot-secondary mt-0.5">example.com &middot; 2h ago</div>
47 </div>47 </div>
48 <div class="flex items-center gap-1 text-spot-green shrink-0">48 <div class="flex items-center gap-1 text-spot-green shrink-0">
49- <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"/></svg>49+ <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
50 <span class="text-xs">12</span>50 <span class="text-xs">12</span>
51 </div>51 </div>
52 </div>52 </div>
modified internal/tmpl/library.html +5 -5
@@ -12,9 +12,9 @@
1212 {{range .Articles}}
1313 {{template "article-card.html" .}}
1414 {{else}}
15- <div class="flex flex-col items-center justify-center py-12 text-center">
16- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">
17- <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"/></svg>
15+ <div class="bg-spot-surface rounded-xl py-12 px-6 text-center">
16+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
17+ <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
1818 </div>
1919 <p class="text-sm text-spot-secondary mb-1">No liked articles yet</p>
2020 <p class="text-xs text-spot-muted">Like articles to save them here.</p>
@@ -47,8 +47,8 @@
4747 {{range .Annotations}}
4848 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}
4949 {{else}}
50- <div class="flex flex-col items-center justify-center py-12 text-center">
51- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">
50+ <div class="bg-spot-surface rounded-xl py-12 px-6 text-center">
51+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
5252 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"/></svg>
5353 </div>
5454 <p class="text-sm text-spot-secondary mb-1">No annotations yet</p>
@@ -12,9 +12,9 @@
12 {{range .Articles}}12 {{range .Articles}}
13 {{template "article-card.html" .}}13 {{template "article-card.html" .}}
14 {{else}}14 {{else}}
15- <div class="flex flex-col items-center justify-center py-12 text-center">15+ <div class="bg-spot-surface rounded-xl py-12 px-6 text-center">
16- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">16+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
17- <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"/></svg>17+ <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
18 </div>18 </div>
19 <p class="text-sm text-spot-secondary mb-1">No liked articles yet</p>19 <p class="text-sm text-spot-secondary mb-1">No liked articles yet</p>
20 <p class="text-xs text-spot-muted">Like articles to save them here.</p>20 <p class="text-xs text-spot-muted">Like articles to save them here.</p>
@@ -47,8 +47,8 @@
47 {{range .Annotations}}47 {{range .Annotations}}
48 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}48 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}
49 {{else}}49 {{else}}
50- <div class="flex flex-col items-center justify-center py-12 text-center">50+ <div class="bg-spot-surface rounded-xl py-12 px-6 text-center">
51- <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4">51+ <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto">
52 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"/></svg>52 <svg class="w-7 h-7 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"/></svg>
53 </div>53 </div>
54 <p class="text-sm text-spot-secondary mb-1">No annotations yet</p>54 <p class="text-sm text-spot-secondary mb-1">No annotations yet</p>
modified internal/tmpl/partials/article-card.html +1 -1
@@ -15,7 +15,7 @@
1515 <p class="text-sm text-spot-secondary mt-2 line-clamp-2">{{plainText .Summary.String}}</p>
1616 {{end}}{{end}}
1717 </div>
18- <div class="flex flex-col items-center gap-1 shrink-0">
18+ <div class="flex flex-col items-center gap-3 shrink-0 pt-1">
1919 {{template "like-button.html" .}}
2020 {{if .IsRead.Bool}}
2121 <span id="read-btn-{{.ID}}" class="text-[10px] text-spot-green uppercase tracking-button">Read</span>
@@ -15,7 +15,7 @@
15 <p class="text-sm text-spot-secondary mt-2 line-clamp-2">{{plainText .Summary.String}}</p>15 <p class="text-sm text-spot-secondary mt-2 line-clamp-2">{{plainText .Summary.String}}</p>
16 {{end}}{{end}}16 {{end}}{{end}}
17 </div>17 </div>
18- <div class="flex flex-col items-center gap-1 shrink-0">18+ <div class="flex flex-col items-center gap-3 shrink-0 pt-1">
19 {{template "like-button.html" .}}19 {{template "like-button.html" .}}
20 {{if .IsRead.Bool}}20 {{if .IsRead.Bool}}
21 <span id="read-btn-{{.ID}}" class="text-[10px] text-spot-green uppercase tracking-button">Read</span>21 <span id="read-btn-{{.ID}}" class="text-[10px] text-spot-green uppercase tracking-button">Read</span>
added internal/tmpl/partials/icon-heart.html +1 -0
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-heart"}}<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"/></svg>{{end}}
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-heart"}}<svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"/></svg>{{end}}
modified internal/tmpl/partials/like-button.html +3 -1
@@ -1,4 +1,6 @@
11 {{define "like-button.html"}}
22 <button hx-post="/articles/{{.ID}}/like" hx-target="this" hx-swap="outerHTML"
3- class="text-spot-muted hover:text-spot-red text-lg transition">&#9829;</button>
3+ class="text-spot-muted hover:text-spot-red transition">
4+ <svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
5+</button>
46 {{end}}
@@ -1,4 +1,6 @@
1 {{define "like-button.html"}}1 {{define "like-button.html"}}
2 <button hx-post="/articles/{{.ID}}/like" hx-target="this" hx-swap="outerHTML"2 <button hx-post="/articles/{{.ID}}/like" hx-target="this" hx-swap="outerHTML"
3- class="text-spot-muted hover:text-spot-red text-lg transition">&#9829;</button>3+ class="text-spot-muted hover:text-spot-red transition">
4+ <svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
5+</button>
4 {{end}}6 {{end}}
modified main.go +0 -1
@@ -99,7 +99,6 @@ func main() {
9999 cancel()
100100
101101 fmt.Println("glean stopped")
102- os.Exit(0)
103102 }
104103
105104 func envOr(key, fallback string) string {
@@ -99,7 +99,6 @@ func main() {
99 cancel()99 cancel()
100 100
101 fmt.Println("glean stopped")101 fmt.Println("glean stopped")
102- os.Exit(0)
103 }102 }
104 103
105 func envOr(key, fallback string) string {104 func envOr(key, fallback string) string {