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

Standardize button styling across UI componentsUnverified

Julien Robert committed 2026-05-27T00:08:32+02:00 Browse files
898abf9 parent: f6971ab
modified internal/tmpl/partials/article-card-expanded.html +1 -1
@@ -35,7 +35,7 @@
3535 </div>
3636 {{else}}
3737 <div class="mt-3 pt-3 border-t border-spot-divider">
38- <a href="/articles/{{.ID}}{{.NavSuffix}}" class="inline-flex items-center gap-1.5 text-[10px] text-spot-secondary hover:text-spot-green uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-hover hover:bg-spot-green/15 transition">
38+ <a href="/articles/{{.ID}}{{.NavSuffix}}" class="inline-flex items-center gap-1.5 text-[10px] text-spot-text hover:text-spot-green hover:border-spot-green/20 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-surface border border-spot-divider hover:bg-spot-green/10 transition">
3939 Read full article
4040 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/></svg>
4141 </a>
@@ -35,7 +35,7 @@
35 </div>35 </div>
36 {{else}}36 {{else}}
37 <div class="mt-3 pt-3 border-t border-spot-divider">37 <div class="mt-3 pt-3 border-t border-spot-divider">
38- <a href="/articles/{{.ID}}{{.NavSuffix}}" class="inline-flex items-center gap-1.5 text-[10px] text-spot-secondary hover:text-spot-green uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-hover hover:bg-spot-green/15 transition">38+ <a href="/articles/{{.ID}}{{.NavSuffix}}" class="inline-flex items-center gap-1.5 text-[10px] text-spot-text hover:text-spot-green hover:border-spot-green/20 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-surface border border-spot-divider hover:bg-spot-green/10 transition">
39 Read full article39 Read full article
40 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/></svg>40 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/></svg>
41 </a>41 </a>
modified internal/tmpl/partials/article-card.html +2 -2
@@ -17,13 +17,13 @@
1717 </div>
1818 <div class="grid grid-cols-1 gap-2 shrink-0 pt-0.5">
1919 {{template "like-button.html" .}}
20- <button id="read-btn-{{.ID}}" hx-post="/articles/{{.ID}}/{{if .IsRead.Bool}}unread{{else}}read{{end}}" hx-target="#read-btn-{{.ID}}" hx-swap="outerHTML" title="{{if .IsRead.Bool}}Mark as unread{{else}}Mark as read{{end}}" class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-green hover:bg-spot-green/15 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-hover transition w-full">
20+ <button id="read-btn-{{.ID}}" hx-post="/articles/{{.ID}}/{{if .IsRead.Bool}}unread{{else}}read{{end}}" hx-target="#read-btn-{{.ID}}" hx-swap="outerHTML" title="{{if .IsRead.Bool}}Mark as unread{{else}}Mark as read{{end}}" class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-green hover:bg-spot-green/10 hover:border-spot-green/20 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-surface border border-spot-divider transition w-full">
2121 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>
2222 <span>{{if .IsRead.Bool}}Unread{{else}}Read{{end}}</span>
2323 </button>
2424 {{if .DismissURL}}
2525 <button hx-post="{{.DismissURL}}" hx-target="closest article" hx-swap="delete" title="Remove from recommendations"
26- class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-red hover:bg-spot-red/15 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-hover transition w-full">
26+ class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-red hover:bg-spot-red/10 hover:border-spot-red/20 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-surface border border-spot-divider transition w-full">
2727 <input type="hidden" name="{{.DismissField}}" value="{{.DismissValue}}">
2828 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>
2929 <span>Hide</span>
@@ -17,13 +17,13 @@
17 </div>17 </div>
18 <div class="grid grid-cols-1 gap-2 shrink-0 pt-0.5">18 <div class="grid grid-cols-1 gap-2 shrink-0 pt-0.5">
19 {{template "like-button.html" .}}19 {{template "like-button.html" .}}
20- <button id="read-btn-{{.ID}}" hx-post="/articles/{{.ID}}/{{if .IsRead.Bool}}unread{{else}}read{{end}}" hx-target="#read-btn-{{.ID}}" hx-swap="outerHTML" title="{{if .IsRead.Bool}}Mark as unread{{else}}Mark as read{{end}}" class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-green hover:bg-spot-green/15 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-hover transition w-full">20+ <button id="read-btn-{{.ID}}" hx-post="/articles/{{.ID}}/{{if .IsRead.Bool}}unread{{else}}read{{end}}" hx-target="#read-btn-{{.ID}}" hx-swap="outerHTML" title="{{if .IsRead.Bool}}Mark as unread{{else}}Mark as read{{end}}" class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-green hover:bg-spot-green/10 hover:border-spot-green/20 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-surface border border-spot-divider transition w-full">
21 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>21 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>
22 <span>{{if .IsRead.Bool}}Unread{{else}}Read{{end}}</span>22 <span>{{if .IsRead.Bool}}Unread{{else}}Read{{end}}</span>
23 </button>23 </button>
24 {{if .DismissURL}}24 {{if .DismissURL}}
25 <button hx-post="{{.DismissURL}}" hx-target="closest article" hx-swap="delete" title="Remove from recommendations"25 <button hx-post="{{.DismissURL}}" hx-target="closest article" hx-swap="delete" title="Remove from recommendations"
26- class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-red hover:bg-spot-red/15 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-hover transition w-full">26+ class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-red hover:bg-spot-red/10 hover:border-spot-red/20 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-surface border border-spot-divider transition w-full">
27 <input type="hidden" name="{{.DismissField}}" value="{{.DismissValue}}">27 <input type="hidden" name="{{.DismissField}}" value="{{.DismissValue}}">
28 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>28 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>
29 <span>Hide</span>29 <span>Hide</span>
modified internal/tmpl/partials/digest.html +1 -1
@@ -30,7 +30,7 @@
3030 <form hx-post="/digest/mark-read" hx-confirm="Mark these articles as read?" hx-target="#digest" hx-swap="outerHTML">
3131 {{csrfInput .CSRFToken}}
3232 {{range .ArticleIDs}}<input type="hidden" name="ids" value="{{.}}">{{end}}
33- <button type="submit" class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-green hover:bg-spot-green/15 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-hover transition">
33+ <button type="submit" class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-green hover:bg-spot-green/10 hover:border-spot-green/20 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-surface border border-spot-divider transition">
3434 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>
3535 <span>Read</span>
3636 </button>
@@ -30,7 +30,7 @@
30 <form hx-post="/digest/mark-read" hx-confirm="Mark these articles as read?" hx-target="#digest" hx-swap="outerHTML">30 <form hx-post="/digest/mark-read" hx-confirm="Mark these articles as read?" hx-target="#digest" hx-swap="outerHTML">
31 {{csrfInput .CSRFToken}}31 {{csrfInput .CSRFToken}}
32 {{range .ArticleIDs}}<input type="hidden" name="ids" value="{{.}}">{{end}}32 {{range .ArticleIDs}}<input type="hidden" name="ids" value="{{.}}">{{end}}
33- <button type="submit" class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-green hover:bg-spot-green/15 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-hover transition">33+ <button type="submit" class="group inline-flex items-center justify-center gap-1 text-[10px] text-spot-text hover:text-spot-green hover:bg-spot-green/10 hover:border-spot-green/20 uppercase tracking-button px-2 py-0.5 rounded-pill bg-spot-surface border border-spot-divider transition">
34 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>34 <svg class="w-3 h-3" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/></svg>
35 <span>Read</span>35 <span>Read</span>
36 </button>36 </button>
modified internal/tmpl/partials/like-button.html +1 -1
@@ -1,7 +1,7 @@
11 {{define "like-button.html"}}
22 <button hx-post="/articles/{{.ID}}/like" hx-target="this" hx-swap="outerHTML"
33 title="{{if .HasLiked}}Unlike{{else}}Like{{end}}"
4- class="group inline-flex items-center justify-center gap-1 text-[10px] uppercase tracking-button px-2 py-0.5 rounded-pill transition w-full {{if .HasLiked}}text-spot-red bg-spot-red/15 hover:bg-spot-red/25{{else}}text-spot-text bg-spot-hover hover:text-spot-red hover:bg-spot-red/15{{end}}">
4+ class="group inline-flex items-center justify-center gap-1 text-[10px] uppercase tracking-button px-2 py-0.5 rounded-pill transition w-full {{if .HasLiked}}text-spot-red bg-spot-red/15 hover:bg-spot-red/25 border border-spot-red/20{{else}}text-spot-text bg-spot-surface border border-spot-divider hover:text-spot-red hover:bg-spot-red/10 hover:border-spot-red/20{{end}}">
55 <svg class="w-3 h-3" fill="{{if .HasLiked}}currentColor{{else}}none{{end}}" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
66 <span>{{.LikeCount}}</span>
77 </button>
@@ -1,7 +1,7 @@
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 title="{{if .HasLiked}}Unlike{{else}}Like{{end}}"3 title="{{if .HasLiked}}Unlike{{else}}Like{{end}}"
4- class="group inline-flex items-center justify-center gap-1 text-[10px] uppercase tracking-button px-2 py-0.5 rounded-pill transition w-full {{if .HasLiked}}text-spot-red bg-spot-red/15 hover:bg-spot-red/25{{else}}text-spot-text bg-spot-hover hover:text-spot-red hover:bg-spot-red/15{{end}}">4+ class="group inline-flex items-center justify-center gap-1 text-[10px] uppercase tracking-button px-2 py-0.5 rounded-pill transition w-full {{if .HasLiked}}text-spot-red bg-spot-red/15 hover:bg-spot-red/25 border border-spot-red/20{{else}}text-spot-text bg-spot-surface border border-spot-divider hover:text-spot-red hover:bg-spot-red/10 hover:border-spot-red/20{{end}}">
5 <svg class="w-3 h-3" fill="{{if .HasLiked}}currentColor{{else}}none{{end}}" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>5 <svg class="w-3 h-3" fill="{{if .HasLiked}}currentColor{{else}}none{{end}}" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">{{template "icon-heart"}}</svg>
6 <span>{{.LikeCount}}</span>6 <span>{{.LikeCount}}</span>
7 </button>7 </button>
modified static/input.css +2 -2
@@ -6,7 +6,7 @@
66 :root {
77 color-scheme: light dark;
88 --spot-bg: #f2f0eb;
9- --spot-surface: #ffffff;
9+ --spot-surface: #fbfaf8;
1010 --spot-hover: #edebe9;
1111 --spot-hover-50: rgba(237,235,233,0.5);
1212 --spot-text: rgba(0,0,0,0.87);
@@ -48,7 +48,7 @@
4848 [data-theme="light"] {
4949 color-scheme: light;
5050 --spot-bg: #f2f0eb;
51- --spot-surface: #ffffff;
51+ --spot-surface: #fbfaf8;
5252 --spot-hover: #edebe9;
5353 --spot-hover-50: rgba(237,235,233,0.5);
5454 --spot-text: rgba(0,0,0,0.87);
@@ -6,7 +6,7 @@
6 :root {6 :root {
7 color-scheme: light dark;7 color-scheme: light dark;
8 --spot-bg: #f2f0eb;8 --spot-bg: #f2f0eb;
9- --spot-surface: #ffffff;9+ --spot-surface: #fbfaf8;
10 --spot-hover: #edebe9;10 --spot-hover: #edebe9;
11 --spot-hover-50: rgba(237,235,233,0.5);11 --spot-hover-50: rgba(237,235,233,0.5);
12 --spot-text: rgba(0,0,0,0.87);12 --spot-text: rgba(0,0,0,0.87);
@@ -48,7 +48,7 @@
48 [data-theme="light"] {48 [data-theme="light"] {
49 color-scheme: light;49 color-scheme: light;
50 --spot-bg: #f2f0eb;50 --spot-bg: #f2f0eb;
51- --spot-surface: #ffffff;51+ --spot-surface: #fbfaf8;
52 --spot-hover: #edebe9;52 --spot-hover: #edebe9;
53 --spot-hover-50: rgba(237,235,233,0.5);53 --spot-hover-50: rgba(237,235,233,0.5);
54 --spot-text: rgba(0,0,0,0.87);54 --spot-text: rgba(0,0,0,0.87);