Remove spacer block
This commit is contained in:
parent
b10cd01c2f
commit
a7b3c530a0
3
TODO.md
3
TODO.md
|
@ -4,12 +4,13 @@
|
|||
|
||||
- [Collectibles] Create page for gallery
|
||||
- [Collectibles] Create page for scans
|
||||
- Rich text, handle linebreak node type, remove spacer
|
||||
- Add hover/active styling for settings options in topbar + language override
|
||||
- Highlight currently selected language option in language override tooltip
|
||||
- Support for scene break blocks
|
||||
- [Folder] Add parent pages
|
||||
- When the tags overflow, the tag group name should be align start (see http://localhost:12499/en/pages/magnitude-negative-chapter-1)
|
||||
- [SDK] create a initPayload() that return a payload sdk (and stop hard wirring to ENV or node-cache)
|
||||
- [Payload] Compare current package.json with fresh install of create-payload-app
|
||||
|
||||
## Long term
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ const { t } = await getI18n(Astro.locals.currentLocale);
|
|||
) : (
|
||||
<Tooltip trigger="click">
|
||||
<div id="tooltip-content" slot="tooltip-content">
|
||||
{/* TODO: Translate */}
|
||||
<p>{t("header.nav.parentPages.tooltip")}</p>
|
||||
{parentPages.map((parentPage) => (
|
||||
<ParentPageLink parentPage={parentPage} />
|
||||
|
|
|
@ -3,13 +3,11 @@ import {
|
|||
isBlockLineBlock,
|
||||
type GenericBlock,
|
||||
isBlockCueBlock,
|
||||
isBlockSpacerBlock,
|
||||
} from "src/shared/payload/payload-sdk";
|
||||
|
||||
import LineBlock from "./components/LineBlock.astro";
|
||||
import CueBlock from "./components/CueBlock.astro";
|
||||
import ErrorMessage from "components/ErrorMessage.astro";
|
||||
import SpacerBlock from "./components/SpacerBlock.astro";
|
||||
|
||||
interface Props {
|
||||
block: GenericBlock;
|
||||
|
@ -25,8 +23,6 @@ const { block } = Astro.props;
|
|||
<LineBlock block={block} />
|
||||
) : isBlockCueBlock(block) ? (
|
||||
<CueBlock block={block} />
|
||||
) : isBlockSpacerBlock(block) ? (
|
||||
<SpacerBlock block={block} />
|
||||
) : (
|
||||
<ErrorMessage
|
||||
title={`Unknown block type: ${block.blockType}`}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
import { SpacerSizes, type SpacerBlock } from "src/shared/payload/payload-sdk";
|
||||
|
||||
interface Props {
|
||||
block: SpacerBlock;
|
||||
}
|
||||
|
||||
const { block } = Astro.props;
|
||||
|
||||
const spaceSizeToRem: Record<SpacerSizes, number> = {
|
||||
[SpacerSizes.Small]: 1,
|
||||
[SpacerSizes.Medium]: 2,
|
||||
[SpacerSizes.Large]: 4,
|
||||
[SpacerSizes.XLarge]: 8,
|
||||
};
|
||||
---
|
||||
|
||||
<div style={`height: ${spaceSizeToRem[block.size]}rem`}></div>
|
|
@ -4,12 +4,10 @@ import RTSection from "./components/RTSection.astro";
|
|||
import RTTranscript from "./components/RTTranscript.astro";
|
||||
import {
|
||||
isBlockNodeSectionBlock,
|
||||
isBlockNodeSpacerBlock,
|
||||
isBlockNodeTranscriptBlock,
|
||||
type RichTextBlockNode,
|
||||
} from "src/shared/payload/payload-sdk";
|
||||
import ErrorMessage from "components/ErrorMessage.astro";
|
||||
import RTSpacer from "./components/RTSpacer.astro";
|
||||
|
||||
interface Props {
|
||||
node: RichTextBlockNode;
|
||||
|
@ -24,8 +22,6 @@ const { node, context } = Astro.props;
|
|||
<RTSection node={node} context={context} />
|
||||
) : isBlockNodeTranscriptBlock(node) ? (
|
||||
<RTTranscript node={node} context={context} />
|
||||
) : isBlockNodeSpacerBlock(node) ? (
|
||||
<RTSpacer node={node} context={context} />
|
||||
) : (
|
||||
<ErrorMessage
|
||||
title={`Unknown block type: ${node.fields.blockType}`}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
import type { RichTextContext } from "src/utils/richText";
|
||||
import type { RichTextSpacerBlock } from "src/shared/payload/payload-sdk";
|
||||
import SpacerBlock from "components/Blocks/components/SpacerBlock.astro";
|
||||
|
||||
interface Props {
|
||||
node: RichTextSpacerBlock;
|
||||
context: RichTextContext;
|
||||
}
|
||||
|
||||
const { node } = Astro.props;
|
||||
---
|
||||
|
||||
<SpacerBlock block={node.fields} />
|
Loading…
Reference in New Issue