From bac31849833f0a884a9136b82809e52f3a7fb6a6 Mon Sep 17 00:00:00 2001 From: celine Date: Tue, 28 Oct 2025 18:45:34 -0400 Subject: [PATCH] added spacing between paragraphs in blockquotes --- .../[publication]/[rkey]/PostContent.tsx | 2 +- components/Blocks/QuoteEmbedBlock.tsx | 59 ------------------- components/Blocks/TextBlock/index.tsx | 13 +++- components/Blocks/index.tsx | 1 - 4 files changed, 12 insertions(+), 63 deletions(-) delete mode 100644 components/Blocks/QuoteEmbedBlock.tsx diff --git a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx index 790b9be3..f440bf4a 100644 --- a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx +++ b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx @@ -302,7 +302,7 @@ export let Block = ({ return ( // 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.
{ - return ( -
-
-
-
- Hello, this is a long quote that I am writing to you! I am so excited - that you decided to quote my stuff. I would love to take a moments and - just say whatever the heck i feel like. Unforunately for you, it is a - rather boring todo list. I need to add an author and pub name, i need - to add a back link, and i need to link about text formatting, if we - want to handle it. -
-
-
-
This was made to be quoted
-
celine
-
-
-
-
- ); -}; - -export const QuoteEmbedBlock = () => { - return ( -
-
- Hello, this is a long quote that I am writing to you! I am so excited - that you decided to quote my stuff. I would love to take a moments and - just say whatever the heck i feel like. Unforunately for you, it is a - rather boring todo list. I need to add an author and pub name, i need to - add a back link, and i need to link about text formatting, if we want to - handle it. -
-
- -
-
- This was made to be quoted and if it's very long, to truncate -
-
-
lab.leaflet.pub
- -
celine
-
-
-
-
-
- ); -}; diff --git a/components/Blocks/TextBlock/index.tsx b/components/Blocks/TextBlock/index.tsx index 55e40ecc..a2b9d3c6 100644 --- a/components/Blocks/TextBlock/index.tsx +++ b/components/Blocks/TextBlock/index.tsx @@ -67,6 +67,7 @@ export function TextBlock( className={props.className} first={first} pageType={props.pageType} + previousBlock={props.previousBlock} /> )} {permission && !props.preview && !isLocked?.data.value && ( @@ -124,6 +125,7 @@ export function RenderedTextBlock(props: { first?: boolean; pageType?: "canvas" | "doc"; type: BlockProps["type"]; + previousBlock?: BlockProps["previousBlock"]; }) { let initialFact = useEntity(props.entityID, "block/text"); let headingLevel = useEntity(props.entityID, "block/heading-level"); @@ -165,7 +167,7 @@ export function RenderedTextBlock(props: { style={{ wordBreak: "break-word" }} // better than tailwind break-all! className={` ${alignmentClass} - ${props.type === "blockquote" ? " blockquote " : ""} + ${props.type === "blockquote" ? (props.previousBlock?.type === "blockquote" ? `blockquote pt-3 ` : "blockquote") : ""} ${props.type === "heading" ? HeadingStyle[headingLevel?.data.value || 1] : ""} w-full whitespace-pre-wrap outline-hidden ${props.className} `} > @@ -338,7 +340,14 @@ export function BaseTextBlock(props: BlockProps & { className?: string }) {