+7
-8
app/lish/[did]/[publication]/[rkey]/PostContent.tsx
+7
-8
app/lish/[did]/[publication]/[rkey]/PostContent.tsx
···
123
if (!alignment && PubLeafletBlocksImage.isMain(b.block))
124
alignment = "text-center justify-center";
125
126
-
// non text blocks, they need this padding, pt-3 sm:pt-4, which is applied in each case
127
let className = `
128
postBlockWrapper
129
min-h-7
130
-
pt-1 pb-2
131
-
${isList && "isListItem pb-0! "}
132
${alignment}
133
`;
134
···
144
parentPageId={pageId}
145
did={did}
146
bskyPostData={bskyPostData}
147
/>
148
);
149
}
···
151
let uri = b.block.postRef.uri;
152
let post = bskyPostData.find((p) => p.uri === uri);
153
if (!post) return <div>no prefetched post rip</div>;
154
-
return <PubBlueskyPostBlock post={post} />;
155
}
156
case PubLeafletBlocksIframe.isMain(b.block): {
157
return (
···
200
href={b.block.src}
201
target="_blank"
202
className={`
203
-
my-2
204
externalLinkBlock flex relative group/linkBlock
205
h-[104px] w-full bg-bg-page overflow-hidden text-primary hover:no-underline no-underline
206
hover:border-accent-contrast shadow-sm
···
252
alt={b.block.alt}
253
height={b.block.aspectRatio?.height}
254
width={b.block.aspectRatio?.width}
255
-
className={`pt-3! sm:pt-4! rounded-md ${className}`}
256
src={blobRefToSrc(b.block.image.ref, did)}
257
/>
258
{b.block.alt && (
···
273
}
274
case PubLeafletBlocksBlockquote.isMain(b.block): {
275
return (
276
-
// highly unfortunate hack so that the border-l on blockquote is the height of just the text rather than the height of the block, which includes padding.
277
<blockquote
278
className={` blockquote py-0! mb-2! last:mb-3! sm:last:mb-4! first:mt-2! sm:first:pt-3 ${className} ${PubLeafletBlocksBlockquote.isMain(previousBlock?.block) ? "-mt-2!" : "mt-1!"}`}
279
{...blockProps}
···
377
))}
378
</ul>
379
) : null;
380
-
381
return (
382
<li className={`pb-0! flex flex-row gap-2`}>
383
<div
···
123
if (!alignment && PubLeafletBlocksImage.isMain(b.block))
124
alignment = "text-center justify-center";
125
126
let className = `
127
postBlockWrapper
128
min-h-7
129
+
mt-1 mb-2
130
+
${isList && "isListItem mb-0! "}
131
${alignment}
132
`;
133
···
143
parentPageId={pageId}
144
did={did}
145
bskyPostData={bskyPostData}
146
+
className={className}
147
/>
148
);
149
}
···
151
let uri = b.block.postRef.uri;
152
let post = bskyPostData.find((p) => p.uri === uri);
153
if (!post) return <div>no prefetched post rip</div>;
154
+
return <PubBlueskyPostBlock post={post} className={className} />;
155
}
156
case PubLeafletBlocksIframe.isMain(b.block): {
157
return (
···
200
href={b.block.src}
201
target="_blank"
202
className={`
203
+
${className}
204
externalLinkBlock flex relative group/linkBlock
205
h-[104px] w-full bg-bg-page overflow-hidden text-primary hover:no-underline no-underline
206
hover:border-accent-contrast shadow-sm
···
252
alt={b.block.alt}
253
height={b.block.aspectRatio?.height}
254
width={b.block.aspectRatio?.width}
255
+
className={`rounded-lg border border-transparent ${className}`}
256
src={blobRefToSrc(b.block.image.ref, did)}
257
/>
258
{b.block.alt && (
···
273
}
274
case PubLeafletBlocksBlockquote.isMain(b.block): {
275
return (
276
+
// all this margin stuff is a highly unfortunate hack so that the border-l on blockquote is the height of just the text rather than the height of the block, which includes padding.
277
<blockquote
278
className={` blockquote py-0! mb-2! last:mb-3! sm:last:mb-4! first:mt-2! sm:first:pt-3 ${className} ${PubLeafletBlocksBlockquote.isMain(previousBlock?.block) ? "-mt-2!" : "mt-1!"}`}
279
{...blockProps}
···
377
))}
378
</ul>
379
) : null;
380
return (
381
<li className={`pb-0! flex flex-row gap-2`}>
382
<div
+1
-1
app/lish/[did]/[publication]/[rkey]/PostPages.tsx
+1
-1
app/lish/[did]/[publication]/[rkey]/PostPages.tsx
+6
-1
app/lish/[did]/[publication]/[rkey]/PublishBskyPostBlock.tsx
+6
-1
app/lish/[did]/[publication]/[rkey]/PublishBskyPostBlock.tsx
···
16
} from "components/Blocks/BlueskyPostBlock/BlueskyEmbed";
17
import { BlueskyRichText } from "components/Blocks/BlueskyPostBlock/BlueskyRichText";
18
19
-
export const PubBlueskyPostBlock = ({ post }: { post: PostView }) => {
20
switch (true) {
21
case AppBskyFeedDefs.isBlockedPost(post) ||
22
AppBskyFeedDefs.isBlockedAuthor(post) ||
···
46
return (
47
<div
48
className={`
49
block-border
50
mb-2
51
flex flex-col gap-2 relative w-full overflow-hidden group/blueskyPostBlock sm:p-3 p-2 text-sm text-secondary bg-bg-page
···
16
} from "components/Blocks/BlueskyPostBlock/BlueskyEmbed";
17
import { BlueskyRichText } from "components/Blocks/BlueskyPostBlock/BlueskyRichText";
18
19
+
export const PubBlueskyPostBlock = (props: {
20
+
post: PostView;
21
+
className: string;
22
+
}) => {
23
+
let post = props.post;
24
switch (true) {
25
case AppBskyFeedDefs.isBlockedPost(post) ||
26
AppBskyFeedDefs.isBlockedAuthor(post) ||
···
50
return (
51
<div
52
className={`
53
+
${props.className}
54
block-border
55
mb-2
56
flex flex-col gap-2 relative w-full overflow-hidden group/blueskyPostBlock sm:p-3 p-2 text-sm text-secondary bg-bg-page
+1
app/lish/[did]/[publication]/[rkey]/PublishedPageBlock.tsx
+1
app/lish/[did]/[publication]/[rkey]/PublishedPageBlock.tsx