Add blueprints and fake content
This commit is contained in:
parent
1ff19bf38f
commit
8235816462
592 changed files with 22385 additions and 31535 deletions
|
@ -9,7 +9,7 @@ $ratio = $block->ratio()->or('auto');
|
|||
$src = null;
|
||||
|
||||
if ($block->location() == 'web') {
|
||||
$src = $block->src();
|
||||
$src = $block->src()->esc();
|
||||
} elseif ($image = $block->image()->toFile()) {
|
||||
$alt = $alt ?? $image->alt();
|
||||
$src = $image->url();
|
||||
|
@ -19,11 +19,11 @@ if ($block->location() == 'web') {
|
|||
<?php if ($src): ?>
|
||||
<figure<?= attr(['data-ratio' => $ratio, 'data-crop' => $crop], ' ') ?>>
|
||||
<?php if ($link->isNotEmpty()): ?>
|
||||
<a href="<?= $link->toUrl() ?>">
|
||||
<img src="<?= $src ?>" alt="<?= $alt ?>">
|
||||
<a href="<?= esc($link->toUrl()) ?>">
|
||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<img src="<?= $src ?>" alt="<?= $alt ?>">
|
||||
<img src="<?= $src ?>" alt="<?= $alt->esc() ?>">
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
|
|
1
kirby/config/blocks/line/line.php
Normal file
1
kirby/config/blocks/line/line.php
Normal file
|
@ -0,0 +1 @@
|
|||
<hr />
|
4
kirby/config/blocks/line/line.yml
Normal file
4
kirby/config/blocks/line/line.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
name: field.blocks.line.name
|
||||
icon: divider
|
||||
preview: line
|
||||
wysiwyg: true
|
|
@ -1,7 +1,7 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<?php if ($block->url()->isNotEmpty()): ?>
|
||||
<?php if ($video = video($block->url())): ?>
|
||||
<figure>
|
||||
<?= video($block->url()) ?>
|
||||
<?= $video ?>
|
||||
<?php if ($block->caption()->isNotEmpty()): ?>
|
||||
<figcaption><?= $block->caption() ?></figcaption>
|
||||
<?php endif ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue