diff --git a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx index 47318580..e008a3ae 100644 --- a/app/lish/[did]/[publication]/[rkey]/PostContent.tsx +++ b/app/lish/[did]/[publication]/[rkey]/PostContent.tsx @@ -65,7 +65,7 @@ export function PostContent({ return (
{props.postTitle && ( - +
+ )} {props.postDescription ? ({props.postTitle} -
diff --git a/app/lish/[did]/[publication]/dashboard/PublishedPostsLists.tsx b/app/lish/[did]/[publication]/dashboard/PublishedPostsLists.tsx index 47b18411..1d726519 100644 --- a/app/lish/[did]/[publication]/dashboard/PublishedPostsLists.tsx +++ b/app/lish/[did]/[publication]/dashboard/PublishedPostsLists.tsx @@ -87,7 +87,9 @@ function PublishedPostItem(props: {- {doc.record.title} + {doc.record.title === "" || doc.record.title === undefined + ? "Untitled" + : doc.record.title}
diff --git a/app/lish/[did]/[publication]/theme-settings/PostPreview.tsx b/app/lish/[did]/[publication]/theme-settings/PostPreview.tsx index 60d12d1e..e880d6f1 100644 --- a/app/lish/[did]/[publication]/theme-settings/PostPreview.tsx +++ b/app/lish/[did]/[publication]/theme-settings/PostPreview.tsx @@ -15,61 +15,15 @@ import { usePublicationData, useNormalizedPublicationRecord, } from "../dashboard/PublicationSWRProvider"; +import { fakeBlocks, fakePage } from "./postPreviewFakeBlocks"; const FAKE_DID = "did:plc:fake-preview-user"; const FAKE_DOC_URI = "at://did:plc:fake-preview-user/site.standard.document/preview"; -const fakeBlocks: PubLeafletPagesLinearDocument.Block[] = [ - { - $type: "pub.leaflet.pages.linearDocument#block", - block: { - $type: "pub.leaflet.blocks.header", - level: 2, - plaintext: "A Heading", - }, - }, - { - $type: "pub.leaflet.pages.linearDocument#block", - block: { - $type: "pub.leaflet.blocks.text", - plaintext: - "This is a preview of what your posts will look like with the current theme settings. You can adjust colors, fonts, and layout options to match your style.", - }, - }, - { - $type: "pub.leaflet.pages.linearDocument#block", - block: { - $type: "pub.leaflet.blocks.text", - plaintext: - "Try changing the heading font, body font, accent color, and background to see how they affect the look and feel of your publication.", - }, - }, - { - $type: "pub.leaflet.pages.linearDocument#block", - block: { - $type: "pub.leaflet.blocks.horizontalRule", - }, - }, - { - $type: "pub.leaflet.pages.linearDocument#block", - block: { - $type: "pub.leaflet.blocks.text", - plaintext: - "Your readers will see posts rendered just like this. Make sure you're happy with the typography and spacing before publishing!", - }, - }, -]; - -const fakePage: PubLeafletPagesLinearDocument.Main = { - $type: "pub.leaflet.pages.linearDocument", - id: "preview-page", - blocks: fakeBlocks, -}; - const fakeNormalizedDocument = { $type: "site.standard.document" as const, - title: "Preview Post Title", + title: "Building your Dream Theme!", description: "A short description of this preview post.", publishedAt: new Date().toISOString(), site: "at://did:plc:fake-preview-user/site.standard.publication/preview", diff --git a/app/lish/[did]/[publication]/theme-settings/PubPreview.tsx b/app/lish/[did]/[publication]/theme-settings/PubPreview.tsx index 5876f9f2..27887ef4 100644 --- a/app/lish/[did]/[publication]/theme-settings/PubPreview.tsx +++ b/app/lish/[did]/[publication]/theme-settings/PubPreview.tsx @@ -52,9 +52,9 @@ export function PubPreview(props: { ? undefined : [ { - title: "Hello!", + title: "Your Personal Antheme", description: - "So excited to have you! This is how your posts will appear in your publication", + "Welcome to the Publication Theme Setter. This is how posts will appear in your publication", date: (- +{ + e.preventDefault(); + e.stopPropagation(); + }} + > {previewMode === "pub" ? ({ } postTitle={ { await rep?.mutate.updatePublicationDraft({ diff --git a/components/ThemeManager/PubThemeSetter.tsx b/components/ThemeManager/PubThemeSetter.tsx index 53e8153a..c4fd66ac 100644 --- a/components/ThemeManager/PubThemeSetter.tsx +++ b/components/ThemeManager/PubThemeSetter.tsx @@ -337,85 +337,3 @@ export const PubThemeSetter = (props: { ); }; - -const SamplePub = (props: { - pubBGImage: string | null; - pubBGRepeat: number | null; - showPageBackground: boolean; -}) => { - let { data } = usePublicationData(); - let { publication } = data || {}; - let record = useNormalizedPublicationRecord(); - - return ( - -- ); -};--- {record?.icon && publication?.uri && ( - - )} - -- -- {record?.name} --- {record?.description} --- - Subscribe with Bluesky ----- A Sample Post --- This is a sample description about the sample post --Jan 1, 20XX-