Skip to content

Commit 21aca4e

Browse files
committed
Add text columns block
1 parent 3836f46 commit 21aca4e

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

src/Commands/InstallBlockBlocks.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ public function getBlocks() {
1414
'Full width image: A full width image with optional text and button(s). [full_width_image]',
1515
'Index content: Render the currently mounted entries if available. [index_content]',
1616
'Image and text: An image and text side by side. [image_and_text]',
17-
'Images grid: A multi row image grid. [images_grid]'
17+
'Images grid: A multi row image grid. [images_grid]',
18+
'Text columns: Text wrapping in two columns. [text_columns]',
1819
]
1920
;
2021
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{#
2+
@name Text columns
3+
@desc The Text columns page builder block.
4+
@set page.page_builder.text_columns
5+
#}}
6+
7+
<!-- /page_builder/_text_columns.antlers.html -->
8+
<section class="fluid-container">
9+
{{ block:title ?= { partial:typography/h3 as="h2" :content="block:title" class="mb-2 md:max-w-[1/2]" } }}
10+
11+
{{ partial:typography/prose class="md:columns-2 gap-6 md:[&>ul]:inline-block md:[&>ul]:!mt-0 md:[&>ul]:mb-5 md:[&>ul]:break-inside-avoid md:[&>ol]:inline-block md:[&>ol]:!mt-0 md:[&>ol]:mb-5 md:[&>ol]:break-inside-avoid md:[&>p]:!mt-0
12+
" }}
13+
{{ block:text }}
14+
{{ /partial:typography/prose }}
15+
</section>
16+
<!-- End: /page_builder/_text_columns.antlers.html -->
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
title: 'Text columns'
2+
fields:
3+
-
4+
handle: title
5+
field:
6+
input_type: text
7+
antlers: false
8+
display: Title
9+
type: text
10+
icon: text
11+
listable: hidden
12+
instructions_position: above
13+
visibility: visible
14+
always_save: false
15+
-
16+
handle: text
17+
field: common.text_rich
18+
config:
19+
buttons:
20+
- bold
21+
- italic
22+
- unorderedlist
23+
- orderedlist
24+
- removeformat
25+
- anchor
26+
validate:
27+
- required

0 commit comments

Comments
 (0)