Write on the margins of the internet. Powered by the AT Protocol. margin.at
extension web atproto comments

cleanup

+10 -34
-4
web/src/assets/logo.svg
··· 1 - <svg width="265" height="231" viewBox="0 0 265 231" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> 2 - <path d="M0 230 V0 H199 V65.7156 H149.5 V115.216 H182.5 L199 131.716 V230 Z"/> 3 - <path d="M215 214.224 V230 H264.5 V0 H215.07 V16.2242 H248.5 V214.224 H215 Z"/> 4 - </svg>
+10 -10
web/src/components/common/Card.tsx
··· 137 137 item.target?.title || 138 138 item.title || 139 139 (pageUrl ? safeUrlHostname(pageUrl) : null); 140 - const pageHostname = pageUrl 141 - ? safeUrlHostname(pageUrl)?.replace("www.", "") 142 - : null; 143 140 const displayUrl = pageUrl 144 - ? pageUrl 145 - .replace(/^https?:\/\//, "") 146 - .replace(/^www\./, "") 147 - .replace(/\/$/, "") 141 + ? (() => { 142 + const clean = pageUrl 143 + .replace(/^https?:\/\//, "") 144 + .replace(/^www\./, "") 145 + .replace(/\/$/, ""); 146 + return clean.length > 60 ? clean.slice(0, 57) + "..." : clean; 147 + })() 148 148 : null; 149 149 const isBookmark = type === "bookmark"; 150 150 ··· 288 288 target="_blank" 289 289 rel="noopener noreferrer" 290 290 onClick={(e) => handleExternalClick(e, pageUrl)} 291 - className="inline-flex items-center gap-1 text-xs text-primary-600 dark:text-primary-400 hover:underline mt-0.5" 291 + className="inline-flex items-center gap-1 text-xs text-primary-600 dark:text-primary-400 hover:underline mt-0.5 max-w-full" 292 292 > 293 - <ExternalLink size={10} /> 294 - {displayUrl} 293 + <ExternalLink size={10} className="flex-shrink-0" /> 294 + <span className="truncate">{displayUrl}</span> 295 295 </a> 296 296 )} 297 297 </div>
-20
web/src/routes/paths.ts
··· 1 - export const ROUTES = { 2 - HOME: "/home", 3 - LOGIN: "/login", 4 - SETTINGS: "/settings", 5 - NOTIFICATIONS: "/notifications", 6 - BOOKMARKS: "/bookmarks", 7 - HIGHLIGHTS: "/highlights", 8 - COLLECTIONS: "/collections", 9 - PROFILE: "/profile", 10 - PROFILE_DID: "/profile/:did", 11 - NEW: "/new", 12 - URL: "/url", 13 - COLLECTION_DETAIL: "/:handle/collection/:rkey", 14 - ANNOTATION_AT: "/at/:did/:rkey", 15 - ANNOTATION_URI: "/annotation/:uri", 16 - ANNOTATION_HANDLE: "/:handle/annotation/:rkey", 17 - HIGHLIGHT_HANDLE: "/:handle/highlight/:rkey", 18 - BOOKMARK_HANDLE: "/:handle/bookmark/:rkey", 19 - USER_URL: "/:handle/url/*", 20 - } as const;