A social RSS reader built on the AT Protocol. glean.at
glean atproto atmosphere rss feed social app
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve dashboard when no unread article

+92 -43
+92 -43
internal/tmpl/dashboard.html
··· 15 15 {{if eq .SubscriptionCount 0}} 16 16 <div id="new-articles-poll" hx-get="/articles/new-count?since={{.Now.Unix}}&return=/dashboard" hx-trigger="every 30s" hx-swap="innerHTML"></div> 17 17 18 - <div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> 19 - <div class="lg:col-span-2 space-y-6"> 20 - <div class="bg-spot-surface rounded-xl py-12 px-6 text-center"> 21 - <div class="w-16 h-16 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto"> 22 - <svg class="w-8 h-8 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12.75 19.5v-15m0 0l-6.75 6.75M12.75 4.5l6.75 6.75"/></svg> 23 - </div> 24 - <h2 class="text-lg font-semibold text-spot-text mb-2">Add your first feed</h2> 25 - <p class="text-sm text-spot-secondary mb-6">Subscribe to RSS feeds to start building your personalized reading experience.</p> 26 - <a href="/feeds" class="inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-spot-green text-white text-sm font-medium hover:opacity-90 transition"> 27 - <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="M12 4.5v15m7.5-7.5h-15"/></svg> 28 - Add feeds 29 - </a> 30 - </div> 18 + <div class="bg-spot-surface rounded-xl py-12 px-6 text-center mb-8"> 19 + <div class="w-16 h-16 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto"> 20 + <svg class="w-8 h-8 text-spot-muted" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12.75 19.5v-15m0 0l-6.75 6.75M12.75 4.5l6.75 6.75"/></svg> 21 + </div> 22 + <h2 class="text-lg font-semibold text-spot-text mb-2">Add your first feed</h2> 23 + <p class="text-sm text-spot-secondary mb-6">Subscribe to RSS feeds to start building your personalized reading experience.</p> 24 + <a href="/feeds" class="inline-flex items-center gap-2 px-5 py-2.5 rounded-lg bg-spot-green text-white text-sm font-medium hover:opacity-90 transition"> 25 + <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="M12 4.5v15m7.5-7.5h-15"/></svg> 26 + Add feeds 27 + </a> 28 + </div> 31 29 32 - {{if .GlobalTrending}} 33 - <div> 34 - <div class="flex items-center justify-between mb-3"> 35 - <h2 class="text-lg font-semibold text-spot-text">Trending</h2> 36 - <a href="/trending" class="text-xs text-spot-secondary hover:text-spot-green uppercase tracking-button transition">See all</a> 37 - </div> 38 - <div class="space-y-3"> 39 - {{range .GlobalTrending}} 40 - {{template "trending-card.html" .}} 41 - {{end}} 42 - </div> 43 - </div> 30 + {{if .GlobalTrending}} 31 + <div class="mb-8"> 32 + <div class="flex items-center justify-between mb-3"> 33 + <h2 class="text-lg font-semibold text-spot-text">Trending</h2> 34 + <a href="/trending" class="text-xs text-spot-secondary hover:text-spot-green uppercase tracking-button transition">See all</a> 35 + </div> 36 + <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3"> 37 + {{range .GlobalTrending}} 38 + {{template "trending-card.html" .}} 44 39 {{end}} 45 40 </div> 41 + </div> 42 + {{end}} 46 43 47 - <div class="space-y-8"> 48 - {{if .FeedRecommendations}} 49 - <div> 50 - <h2 class="text-lg font-semibold text-spot-text mb-4">Popular feeds to get started</h2> 51 - <div class="space-y-3"> 52 - {{range .FeedRecommendations}} 53 - {{template "recommendation-feed-card.html" (dict "title" .Title "feed_url" .FeedURL "description" .Description "favicon_url" .FaviconURL "subscriber_count" .SubscriberCount "CSRFToken" $.CSRFToken)}} 54 - {{end}} 55 - </div> 56 - </div> 44 + {{if .FeedRecommendations}} 45 + <div class="mb-8"> 46 + <h2 class="text-lg font-semibold text-spot-text mb-4">Popular feeds to get started</h2> 47 + <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3"> 48 + {{range .FeedRecommendations}} 49 + {{template "recommendation-feed-card.html" (dict "title" .Title "feed_url" .FeedURL "description" .Description "favicon_url" .FaviconURL "subscriber_count" .SubscriberCount "CSRFToken" $.CSRFToken)}} 57 50 {{end}} 58 51 </div> 59 52 </div> 53 + {{end}} 60 54 61 55 {{else}} 62 56 <div id="new-articles-poll" hx-get="/articles/new-count?since={{.Now.Unix}}&return=/dashboard" hx-trigger="every 30s" hx-swap="innerHTML"></div> 63 57 58 + {{if .Articles}} 64 59 <div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> 65 60 <div class="lg:col-span-2"> 66 61 {{if .ArticleRecommendations}} ··· 78 73 <div id="article-list" class="space-y-3"> 79 74 {{range .Articles}} 80 75 {{template "article-card.html" .}} 81 - {{else}} 82 - <div class="bg-spot-surface rounded-xl py-12 px-6 text-center"> 83 - <div class="w-14 h-14 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto"> 84 - <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> 85 - </div> 86 - <p class="text-sm text-spot-secondary mb-1">No unread articles</p> 87 - <p class="text-xs text-spot-muted">You're all caught up!</p> 88 - </div> 89 76 {{end}} 90 77 </div> 91 78 ··· 130 117 {{end}} 131 118 </div> 132 119 </div> 120 + {{else}} 121 + <div id="article-list"></div> 122 + <div class="bg-spot-surface rounded-xl py-16 px-6 text-center mb-8"> 123 + <div class="w-16 h-16 rounded-full bg-spot-hover flex items-center justify-center mb-4 mx-auto"> 124 + <svg class="w-8 h-8 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 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg> 125 + </div> 126 + <h2 class="text-xl font-semibold text-spot-text mb-2">You're all caught up!</h2> 127 + <p class="text-sm text-spot-secondary">No unread articles. Check back later for new content.</p> 128 + </div> 129 + 130 + {{if .ArticleRecommendations}} 131 + <div class="mb-8"> 132 + <h2 class="text-lg font-semibold text-spot-text mb-3">Recommended for you</h2> 133 + <div class="grid grid-cols-1 md:grid-cols-2 gap-3"> 134 + {{range .ArticleRecommendations}} 135 + {{template "recommendation-article-card.html" .}} 136 + {{end}} 137 + </div> 138 + </div> 139 + {{end}} 140 + 141 + {{if or .PersonalTrending .PeopleRecommendations .FeedRecommendations}} 142 + <div class="space-y-8"> 143 + {{if .PersonalTrending}} 144 + <div> 145 + <div class="flex items-center justify-between mb-4"> 146 + <h2 class="text-lg font-semibold text-spot-text">Trending in your network</h2> 147 + <a href="/trending?scope=for-me" class="text-xs text-spot-secondary hover:text-spot-green uppercase tracking-button transition">See all</a> 148 + </div> 149 + <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3"> 150 + {{range .PersonalTrending}} 151 + {{template "trending-card.html" .}} 152 + {{end}} 153 + </div> 154 + </div> 155 + {{end}} 156 + 157 + {{if .PeopleRecommendations}} 158 + <div> 159 + <h2 class="text-lg font-semibold text-spot-text mb-4">Similar readers</h2> 160 + <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3"> 161 + {{range .PeopleRecommendations}} 162 + {{template "profile-card.html" .}} 163 + {{end}} 164 + </div> 165 + </div> 166 + {{end}} 167 + 168 + {{if .FeedRecommendations}} 169 + <div> 170 + <h2 class="text-lg font-semibold text-spot-text mb-4">Recommended feeds</h2> 171 + <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3"> 172 + {{range .FeedRecommendations}} 173 + {{template "recommendation-feed-card.html" (dict "title" .Title "feed_url" .FeedURL "description" .Description "favicon_url" .FaviconURL "subscriber_count" .SubscriberCount "CSRFToken" $.CSRFToken)}} 174 + {{end}} 175 + </div> 176 + </div> 177 + {{end}} 178 + </div> 179 + {{end}} 180 + 181 + {{end}} 133 182 {{end}} 134 183 {{end}}