diff --git a/app/globals.css b/app/globals.css index 07ac8d95..6c368e99 100644 --- a/app/globals.css +++ b/app/globals.css @@ -490,7 +490,7 @@ pre.shiki { animation-timing-function: ease-in; } -.postPageContent { +.footnote-scope { counter-reset: footnote; } .footnote-ref { diff --git a/app/lish/[did]/[publication]/[rkey]/Footnotes/PublishedFootnoteSideColumn.tsx b/app/lish/[did]/[publication]/[rkey]/Footnotes/PublishedFootnoteSideColumn.tsx index cdfaca37..92a988e3 100644 --- a/app/lish/[did]/[publication]/[rkey]/Footnotes/PublishedFootnoteSideColumn.tsx +++ b/app/lish/[did]/[publication]/[rkey]/Footnotes/PublishedFootnoteSideColumn.tsx @@ -12,6 +12,7 @@ type PublishedFootnoteItem = PublishedFootnote & { export function PublishedFootnoteSideColumn(props: { footnotes: PublishedFootnote[]; + fullPageScroll?: boolean; }) { let items: PublishedFootnoteItem[] = props.footnotes.map((fn) => ({ ...fn, @@ -47,6 +48,7 @@ export function PublishedFootnoteSideColumn(props: { 0} + fullPageScroll={props.fullPageScroll} getAnchorSelector={getAnchorSelector} renderItem={renderItem} /> diff --git a/app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx b/app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx index ade4ed02..87658690 100644 --- a/app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx +++ b/app/lish/[did]/[publication]/[rkey]/LinearDocumentPage.tsx @@ -72,7 +72,7 @@ export function LinearDocumentPage({ pageOptions={pageOptions} footnoteSideColumn={ !props.hasContentToRight ? ( - + ) : undefined } > diff --git a/app/lish/[did]/[publication]/[rkey]/StaticPostContent.tsx b/app/lish/[did]/[publication]/[rkey]/StaticPostContent.tsx index 1f25bbba..0a035432 100644 --- a/app/lish/[did]/[publication]/[rkey]/StaticPostContent.tsx +++ b/app/lish/[did]/[publication]/[rkey]/StaticPostContent.tsx @@ -28,7 +28,7 @@ export function StaticPostContent({ did: string; }) { return ( -
+
{blocks.map((b, index) => { return ; })} diff --git a/components/Footnotes/FootnotePopover.tsx b/components/Footnotes/FootnotePopover.tsx index d0316fdd..f839517c 100644 --- a/components/Footnotes/FootnotePopover.tsx +++ b/components/Footnotes/FootnotePopover.tsx @@ -44,7 +44,7 @@ export function FootnotePopover() { // were inserted out of order within a block. let displayIndex = useMemo(() => { if (!anchorElement || !footnote) return footnote?.index ?? 0; - let container = anchorElement.closest(".postPageContent"); + let container = anchorElement.closest('.footnote-scope'); if (!container) return footnote.index; let allRefs = Array.from(container.querySelectorAll(".footnote-ref")); let pos = allRefs.indexOf(anchorElement); diff --git a/components/Footnotes/FootnoteSideColumn.tsx b/components/Footnotes/FootnoteSideColumn.tsx index e07622b6..f73fac18 100644 --- a/components/Footnotes/FootnoteSideColumn.tsx +++ b/components/Footnotes/FootnoteSideColumn.tsx @@ -16,6 +16,7 @@ type EditorFootnoteItem = { export function FootnoteSideColumn(props: { pageEntityID: string; visible: boolean; + fullPageScroll?: boolean; }) { let { footnotes } = useFootnoteContext(); let { permissions } = useEntitySetContext(); @@ -54,6 +55,7 @@ export function FootnoteSideColumn(props: { diff --git a/components/Footnotes/FootnoteSideColumnLayout.tsx b/components/Footnotes/FootnoteSideColumnLayout.tsx index 2f326f40..0fac2ddd 100644 --- a/components/Footnotes/FootnoteSideColumnLayout.tsx +++ b/components/Footnotes/FootnoteSideColumnLayout.tsx @@ -13,6 +13,7 @@ const GAP = 4; export function FootnoteSideColumnLayout(props: { items: T[]; visible: boolean; + fullPageScroll?: boolean; getAnchorSelector: (item: T) => string; renderItem: (item: T & { top: number }) => ReactNode; }) { @@ -106,7 +107,11 @@ export function FootnoteSideColumnLayout(props: { return (