Refactor blocks architecture to modular approach
- Restore "1/2, 1/2" layout for flexible column combinations - Simplify beforeafter block: remove toggle and text field, keep only image comparison - Create new video block with URL support (YouTube/Vimeo/direct files) - Create horizontal-gallery block for scrollable image galleries - Add H4 heading level support - All blocks now modular: combine with text blocks in 2-column layouts Blocks available: - Text, Heading (h2-h4), Image, Video - Before/After comparison (no text) - Horizontal gallery (with text below) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6251d8f09f
commit
561932724b
23 changed files with 539 additions and 252 deletions
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
/** @var \Kirby\Cms\Block $block */
|
||||
$images = $block->images()->toFiles();
|
||||
$text = $block->text()->value();
|
||||
?>
|
||||
|
||||
<div class="subsection-w-hscroll">
|
||||
|
||||
<div class="horizontal-scroll-spacer"></div>
|
||||
|
||||
<div class="horizontal-scroll">
|
||||
<div class="horizontal-scroll-wrapper">
|
||||
<?php foreach ($images as $image): ?>
|
||||
<div class="horizontal-scroll-slide">
|
||||
<div class="horizontal-scroll-slide__inner">
|
||||
<figure>
|
||||
<img src="<?= $image->url() ?>" alt="<?= $image->alt()->esc() ?>" />
|
||||
</figure>
|
||||
<?php if ($image->caption()->isNotEmpty()): ?>
|
||||
<p class="caption"><?= $image->caption()->html() ?></p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<div class="horizontal-scroll-button-prev"></div>
|
||||
<div class="horizontal-scroll-button-next"></div>
|
||||
<div class="horizontal-scroll-pagination"></div>
|
||||
</div>
|
||||
|
||||
<?php if ($text): ?>
|
||||
<div class="subsection-txt">
|
||||
<?= $text ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue