Skip to content

Commit 641c7f4

Browse files
committed
feat: add gh icon (thanks to clanker)
1 parent c47ad87 commit 641c7f4

3 files changed

Lines changed: 32 additions & 8 deletions

File tree

index.html

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,11 @@
175175
position: relative;
176176
display: flex;
177177
flex-direction: column;
178-
gap: 0.75rem;
179178
padding: 1.15rem;
179+
min-height: 200px;
180180
border: 3px solid var(--overlay);
181181
border-radius: var(--radius);
182182
background: var(--surface);
183-
text-decoration: none;
184-
color: var(--text);
185183
overflow: hidden;
186184
transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
187185
}
@@ -193,6 +191,23 @@
193191
.card:hover .name { color: var(--foam); }
194192
.card:hover .arrow { opacity: 1; transform: none; }
195193

194+
.card-link {
195+
text-decoration: none;
196+
color: var(--text);
197+
display: flex;
198+
flex-direction: column;
199+
gap: 0.75rem;
200+
}
201+
202+
.gh-link {
203+
margin-top: auto;
204+
width: fit-content;
205+
color: var(--muted);
206+
transition: color 0.18s ease;
207+
}
208+
.gh-link:hover { color: var(--iris); }
209+
.gh-link svg { display: block; }
210+
196211
.avatar {
197212
position: relative;
198213
width: 3rem;

main.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ func buildCards(entries []WebringEntry) string {
5454
var b strings.Builder
5555
for _, e := range entries {
5656
name := html.EscapeString(e.Name)
57-
b.WriteString(`<a class="card" href="`)
58-
b.WriteString(html.EscapeString(e.Url))
59-
b.WriteString(`" rel="noopener" data-name="`)
57+
b.WriteString(`<div class="card" data-name="`)
6058
b.WriteString(name)
61-
b.WriteString(`"><span class="avatar">`)
59+
b.WriteString(`"><a class="card-link" href="`)
60+
b.WriteString(html.EscapeString(e.Url))
61+
b.WriteString(`" rel="noopener"><span class="avatar">`)
6262
b.WriteString(html.EscapeString(initial(e.Name)))
6363
if e.Gh != "" {
6464
b.WriteString(`<img src="https://avatars.githubusercontent.com/`)
@@ -70,6 +70,15 @@ func buildCards(entries []WebringEntry) string {
7070
b.WriteString(`</span><span class="host">`)
7171
b.WriteString(html.EscapeString(host(e.Url)))
7272
b.WriteString(`</span></span><span class="arrow">&rarr;</span></a>`)
73+
if e.Gh != "" {
74+
gh := html.EscapeString(e.Gh)
75+
b.WriteString(`<a class="gh-link" href="https://github.com/`)
76+
b.WriteString(gh)
77+
b.WriteString(`" target="_blank" rel="noopener" aria-label="`)
78+
b.WriteString(name)
79+
b.WriteString(` on GitHub"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" width="16" height="16"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg></a>`)
80+
}
81+
b.WriteString(`</div>`)
7382
}
7483
return b.String()
7584
}

wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "threadlocked",
33
"main": "./dist/worker.mjs",
4-
"compatibility_date": "2026-06-01",
4+
"compatibility_date": "2026-05-14",
55
"build": {
66
"command": "npm run build"
77
},

0 commit comments

Comments
 (0)