Skip to content

Commit

Permalink
feat: embed container
Browse files Browse the repository at this point in the history
  • Loading branch information
pReya committed Oct 22, 2023
1 parent 0e5ef7b commit 1015a38
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions site/blueprints/pages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ fields:
- next-events
- accordion
- team-box
- embed
7 changes: 7 additions & 0 deletions site/plugins/werkstatt/blueprints/blocks/embed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Embed
icon: code
fields:
code:
type: textarea
buttons: false
font: monospace
6 changes: 6 additions & 0 deletions site/plugins/werkstatt/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
Kirby::plugin(
'welcome-werkstatt/werkstatt',
[
'blueprints' => [
'blocks/embed' => __DIR__ . '/blueprints/blocks/embed.yml'
],
'snippets' => [
'blocks/embed' => __DIR__ . '/snippets/blocks/embed.php'
],
'tags' => [
'external' => [
'html' => function ($tag) {
Expand Down
3 changes: 3 additions & 0 deletions site/plugins/werkstatt/snippets/blocks/embed.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="embed-container">
<?= $block->code()->value() ?>
</div>

0 comments on commit 1015a38

Please sign in to comment.