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 gallery
|
||||||
- [Collectibles] Create page for scans
|
- [Collectibles] Create page for scans
|
||||||
- Rich text, handle linebreak node type, remove spacer
|
|
||||||
- Add hover/active styling for settings options in topbar + language override
|
- Add hover/active styling for settings options in topbar + language override
|
||||||
- Highlight currently selected language option in language override tooltip
|
- Highlight currently selected language option in language override tooltip
|
||||||
- Support for scene break blocks
|
- Support for scene break blocks
|
||||||
- [Folder] Add parent pages
|
- [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)
|
- 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
|
## Long term
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ const { t } = await getI18n(Astro.locals.currentLocale);
|
||||||
) : (
|
) : (
|
||||||
<Tooltip trigger="click">
|
<Tooltip trigger="click">
|
||||||
<div id="tooltip-content" slot="tooltip-content">
|
<div id="tooltip-content" slot="tooltip-content">
|
||||||
{/* TODO: Translate */}
|
|
||||||
<p>{t("header.nav.parentPages.tooltip")}</p>
|
<p>{t("header.nav.parentPages.tooltip")}</p>
|
||||||
{parentPages.map((parentPage) => (
|
{parentPages.map((parentPage) => (
|
||||||
<ParentPageLink parentPage={parentPage} />
|
<ParentPageLink parentPage={parentPage} />
|
||||||
|
|
|
@ -3,13 +3,11 @@ import {
|
||||||
isBlockLineBlock,
|
isBlockLineBlock,
|
||||||
type GenericBlock,
|
type GenericBlock,
|
||||||
isBlockCueBlock,
|
isBlockCueBlock,
|
||||||
isBlockSpacerBlock,
|
|
||||||
} from "src/shared/payload/payload-sdk";
|
} from "src/shared/payload/payload-sdk";
|
||||||
|
|
||||||
import LineBlock from "./components/LineBlock.astro";
|
import LineBlock from "./components/LineBlock.astro";
|
||||||
import CueBlock from "./components/CueBlock.astro";
|
import CueBlock from "./components/CueBlock.astro";
|
||||||
import ErrorMessage from "components/ErrorMessage.astro";
|
import ErrorMessage from "components/ErrorMessage.astro";
|
||||||
import SpacerBlock from "./components/SpacerBlock.astro";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
block: GenericBlock;
|
block: GenericBlock;
|
||||||
|
@ -25,8 +23,6 @@ const { block } = Astro.props;
|
||||||
<LineBlock block={block} />
|
<LineBlock block={block} />
|
||||||
) : isBlockCueBlock(block) ? (
|
) : isBlockCueBlock(block) ? (
|
||||||
<CueBlock block={block} />
|
<CueBlock block={block} />
|
||||||
) : isBlockSpacerBlock(block) ? (
|
|
||||||
<SpacerBlock block={block} />
|
|
||||||
) : (
|
) : (
|
||||||
<ErrorMessage
|
<ErrorMessage
|
||||||
title={`Unknown block type: ${block.blockType}`}
|
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 RTTranscript from "./components/RTTranscript.astro";
|
||||||
import {
|
import {
|
||||||
isBlockNodeSectionBlock,
|
isBlockNodeSectionBlock,
|
||||||
isBlockNodeSpacerBlock,
|
|
||||||
isBlockNodeTranscriptBlock,
|
isBlockNodeTranscriptBlock,
|
||||||
type RichTextBlockNode,
|
type RichTextBlockNode,
|
||||||
} from "src/shared/payload/payload-sdk";
|
} from "src/shared/payload/payload-sdk";
|
||||||
import ErrorMessage from "components/ErrorMessage.astro";
|
import ErrorMessage from "components/ErrorMessage.astro";
|
||||||
import RTSpacer from "./components/RTSpacer.astro";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
node: RichTextBlockNode;
|
node: RichTextBlockNode;
|
||||||
|
@ -24,8 +22,6 @@ const { node, context } = Astro.props;
|
||||||
<RTSection node={node} context={context} />
|
<RTSection node={node} context={context} />
|
||||||
) : isBlockNodeTranscriptBlock(node) ? (
|
) : isBlockNodeTranscriptBlock(node) ? (
|
||||||
<RTTranscript node={node} context={context} />
|
<RTTranscript node={node} context={context} />
|
||||||
) : isBlockNodeSpacerBlock(node) ? (
|
|
||||||
<RTSpacer node={node} context={context} />
|
|
||||||
) : (
|
) : (
|
||||||
<ErrorMessage
|
<ErrorMessage
|
||||||
title={`Unknown block type: ${node.fields.blockType}`}
|
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