atproto pds in zig pds.zat.dev
pds atproto
26

Configure Feed

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

Simplify collection rows

zzstoatzz (May 24, 2026, 10:17 PM -0500) 28fbe058 d2b4139b

+6 -21
+4 -7
src/http/landing/assets.zig
··· 89 89 \\.meta { grid-column: 2; display: flex; align-items: center; gap: 9px; color: var(--dim); font-size: 11px; line-height: 1; } 90 90 \\.meta span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; } 91 91 \\.meta span + span::before { content: ""; width: 4px; height: 4px; border-radius: 999px; background: var(--line); } 92 - \\.collections { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; } 93 - \\.collection { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); overflow: hidden; } 94 - \\.collection strong { display: block; color: var(--text); font-size: 13px; font-weight: 650; } 95 - \\.collection code, .collection small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } 96 - \\.collection code { margin-top: 1px; color: var(--muted); font-size: 11px; } 97 - \\.collection small { margin-top: 1px; color: var(--dim); font-size: 10px; } 98 - \\.collection span { color: var(--muted); font-size: 12px; } 92 + \\.collections { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0; } 93 + \\.collection { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0 10px; border-bottom: 1px solid var(--line); overflow: hidden; } 94 + \\.collection code { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 12px; } 95 + \\.collection span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; } 99 96 \\.collection i { position: absolute; left: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--green), var(--accent), var(--pink)); } 100 97 \\.empty { color: var(--muted); margin: 0; } 101 98 \\footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 42px; color: var(--dim); font-size: 11px; }
+2 -14
src/http/landing/mod.zig
··· 68 68 const max_count = collections[0].count; 69 69 for (collections) |summary| { 70 70 const collection = try escapeHtml(allocator, summary.collection); 71 - const label = try escapeHtml(allocator, nsidLeaf(summary.collection)); 72 - const namespace = try escapeHtml(allocator, nsidNamespace(summary.collection)); 73 71 const width = if (max_count == 0) 0 else @max(@as(u64, 8), summary.count * 100 / max_count); 74 72 try collection_items.writer.print( 75 73 \\<li class="collection"> 76 - \\ <div><strong>{s}</strong><code>{s}</code><small>{s}</small></div> 74 + \\ <code>{s}</code> 77 75 \\ <span>{d}</span> 78 76 \\ <i style="width:{d}%"></i> 79 77 \\</li> 80 - , .{ label, namespace, collection, summary.count, width }); 78 + , .{ collection, summary.count, width }); 81 79 } 82 80 } 83 81 ··· 180 178 "<span class=\"avatar\"><img src=\"/xrpc/com.atproto.sync.getBlob?did={s}&cid={s}\" alt=\"\"></span>", 181 179 .{ did, cid }, 182 180 ); 183 - } 184 - 185 - fn nsidLeaf(nsid: []const u8) []const u8 { 186 - if (std.mem.lastIndexOfScalar(u8, nsid, '.')) |idx| return nsid[idx + 1 ..]; 187 - return nsid; 188 - } 189 - 190 - fn nsidNamespace(nsid: []const u8) []const u8 { 191 - if (std.mem.lastIndexOfScalar(u8, nsid, '.')) |idx| return nsid[0..idx]; 192 - return ""; 193 181 } 194 182 195 183 fn initialFor(handle: []const u8) u8 {