nandi/gleanpublic Fork 0
aaebc26
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.

Add empty-state partial and use it across templatesUnverified

Julien Robert committed 2026-05-28T09:24:27+02:00 Browse files
aaebc26 parent: 898abf9
modified internal/tmpl/dashboard.html +23 -0
@@ -36,6 +36,11 @@
3636 {{end}}
3737 </div>
3838 </div>
39+{{else}}
40+<div class="mb-8">
41+ <h2 class="text-lg font-semibold text-spot-text mb-4">Recommended for you</h2>
42+ {{template "empty-state.html" (dict "icon" "icon-sparkles" "title" "No recommendations yet" "subtitle" "Read and like more articles to get personalized picks.")}}
43+</div>
3944 {{end}}
4045
4146 {{if and .DigestEnabled .HasLLM}}
@@ -80,6 +85,11 @@
8085 {{end}}
8186 </div>
8287 </div>
88+{{else}}
89+<div class="mb-8">
90+ <h2 class="text-lg font-semibold text-spot-text mb-4">Recommended for you</h2>
91+ {{template "empty-state.html" (dict "icon" "icon-sparkles" "title" "No recommendations yet" "subtitle" "Read and like more articles to get personalized picks.")}}
92+</div>
8393 {{end}}
8494
8595 <div class="mb-8">
@@ -105,6 +115,14 @@
105115 {{range .PersonalTrending}}{{template "trending-card.html" .}}{{end}}
106116 </div>
107117 </div>
118+{{else}}
119+<div class="mb-8">
120+ <div class="flex items-center justify-between mb-4">
121+ <h2 class="text-lg font-semibold text-spot-text">Trending</h2>
122+ <a href="/trending" class="text-xs text-spot-secondary hover:text-spot-green uppercase tracking-button transition">See all</a>
123+ </div>
124+ {{template "empty-state.html" (dict "icon" "icon-trending" "title" "No trending articles yet" "subtitle" "Articles will appear here as the community grows.")}}
125+</div>
108126 {{end}}
109127
110128 {{if or .FollowedPeople .DiscoverPeople}}
@@ -143,5 +161,10 @@
143161 {{end}}
144162 </div>
145163 </div>
164+{{else}}
165+<div class="mb-8">
166+ <h2 class="text-lg font-semibold text-spot-text mb-4">Recommended feeds</h2>
167+ {{template "empty-state.html" (dict "icon" "icon-rss" "title" "No feed suggestions yet" "subtitle" "Subscribe to a few feeds and we'll suggest more based on your reading.")}}
168+</div>
146169 {{end}}
147170 {{end}}
@@ -36,6 +36,11 @@
36 {{end}}36 {{end}}
37 </div>37 </div>
38 </div>38 </div>
39+{{else}}
40+<div class="mb-8">
41+ <h2 class="text-lg font-semibold text-spot-text mb-4">Recommended for you</h2>
42+ {{template "empty-state.html" (dict "icon" "icon-sparkles" "title" "No recommendations yet" "subtitle" "Read and like more articles to get personalized picks.")}}
43+</div>
39 {{end}}44 {{end}}
40 45
41 {{if and .DigestEnabled .HasLLM}}46 {{if and .DigestEnabled .HasLLM}}
@@ -80,6 +85,11 @@
80 {{end}}85 {{end}}
81 </div>86 </div>
82 </div>87 </div>
88+{{else}}
89+<div class="mb-8">
90+ <h2 class="text-lg font-semibold text-spot-text mb-4">Recommended for you</h2>
91+ {{template "empty-state.html" (dict "icon" "icon-sparkles" "title" "No recommendations yet" "subtitle" "Read and like more articles to get personalized picks.")}}
92+</div>
83 {{end}}93 {{end}}
84 94
85 <div class="mb-8">95 <div class="mb-8">
@@ -105,6 +115,14 @@
105 {{range .PersonalTrending}}{{template "trending-card.html" .}}{{end}}115 {{range .PersonalTrending}}{{template "trending-card.html" .}}{{end}}
106 </div>116 </div>
107 </div>117 </div>
118+{{else}}
119+<div class="mb-8">
120+ <div class="flex items-center justify-between mb-4">
121+ <h2 class="text-lg font-semibold text-spot-text">Trending</h2>
122+ <a href="/trending" class="text-xs text-spot-secondary hover:text-spot-green uppercase tracking-button transition">See all</a>
123+ </div>
124+ {{template "empty-state.html" (dict "icon" "icon-trending" "title" "No trending articles yet" "subtitle" "Articles will appear here as the community grows.")}}
125+</div>
108 {{end}}126 {{end}}
109 127
110 {{if or .FollowedPeople .DiscoverPeople}}128 {{if or .FollowedPeople .DiscoverPeople}}
@@ -143,5 +161,10 @@
143 {{end}}161 {{end}}
144 </div>162 </div>
145 </div>163 </div>
164+{{else}}
165+<div class="mb-8">
166+ <h2 class="text-lg font-semibold text-spot-text mb-4">Recommended feeds</h2>
167+ {{template "empty-state.html" (dict "icon" "icon-rss" "title" "No feed suggestions yet" "subtitle" "Subscribe to a few feeds and we'll suggest more based on your reading.")}}
168+</div>
146 {{end}}169 {{end}}
147 {{end}}170 {{end}}
modified internal/tmpl/feeds.html +8 -7
@@ -30,6 +30,11 @@ function gleanToggleEdit(id){var i=document.getElementById('feed-edit-'+id);if(i
3030 {{end}}
3131 </div>
3232 </div>
33+{{else if .SubscriptionCount}}
34+<div class="mb-6">
35+ <h2 class="text-sm font-bold text-spot-text uppercase tracking-wide mb-3">Recommended feeds</h2>
36+ {{template "empty-state.html" (dict "icon" "icon-rss" "size" "compact" "title" "No feed suggestions yet" "subtitle" "We'll suggest feeds as you read more.")}}
37+</div>
3338 {{end}}
3439
3540 <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
@@ -48,13 +53,7 @@ function gleanToggleEdit(id){var i=document.getElementById('feed-edit-'+id);if(i
4853 {{range .Subscriptions}}
4954 {{template "feed-item.html" dict "ID" .ID "FeedURL" .FeedURL "FeedTitle" .FeedTitle "Category" .Category "FaviconURL" .FaviconURL "UnreadCount" .UnreadCount "CSRFToken" $.CSRFToken}}
5055 {{else}}
51- <div class="flex flex-col items-center justify-center py-12 px-6 text-center">
52- <div class="w-14 h-14 rounded-2xl bg-spot-green/15 flex items-center justify-center mb-4 mx-auto">
53- <svg class="w-7 h-7 text-spot-green" 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>
54- </div>
55- <p class="text-sm text-spot-text font-semibold mb-1">No feeds yet</p>
56- <p class="text-xs text-spot-muted">Add one using the form on the right to get started.</p>
57- </div>
56+ {{template "empty-state.html" (dict "icon" "icon-rss" "title" "No feeds yet" "subtitle" "Add one using the form on the right to get started.")}}
5857 {{end}}
5958 </div>
6059
@@ -107,6 +106,8 @@ function gleanToggleEdit(id){var i=document.getElementById('feed-edit-'+id);if(i
107106 </div>
108107 {{end}}
109108 </div>
109+ {{else}}
110+ {{template "empty-state.html" (dict "icon" "icon-people" "size" "compact" "title" "No connections yet" "subtitle" "Follow readers on the network to see them here.")}}
110111 {{end}}
111112
112113 {{if .Subscriptions}}
@@ -30,6 +30,11 @@ function gleanToggleEdit(id){var i=document.getElementById('feed-edit-'+id);if(i
30 {{end}}30 {{end}}
31 </div>31 </div>
32 </div>32 </div>
33+{{else if .SubscriptionCount}}
34+<div class="mb-6">
35+ <h2 class="text-sm font-bold text-spot-text uppercase tracking-wide mb-3">Recommended feeds</h2>
36+ {{template "empty-state.html" (dict "icon" "icon-rss" "size" "compact" "title" "No feed suggestions yet" "subtitle" "We'll suggest feeds as you read more.")}}
37+</div>
33 {{end}}38 {{end}}
34 39
35 <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">40 <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
@@ -48,13 +53,7 @@ function gleanToggleEdit(id){var i=document.getElementById('feed-edit-'+id);if(i
48 {{range .Subscriptions}}53 {{range .Subscriptions}}
49 {{template "feed-item.html" dict "ID" .ID "FeedURL" .FeedURL "FeedTitle" .FeedTitle "Category" .Category "FaviconURL" .FaviconURL "UnreadCount" .UnreadCount "CSRFToken" $.CSRFToken}}54 {{template "feed-item.html" dict "ID" .ID "FeedURL" .FeedURL "FeedTitle" .FeedTitle "Category" .Category "FaviconURL" .FaviconURL "UnreadCount" .UnreadCount "CSRFToken" $.CSRFToken}}
50 {{else}}55 {{else}}
51- <div class="flex flex-col items-center justify-center py-12 px-6 text-center">56+ {{template "empty-state.html" (dict "icon" "icon-rss" "title" "No feeds yet" "subtitle" "Add one using the form on the right to get started.")}}
52- <div class="w-14 h-14 rounded-2xl bg-spot-green/15 flex items-center justify-center mb-4 mx-auto">
53- <svg class="w-7 h-7 text-spot-green" 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>
54- </div>
55- <p class="text-sm text-spot-text font-semibold mb-1">No feeds yet</p>
56- <p class="text-xs text-spot-muted">Add one using the form on the right to get started.</p>
57- </div>
58 {{end}}57 {{end}}
59 </div>58 </div>
60 59
@@ -107,6 +106,8 @@ function gleanToggleEdit(id){var i=document.getElementById('feed-edit-'+id);if(i
107 </div>106 </div>
108 {{end}}107 {{end}}
109 </div>108 </div>
109+ {{else}}
110+ {{template "empty-state.html" (dict "icon" "icon-people" "size" "compact" "title" "No connections yet" "subtitle" "Follow readers on the network to see them here.")}}
110 {{end}}111 {{end}}
111 112
112 {{if .Subscriptions}}113 {{if .Subscriptions}}
modified internal/tmpl/library.html +2 -14
@@ -12,13 +12,7 @@
1212 {{range .Articles}}
1313 {{template "article-card.html" .}}
1414 {{else}}
15- <div class="bg-spot-surface rounded-2xl py-12 px-6 text-center">
16- <div class="w-14 h-14 rounded-2xl bg-spot-red/15 flex items-center justify-center mb-5 mx-auto">
17- <svg class="w-7 h-7 text-spot-red" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
18- </div>
19- <p class="text-sm text-spot-text font-semibold mb-1">No liked articles yet</p>
20- <p class="text-xs text-spot-muted">Like articles to save them here.</p>
21- </div>
15+ {{template "empty-state.html" (dict "icon" "icon-heart" "color" "red" "title" "No liked articles yet" "subtitle" "Like articles to save them here.")}}
2216 {{end}}
2317 </div>
2418
@@ -47,13 +41,7 @@
4741 {{range .Annotations}}
4842 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}
4943 {{else}}
50- <div class="bg-spot-surface rounded-2xl py-12 px-6 text-center">
51- <div class="w-14 h-14 rounded-2xl bg-spot-green/15 flex items-center justify-center mb-5 mx-auto">
52- <svg class="w-7 h-7 text-spot-green" 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>
54- <p class="text-sm text-spot-text font-semibold mb-1">No annotations yet</p>
55- <p class="text-xs text-spot-muted">Highlight and annotate articles as you read.</p>
56- </div>
44+ {{template "empty-state.html" (dict "icon" "icon-annotation" "title" "No annotations yet" "subtitle" "Highlight and annotate articles as you read.")}}
5745 {{end}}
5846 </div>
5947
@@ -12,13 +12,7 @@
12 {{range .Articles}}12 {{range .Articles}}
13 {{template "article-card.html" .}}13 {{template "article-card.html" .}}
14 {{else}}14 {{else}}
15- <div class="bg-spot-surface rounded-2xl py-12 px-6 text-center">15+ {{template "empty-state.html" (dict "icon" "icon-heart" "color" "red" "title" "No liked articles yet" "subtitle" "Like articles to save them here.")}}
16- <div class="w-14 h-14 rounded-2xl bg-spot-red/15 flex items-center justify-center mb-5 mx-auto">
17- <svg class="w-7 h-7 text-spot-red" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
18- </div>
19- <p class="text-sm text-spot-text font-semibold mb-1">No liked articles yet</p>
20- <p class="text-xs text-spot-muted">Like articles to save them here.</p>
21- </div>
22 {{end}}16 {{end}}
23 </div>17 </div>
24 18
@@ -47,13 +41,7 @@
47 {{range .Annotations}}41 {{range .Annotations}}
48 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}42 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}
49 {{else}}43 {{else}}
50- <div class="bg-spot-surface rounded-2xl py-12 px-6 text-center">44+ {{template "empty-state.html" (dict "icon" "icon-annotation" "title" "No annotations yet" "subtitle" "Highlight and annotate articles as you read.")}}
51- <div class="w-14 h-14 rounded-2xl bg-spot-green/15 flex items-center justify-center mb-5 mx-auto">
52- <svg class="w-7 h-7 text-spot-green" 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>
54- <p class="text-sm text-spot-text font-semibold mb-1">No annotations yet</p>
55- <p class="text-xs text-spot-muted">Highlight and annotate articles as you read.</p>
56- </div>
57 {{end}}45 {{end}}
58 </div>46 </div>
59 47
added internal/tmpl/partials/empty-state.html +19 -0
new file mode 100644
@@ -0,0 +1,19 @@
1+{{define "empty-state.html"}}
2+<div class="bg-spot-surface rounded-2xl {{if eq .size "compact"}}py-8{{else}}py-12{{end}} px-6 text-center">
3+ <div class="{{if eq .size "compact"}}w-12 h-12 rounded-xl mb-3{{else}}w-14 h-14 rounded-2xl mb-5{{end}} flex items-center justify-center mx-auto {{if eq .color "red"}}bg-spot-red/15{{else}}bg-spot-green/15{{end}}">
4+ <svg class="{{if eq .size "compact"}}w-6 h-6{{else}}w-7 h-7{{end}} {{if eq .color "red"}}text-spot-red{{else}}text-spot-green{{end}}" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
5+ {{if eq .icon "icon-sparkles"}}{{template "icon-sparkles"}}
6+ {{else if eq .icon "icon-trending"}}{{template "icon-trending"}}
7+ {{else if eq .icon "icon-rss"}}{{template "icon-rss"}}
8+ {{else if eq .icon "icon-heart"}}{{template "icon-heart"}}
9+ {{else if eq .icon "icon-annotation"}}{{template "icon-annotation"}}
10+ {{else if eq .icon "icon-newspaper"}}{{template "icon-newspaper"}}
11+ {{else if eq .icon "icon-chart"}}{{template "icon-chart"}}
12+ {{else if eq .icon "icon-people"}}{{template "icon-people"}}
13+ {{end}}
14+ </svg>
15+ </div>
16+ <p class="text-sm text-spot-text font-semibold mb-1">{{.title}}</p>
17+ {{if .subtitle}}<p class="text-xs text-spot-muted">{{.subtitle}}</p>{{end}}
18+</div>
19+{{end}}
new file mode 100644
@@ -0,0 +1,19 @@
1+{{define "empty-state.html"}}
2+<div class="bg-spot-surface rounded-2xl {{if eq .size "compact"}}py-8{{else}}py-12{{end}} px-6 text-center">
3+ <div class="{{if eq .size "compact"}}w-12 h-12 rounded-xl mb-3{{else}}w-14 h-14 rounded-2xl mb-5{{end}} flex items-center justify-center mx-auto {{if eq .color "red"}}bg-spot-red/15{{else}}bg-spot-green/15{{end}}">
4+ <svg class="{{if eq .size "compact"}}w-6 h-6{{else}}w-7 h-7{{end}} {{if eq .color "red"}}text-spot-red{{else}}text-spot-green{{end}}" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24">
5+ {{if eq .icon "icon-sparkles"}}{{template "icon-sparkles"}}
6+ {{else if eq .icon "icon-trending"}}{{template "icon-trending"}}
7+ {{else if eq .icon "icon-rss"}}{{template "icon-rss"}}
8+ {{else if eq .icon "icon-heart"}}{{template "icon-heart"}}
9+ {{else if eq .icon "icon-annotation"}}{{template "icon-annotation"}}
10+ {{else if eq .icon "icon-newspaper"}}{{template "icon-newspaper"}}
11+ {{else if eq .icon "icon-chart"}}{{template "icon-chart"}}
12+ {{else if eq .icon "icon-people"}}{{template "icon-people"}}
13+ {{end}}
14+ </svg>
15+ </div>
16+ <p class="text-sm text-spot-text font-semibold mb-1">{{.title}}</p>
17+ {{if .subtitle}}<p class="text-xs text-spot-muted">{{.subtitle}}</p>{{end}}
18+</div>
19+{{end}}
modified internal/tmpl/partials/feed-list.html +1 -7
@@ -2,12 +2,6 @@
22 {{range .Subscriptions}}
33 {{template "feed-item.html" dict "ID" .ID "FeedURL" .FeedURL "FeedTitle" .FeedTitle "Category" .Category "FaviconURL" .FaviconURL "UnreadCount" .UnreadCount "CSRFToken" $.CSRFToken}}
44 {{else}}
5-<div class="flex flex-col items-center justify-center py-12 px-6 text-center">
6- <div class="w-14 h-14 rounded-2xl bg-spot-green/15 flex items-center justify-center mb-5 mx-auto">
7- <svg class="w-7 h-7 text-spot-green" 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>
8- </div>
9- <p class="text-sm text-spot-text font-semibold mb-1">No feeds yet</p>
10- <p class="text-xs text-spot-muted">Add one from the sidebar to get started.</p>
11-</div>
5+{{template "empty-state.html" (dict "icon" "icon-rss" "title" "No feeds yet" "subtitle" "Add one from the sidebar to get started.")}}
126 {{end}}
137 {{end}}
@@ -2,12 +2,6 @@
2 {{range .Subscriptions}}2 {{range .Subscriptions}}
3 {{template "feed-item.html" dict "ID" .ID "FeedURL" .FeedURL "FeedTitle" .FeedTitle "Category" .Category "FaviconURL" .FaviconURL "UnreadCount" .UnreadCount "CSRFToken" $.CSRFToken}}3 {{template "feed-item.html" dict "ID" .ID "FeedURL" .FeedURL "FeedTitle" .FeedTitle "Category" .Category "FaviconURL" .FaviconURL "UnreadCount" .UnreadCount "CSRFToken" $.CSRFToken}}
4 {{else}}4 {{else}}
5-<div class="flex flex-col items-center justify-center py-12 px-6 text-center">5+{{template "empty-state.html" (dict "icon" "icon-rss" "title" "No feeds yet" "subtitle" "Add one from the sidebar to get started.")}}
6- <div class="w-14 h-14 rounded-2xl bg-spot-green/15 flex items-center justify-center mb-5 mx-auto">
7- <svg class="w-7 h-7 text-spot-green" 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>
8- </div>
9- <p class="text-sm text-spot-text font-semibold mb-1">No feeds yet</p>
10- <p class="text-xs text-spot-muted">Add one from the sidebar to get started.</p>
11-</div>
12 {{end}}6 {{end}}
13 {{end}}7 {{end}}
added internal/tmpl/partials/icon-annotation.html +1 -0
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-annotation"}}<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"/>{{end}}
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-annotation"}}<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"/>{{end}}
added internal/tmpl/partials/icon-chart.html +1 -0
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-chart"}}<path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"/>{{end}}
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-chart"}}<path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"/>{{end}}
added internal/tmpl/partials/icon-newspaper.html +1 -0
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-newspaper"}}<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"/>{{end}}
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-newspaper"}}<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"/>{{end}}
added internal/tmpl/partials/icon-people.html +1 -0
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-people"}}<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"/>{{end}}
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-people"}}<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"/>{{end}}
added internal/tmpl/partials/icon-rss.html +1 -0
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-rss"}}<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"/>{{end}}
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-rss"}}<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"/>{{end}}
added internal/tmpl/partials/icon-sparkles.html +1 -0
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-sparkles"}}<path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"/>{{end}}
new file mode 100644
@@ -0,0 +1 @@
1+{{define "icon-sparkles"}}<path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"/>{{end}}
modified internal/tmpl/profile.html +2 -2
@@ -82,7 +82,7 @@
8282 <svg class="w-4 h-4 text-spot-muted shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
8383 </a>
8484 {{else}}
85- <div class="px-5 py-6 text-center text-spot-secondary text-sm">No feeds.</div>
85+ {{template "empty-state.html" (dict "icon" "icon-rss" "size" "compact" "title" "No feeds yet" "subtitle" "Subscribed feeds will appear here.")}}
8686 {{end}}
8787 </div>
8888
@@ -91,7 +91,7 @@
9191 {{range .Annotations}}
9292 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}
9393 {{else}}
94- <p class="text-sm text-spot-secondary text-center py-6">No annotations.</p>
94+ {{template "empty-state.html" (dict "icon" "icon-annotation" "size" "compact" "title" "No annotations yet" "subtitle" "Highlight and annotate articles as you read.")}}
9595 {{end}}
9696 </div>
9797 </div>
@@ -82,7 +82,7 @@
82 <svg class="w-4 h-4 text-spot-muted shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>82 <svg class="w-4 h-4 text-spot-muted shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"/></svg>
83 </a>83 </a>
84 {{else}}84 {{else}}
85- <div class="px-5 py-6 text-center text-spot-secondary text-sm">No feeds.</div>85+ {{template "empty-state.html" (dict "icon" "icon-rss" "size" "compact" "title" "No feeds yet" "subtitle" "Subscribed feeds will appear here.")}}
86 {{end}}86 {{end}}
87 </div>87 </div>
88 88
@@ -91,7 +91,7 @@
91 {{range .Annotations}}91 {{range .Annotations}}
92 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}92 {{template "annotation-card.html" dict "annotation" . "userDID" $.CurrentUserDID}}
93 {{else}}93 {{else}}
94- <p class="text-sm text-spot-secondary text-center py-6">No annotations.</p>94+ {{template "empty-state.html" (dict "icon" "icon-annotation" "size" "compact" "title" "No annotations yet" "subtitle" "Highlight and annotate articles as you read.")}}
95 {{end}}95 {{end}}
96 </div>96 </div>
97 </div>97 </div>
modified internal/tmpl/stats.html +1 -7
@@ -46,13 +46,7 @@
4646 </div>
4747 </div>
4848 {{else}}
49- <div class="bg-spot-surface rounded-2xl py-14 px-6 text-center">
50- <div class="w-14 h-14 rounded-2xl bg-spot-green/15 flex items-center justify-center mb-5 mx-auto">
51- <svg class="w-7 h-7 text-spot-green" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 19.5v-15m0 0l-6.75 6.75M12.75 4.5l6.75 6.75"/></svg>
52- </div>
53- <p class="text-sm text-spot-text font-semibold mb-1">No metrics available</p>
54- <p class="text-xs text-spot-muted">Metrics will appear here once the application has been running for a while.</p>
55- </div>
49+ {{template "empty-state.html" (dict "icon" "icon-chart" "title" "No metrics available" "subtitle" "Metrics will appear here once the application has been running for a while.")}}
5650 {{end}}
5751 </div>
5852 {{end}}
@@ -46,13 +46,7 @@
46 </div>46 </div>
47 </div>47 </div>
48 {{else}}48 {{else}}
49- <div class="bg-spot-surface rounded-2xl py-14 px-6 text-center">49+ {{template "empty-state.html" (dict "icon" "icon-chart" "title" "No metrics available" "subtitle" "Metrics will appear here once the application has been running for a while.")}}
50- <div class="w-14 h-14 rounded-2xl bg-spot-green/15 flex items-center justify-center mb-5 mx-auto">
51- <svg class="w-7 h-7 text-spot-green" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M9 19.5v-15m0 0l-6.75 6.75M12.75 4.5l6.75 6.75"/></svg>
52- </div>
53- <p class="text-sm text-spot-text font-semibold mb-1">No metrics available</p>
54- <p class="text-xs text-spot-muted">Metrics will appear here once the application has been running for a while.</p>
55- </div>
56 {{end}}50 {{end}}
57 </div>51 </div>
58 {{end}}52 {{end}}