tests mise en page
This commit is contained in:
parent
581d60f883
commit
bc350af540
52 changed files with 961 additions and 72 deletions
46
site/snippets/blocks/imagefloat.php
Normal file
46
site/snippets/blocks/imagefloat.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/** @var \Kirby\Cms\Block $block */
|
||||
$alt = $block->alt();
|
||||
$caption = $block->caption();
|
||||
$src = $block->image()->toFile()->url();
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($src): ?>
|
||||
<figure class="web-image">
|
||||
|
||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
||||
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
<figcaption>
|
||||
<?= $caption->kt() ?>
|
||||
</figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
|
||||
<figure class="print-image float-image">
|
||||
<?php if($srcred = $block->imagered()->toFile()):?>
|
||||
<div class="print-red red-layer">
|
||||
<img src="<?= $srcred->url() ?>" alt="<?= $alt->esc() ?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if($srcgreen = $block->imagegreen()->toFile()):?>
|
||||
<div class="print-green green-layer">
|
||||
<img src="<?= $srcgreen->url() ?>" alt="<?= $alt->esc() ?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php if($srcblue = $block->imageblue()->toFile()):?>
|
||||
<div class="print-blue blue-layer">
|
||||
<img src="<?= $srcblue->url() ?>" alt="<?= $alt->esc() ?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
<figcaption>
|
||||
<?= $caption->kt() ?>
|
||||
</figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue