tangled
alpha
login
or
join now
margin.at
/
margin
87
fork
atom
Write on the margins of the internet. Powered by the AT Protocol.
margin.at
extension
web
atproto
comments
87
fork
atom
overview
issues
4
pulls
1
pipelines
cleanup
scanash.com
1 month ago
3443d8de
68a1999e
+10
-34
3 changed files
expand all
collapse all
unified
split
web
src
assets
logo.svg
components
common
Card.tsx
routes
paths.ts
-4
web/src/assets/logo.svg
···
1
1
-
<svg width="265" height="231" viewBox="0 0 265 231" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
2
-
<path d="M0 230 V0 H199 V65.7156 H149.5 V115.216 H182.5 L199 131.716 V230 Z"/>
3
3
-
<path d="M215 214.224 V230 H264.5 V0 H215.07 V16.2242 H248.5 V214.224 H215 Z"/>
4
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
140
-
const pageHostname = pageUrl
141
141
-
? safeUrlHostname(pageUrl)?.replace("www.", "")
142
142
-
: null;
143
140
const displayUrl = pageUrl
144
144
-
? pageUrl
145
145
-
.replace(/^https?:\/\//, "")
146
146
-
.replace(/^www\./, "")
147
147
-
.replace(/\/$/, "")
141
141
+
? (() => {
142
142
+
const clean = pageUrl
143
143
+
.replace(/^https?:\/\//, "")
144
144
+
.replace(/^www\./, "")
145
145
+
.replace(/\/$/, "");
146
146
+
return clean.length > 60 ? clean.slice(0, 57) + "..." : clean;
147
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
291
-
className="inline-flex items-center gap-1 text-xs text-primary-600 dark:text-primary-400 hover:underline mt-0.5"
291
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
293
-
<ExternalLink size={10} />
294
294
-
{displayUrl}
293
293
+
<ExternalLink size={10} className="flex-shrink-0" />
294
294
+
<span className="truncate">{displayUrl}</span>
295
295
</a>
296
296
)}
297
297
</div>
-20
web/src/routes/paths.ts
···
1
1
-
export const ROUTES = {
2
2
-
HOME: "/home",
3
3
-
LOGIN: "/login",
4
4
-
SETTINGS: "/settings",
5
5
-
NOTIFICATIONS: "/notifications",
6
6
-
BOOKMARKS: "/bookmarks",
7
7
-
HIGHLIGHTS: "/highlights",
8
8
-
COLLECTIONS: "/collections",
9
9
-
PROFILE: "/profile",
10
10
-
PROFILE_DID: "/profile/:did",
11
11
-
NEW: "/new",
12
12
-
URL: "/url",
13
13
-
COLLECTION_DETAIL: "/:handle/collection/:rkey",
14
14
-
ANNOTATION_AT: "/at/:did/:rkey",
15
15
-
ANNOTATION_URI: "/annotation/:uri",
16
16
-
ANNOTATION_HANDLE: "/:handle/annotation/:rkey",
17
17
-
HIGHLIGHT_HANDLE: "/:handle/highlight/:rkey",
18
18
-
BOOKMARK_HANDLE: "/:handle/bookmark/:rkey",
19
19
-
USER_URL: "/:handle/url/*",
20
20
-
} as const;