tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
28
pulls
pipelines
remove publications and fix external url logic
awarm.space
1 month ago
26b286f8
827b64a5
+5
-9
2 changed files
expand all
collapse all
unified
split
app
(home-pages)
reader
layout.tsx
components
PostListing.tsx
+1
-7
app/(home-pages)/reader/layout.tsx
···
66
66
</Link>
67
67
))}
68
68
</div>
69
69
-
<div className="sm:block grow">
70
70
-
{(pathname === "/reader" || pathname === "/") && (
71
71
-
<div className="place-self-end text text-tertiary text-sm">
72
72
-
Publications
73
73
-
</div>
74
74
-
)}
75
75
-
</div>
69
69
+
<div className="sm:block grow" />
76
70
</Header>
77
71
{children}
78
72
</div>
+4
-2
components/PostListing.tsx
···
8
8
NormalizedDocument,
9
9
NormalizedPublication,
10
10
} from "src/utils/normalizeRecords";
11
11
+
import { hasLeafletContent } from "lexicons/src/normalize";
11
12
import type { Post } from "app/(home-pages)/reader/getReaderFeed";
12
13
13
14
import Link from "next/link";
···
140
141
href={props.publication.href}
141
142
pubRecord={pubRecord}
142
143
uri={props.publication.uri}
144
144
+
postRecord={postRecord}
143
145
/>
144
146
)}
145
147
<div className="flex flex-row justify-between gap-2 text-xs items-center w-full">
···
172
174
href: string;
173
175
pubRecord: NormalizedPublication;
174
176
uri: string;
177
177
+
postRecord: NormalizedDocument;
175
178
}) => {
176
176
-
let isLeaflet =
177
177
-
props.pubRecord.theme?.$type === "pub.leaflet.publication#theme";
179
179
+
let isLeaflet = hasLeafletContent(props.postRecord);
178
180
let cleanUrl = props.pubRecord.url
179
181
?.replace(/^https?:\/\//, "")
180
182
.replace(/^www\./, "");