diff --git a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx
index b05cf0e4..c28af348 100644
--- a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx
+++ b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx
@@ -50,7 +50,7 @@ export function PostContent({
}) {
return (
{blocks.map((b, index) => {
@@ -103,8 +103,13 @@ let Block = ({
scrollMarginBottom: "4rem",
wordBreak: "break-word" as React.CSSProperties["wordBreak"],
},
- id: preview ? undefined : index.join("."),
+ id: preview
+ ? undefined
+ : pageId
+ ? `${pageId}~${index.join(".")}`
+ : index.join("."),
"data-index": index.join("."),
+ "data-page-id": pageId,
};
let alignment =
b.alignment === "lex:pub.leaflet.pages.linearDocument#textAlignRight"
@@ -175,6 +180,7 @@ let Block = ({
did={did}
key={i}
className={className}
+ pageId={pageId}
/>
))}
@@ -277,6 +283,7 @@ let Block = ({
plaintext={b.block.plaintext}
index={index}
preview={preview}
+ pageId={pageId}
/>
);
@@ -289,6 +296,7 @@ let Block = ({
plaintext={b.block.plaintext}
index={index}
preview={preview}
+ pageId={pageId}
/>
);
@@ -296,26 +304,46 @@ let Block = ({
if (b.block.level === 1)
return (
-
+
);
if (b.block.level === 2)
return (
-
+
);
if (b.block.level === 3)
return (
-
+
);
// if (b.block.level === 4) return
{b.block.plaintext}
;
// if (b.block.level === 5) return
{b.block.plaintext}
;
return (
-
+
);
}
@@ -331,6 +359,7 @@ function ListItem(props: {
did: string;
className?: string;
bskyPostData: AppBskyFeedDefs.PostView[];
+ pageId?: string;
}) {
let children = props.item.children?.length ? (
@@ -343,6 +372,7 @@ function ListItem(props: {
did={props.did}
key={index}
className={props.className}
+ pageId={props.pageId}
/>
))}
@@ -361,6 +391,7 @@ function ListItem(props: {
did={props.did}
isList
index={props.index}
+ pageId={props.pageId}
/>
{children}{" "}
diff --git a/app/lish/[did]/[publication]/[rkey]/PostPages.tsx b/app/lish/[did]/[publication]/[rkey]/PostPages.tsx
index 64c35486..c5f41da5 100644
--- a/app/lish/[did]/[publication]/[rkey]/PostPages.tsx
+++ b/app/lish/[did]/[publication]/[rkey]/PostPages.tsx
@@ -58,7 +58,6 @@ export const closePage = (page: string) =>
export function PostPages({
document,
blocks,
- name,
did,
profile,
preferences,
@@ -70,7 +69,6 @@ export function PostPages({
document_uri: string;
document: PostPageData;
blocks: PubLeafletPagesLinearDocument.Block[];
- name: string;
profile: ProfileViewDetailed;
pubRecord: PubLeafletPublication.Record;
did: string;
@@ -99,7 +97,6 @@ export function PostPages({