Blocks: Shown on the page, in the presentation, or both
- present_show (099) replaces present_hide: only on the page, or only in the presentation, kept off the page and its contents list - Blocks with the old Leave out ticked become Only on the page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2282bee23c
commit
ae06cd2b4f
8 changed files with 52 additions and 14 deletions
|
|
@ -89,12 +89,15 @@ export default function ContentBlocks({
|
|||
anchorPrefix?: string
|
||||
}) {
|
||||
const presenting = usePresenting()
|
||||
// Presented, a block set to is left out and the rest take their
|
||||
// Presentation text (095).
|
||||
if (presenting && blocks) {
|
||||
blocks = blocks
|
||||
.filter((block) => !block.present?.hide)
|
||||
.map((block) => (block.present?.text ? { ...block, text: block.present.text } : block))
|
||||
// Presented, a block shown only on the page is left out and the
|
||||
// rest take their Presentation text (095, 099); on the page, a block
|
||||
// shown only in the presentation is.
|
||||
if (blocks) {
|
||||
blocks = presenting
|
||||
? blocks
|
||||
.filter((block) => !block.present?.hide)
|
||||
.map((block) => (block.present?.text ? { ...block, text: block.present.text } : block))
|
||||
: blocks.filter((block) => !block.present?.only)
|
||||
}
|
||||
if (!blocks?.length) return null
|
||||
// Headings get ids so a post's contents (PostContents) and a shared
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue