a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added spacing between paragraphs in blockquotes

celine bac31849 5cfe8053

+12 -63
+1 -1
app/lish/[did]/[publication]/[rkey]/PostContent.tsx
··· 302 302 return ( 303 303 // 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. 304 304 <blockquote 305 - 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!"}`} 305 + className={` blockquote py-0! mb-2! ${className} ${PubLeafletBlocksBlockquote.isMain(previousBlock?.block) ? "-mt-2! pt-3!" : "mt-1!"}`} 306 306 {...blockProps} 307 307 > 308 308 <TextBlock
-59
components/Blocks/QuoteEmbedBlock.tsx
··· 1 - import { GoToArrow } from "components/Icons/GoToArrow"; 2 - import { ExternalLinkBlock } from "./ExternalLinkBlock"; 3 - import { Separator } from "components/Layout"; 4 - 5 - export const QuoteEmbedBlockLine = () => { 6 - return ( 7 - <div className="quoteEmbedBlock flex sm:mx-4 mx-3 my-3 sm:my-4 text-secondary text-sm italic"> 8 - <div className="w-2 h-full bg-border" /> 9 - <div className="flex flex-col pl-4"> 10 - <div className="quoteEmbedContent "> 11 - Hello, this is a long quote that I am writing to you! I am so excited 12 - that you decided to quote my stuff. I would love to take a moments and 13 - just say whatever the heck i feel like. Unforunately for you, it is a 14 - rather boring todo list. I need to add an author and pub name, i need 15 - to add a back link, and i need to link about text formatting, if we 16 - want to handle it. 17 - </div> 18 - <div className="quoteEmbedFooter flex gap-2 pt-2 "> 19 - <div className="flex flex-col leading-tight grow"> 20 - <div className="font-bold ">This was made to be quoted</div> 21 - <div className="text-tertiary text-xs">celine</div> 22 - </div> 23 - </div> 24 - </div> 25 - </div> 26 - ); 27 - }; 28 - 29 - export const QuoteEmbedBlock = () => { 30 - return ( 31 - <div className="quoteEmbedBlock transparent-container sm:mx-4 mx-3 my-3 sm:my-4 text-secondary text-sm"> 32 - <div className="quoteEmbedContent p-3"> 33 - Hello, this is a long quote that I am writing to you! I am so excited 34 - that you decided to quote my stuff. I would love to take a moments and 35 - just say whatever the heck i feel like. Unforunately for you, it is a 36 - rather boring todo list. I need to add an author and pub name, i need to 37 - add a back link, and i need to link about text formatting, if we want to 38 - handle it. 39 - </div> 40 - <hr className="border-border-light" /> 41 - <a 42 - className="quoteEmbedFooter flex max-w-full gap-2 px-3 py-2 hover:no-underline! text-secondary" 43 - href="#" 44 - > 45 - <div className="flex flex-col w-[calc(100%-28px)] grow"> 46 - <div className="font-bold w-full truncate"> 47 - This was made to be quoted and if it's very long, to truncate 48 - </div> 49 - <div className="flex gap-[6px] text-tertiary text-xs items-center"> 50 - <div className="underline">lab.leaflet.pub</div> 51 - <Separator classname="h-2" /> 52 - <div>celine</div> 53 - </div> 54 - </div> 55 - <div className=" shrink-0 pt-px bg-test w-5 h-5 rounded-full"></div> 56 - </a> 57 - </div> 58 - ); 59 - };
+11 -2
components/Blocks/TextBlock/index.tsx
··· 67 67 className={props.className} 68 68 first={first} 69 69 pageType={props.pageType} 70 + previousBlock={props.previousBlock} 70 71 /> 71 72 )} 72 73 {permission && !props.preview && !isLocked?.data.value && ( ··· 124 125 first?: boolean; 125 126 pageType?: "canvas" | "doc"; 126 127 type: BlockProps["type"]; 128 + previousBlock?: BlockProps["previousBlock"]; 127 129 }) { 128 130 let initialFact = useEntity(props.entityID, "block/text"); 129 131 let headingLevel = useEntity(props.entityID, "block/heading-level"); ··· 165 167 style={{ wordBreak: "break-word" }} // better than tailwind break-all! 166 168 className={` 167 169 ${alignmentClass} 168 - ${props.type === "blockquote" ? " blockquote " : ""} 170 + ${props.type === "blockquote" ? (props.previousBlock?.type === "blockquote" ? `blockquote pt-3 ` : "blockquote") : ""} 169 171 ${props.type === "heading" ? HeadingStyle[headingLevel?.data.value || 1] : ""} 170 172 w-full whitespace-pre-wrap outline-hidden ${props.className} `} 171 173 > ··· 338 340 <div 339 341 className={`flex items-center justify-between w-full 340 342 ${selected && props.pageType === "canvas" && "bg-bg-page rounded-md"} 341 - ${props.type === "blockquote" ? " blockquote " : ""} 343 + ${ 344 + props.type === "blockquote" 345 + ? props.previousBlock?.type === "blockquote" && !props.listData 346 + ? "blockquote pt-3" 347 + : "blockquote" 348 + : "" 349 + } 350 + 342 351 `} 343 352 > 344 353 <pre
-1
components/Blocks/index.tsx
··· 16 16 import { Block } from "./Block"; 17 17 import { useEffect } from "react"; 18 18 import { addShortcut } from "src/shortcuts"; 19 - import { QuoteEmbedBlock } from "./QuoteEmbedBlock"; 20 19 import { useHandleDrop } from "./useHandleDrop"; 21 20 22 21 export function Blocks(props: { entityID: string }) {