Initial commit
This commit is contained in:
commit
1ff19bf38f
830 changed files with 159212 additions and 0 deletions
2
kirby/config/blocks/code/code.php
Normal file
2
kirby/config/blocks/code/code.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<pre><code class="language-<?= $block->language()->or('text') ?>"><?= $block->code()->html(false) ?></code></pre>
|
59
kirby/config/blocks/code/code.yml
Normal file
59
kirby/config/blocks/code/code.yml
Normal file
|
@ -0,0 +1,59 @@
|
|||
name: field.blocks.code.name
|
||||
icon: code
|
||||
wysiwyg: true
|
||||
preview: code
|
||||
fields:
|
||||
code:
|
||||
label: field.blocks.code.name
|
||||
type: textarea
|
||||
placeholder: field.blocks.code.placeholder
|
||||
buttons: false
|
||||
font: monospace
|
||||
language:
|
||||
label: field.blocks.code.language
|
||||
type: select
|
||||
default: text
|
||||
options:
|
||||
bash: Bash
|
||||
basic: BASIC
|
||||
c: C
|
||||
clojure: Clojure
|
||||
cpp: C++
|
||||
csharp: C#
|
||||
css: CSS
|
||||
diff: Diff
|
||||
elixir: Elixir
|
||||
elm: Elm
|
||||
erlang: Erlang
|
||||
go: Go
|
||||
graphql: GraphQL
|
||||
haskell: Haskell
|
||||
html: HTML
|
||||
java: Java
|
||||
js: JavaScript
|
||||
json: JSON
|
||||
latext: LaTeX
|
||||
less: Less
|
||||
lisp: Lisp
|
||||
lua: Lua
|
||||
makefile: Makefile
|
||||
markdown: Markdown
|
||||
markup: Markup
|
||||
objectivec: Objective-C
|
||||
pascal: Pascal
|
||||
perl: Perl
|
||||
php: PHP
|
||||
text: Plain Text
|
||||
python: Python
|
||||
r: R
|
||||
ruby: Ruby
|
||||
rust: Rust
|
||||
sass: Sass
|
||||
scss: SCSS
|
||||
shell: Shell
|
||||
sql: SQL
|
||||
swift: Swift
|
||||
typescript: TypeScript
|
||||
vbnet: VB.net
|
||||
xml: XML
|
||||
yaml: YAML
|
10
kirby/config/blocks/gallery/gallery.php
Normal file
10
kirby/config/blocks/gallery/gallery.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<figure>
|
||||
<ul>
|
||||
<?php foreach ($block->images()->toFiles() as $image): ?>
|
||||
<li>
|
||||
<?= $image ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</figure>
|
15
kirby/config/blocks/gallery/gallery.yml
Normal file
15
kirby/config/blocks/gallery/gallery.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: field.blocks.gallery.name
|
||||
icon: dashboard
|
||||
preview: gallery
|
||||
fields:
|
||||
images:
|
||||
label: field.blocks.gallery.images.label
|
||||
type: files
|
||||
multiple: true
|
||||
layout: cards
|
||||
size: tiny
|
||||
empty: field.blocks.gallery.images.empty
|
||||
uploads:
|
||||
template: blocks/image
|
||||
image:
|
||||
ratio: 1/1
|
2
kirby/config/blocks/heading/heading.php
Normal file
2
kirby/config/blocks/heading/heading.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<<?= $level = $block->level()->or('h2') ?>><?= $block->text() ?></<?= $level ?>>
|
24
kirby/config/blocks/heading/heading.yml
Normal file
24
kirby/config/blocks/heading/heading.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: field.blocks.heading.name
|
||||
icon: title
|
||||
wysiwyg: true
|
||||
preview: heading
|
||||
fields:
|
||||
level:
|
||||
label: field.blocks.heading.level
|
||||
type: select
|
||||
empty: false
|
||||
default: "h2"
|
||||
width: 1/6
|
||||
options:
|
||||
- h1
|
||||
- h2
|
||||
- h3
|
||||
- h4
|
||||
- h5
|
||||
- h6
|
||||
text:
|
||||
label: field.blocks.heading.text
|
||||
type: writer
|
||||
inline: true
|
||||
width: 5/6
|
||||
placeholder: field.blocks.heading.placeholder
|
35
kirby/config/blocks/image/image.php
Normal file
35
kirby/config/blocks/image/image.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/** @var \Kirby\Cms\Block $block */
|
||||
$alt = $block->alt();
|
||||
$caption = $block->caption();
|
||||
$crop = $block->crop()->isTrue();
|
||||
$link = $block->link();
|
||||
$ratio = $block->ratio()->or('auto');
|
||||
$src = null;
|
||||
|
||||
if ($block->location() == 'web') {
|
||||
$src = $block->src();
|
||||
} elseif ($image = $block->image()->toFile()) {
|
||||
$alt = $alt ?? $image->alt();
|
||||
$src = $image->url();
|
||||
}
|
||||
|
||||
?>
|
||||
<?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>
|
||||
<?php else: ?>
|
||||
<img src="<?= $src ?>" alt="<?= $alt ?>">
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($caption->isNotEmpty()): ?>
|
||||
<figcaption>
|
||||
<?= $caption ?>
|
||||
</figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
<?php endif ?>
|
59
kirby/config/blocks/image/image.yml
Normal file
59
kirby/config/blocks/image/image.yml
Normal file
|
@ -0,0 +1,59 @@
|
|||
name: field.blocks.image.name
|
||||
icon: image
|
||||
preview: image
|
||||
fields:
|
||||
location:
|
||||
label: field.blocks.image.location
|
||||
type: radio
|
||||
columns: 2
|
||||
default: "kirby"
|
||||
options:
|
||||
kirby: Kirby
|
||||
web: Web
|
||||
image:
|
||||
label: field.blocks.image.name
|
||||
type: files
|
||||
multiple: false
|
||||
image:
|
||||
back: black
|
||||
uploads:
|
||||
template: blocks/image
|
||||
when:
|
||||
location: kirby
|
||||
src:
|
||||
label: field.blocks.image.url
|
||||
type: url
|
||||
when:
|
||||
location: web
|
||||
alt:
|
||||
label: field.blocks.image.alt
|
||||
type: text
|
||||
icon: title
|
||||
caption:
|
||||
label: field.blocks.image.caption
|
||||
type: writer
|
||||
icon: text
|
||||
inline: true
|
||||
link:
|
||||
label: field.blocks.image.link
|
||||
type: text
|
||||
icon: url
|
||||
ratio:
|
||||
label: field.blocks.image.ratio
|
||||
type: select
|
||||
placeholder: Auto
|
||||
width: 1/2
|
||||
options:
|
||||
1/1: "1:1"
|
||||
16/9: "16:9"
|
||||
10/8: "10:8"
|
||||
21/9: "21:9"
|
||||
7/5: "7:5"
|
||||
4/3: "4:3"
|
||||
5/3: "5:3"
|
||||
3/2: "3:2"
|
||||
3/1: "3:1"
|
||||
crop:
|
||||
label: field.blocks.image.crop
|
||||
type: toggle
|
||||
width: 1/2
|
2
kirby/config/blocks/list/list.php
Normal file
2
kirby/config/blocks/list/list.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<?= $block->text();
|
8
kirby/config/blocks/list/list.yml
Normal file
8
kirby/config/blocks/list/list.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
name: field.blocks.list.name
|
||||
icon: list-bullet
|
||||
wysiwyg: true
|
||||
preview: list
|
||||
fields:
|
||||
text:
|
||||
label: field.blocks.list.name
|
||||
type: list
|
2
kirby/config/blocks/markdown/markdown.php
Normal file
2
kirby/config/blocks/markdown/markdown.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<?= $block->text()->kt();
|
11
kirby/config/blocks/markdown/markdown.yml
Normal file
11
kirby/config/blocks/markdown/markdown.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
name: field.blocks.markdown.name
|
||||
icon: markdown
|
||||
preview: markdown
|
||||
wysiwyg: true
|
||||
fields:
|
||||
text:
|
||||
label: field.blocks.markdown.label
|
||||
placeholder: field.blocks.markdown.placeholder
|
||||
type: textarea
|
||||
buttons: false
|
||||
font: monospace
|
9
kirby/config/blocks/quote/quote.php
Normal file
9
kirby/config/blocks/quote/quote.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<blockquote>
|
||||
<?= $block->text() ?>
|
||||
<?php if ($block->citation()->isNotEmpty()): ?>
|
||||
<footer>
|
||||
<?= $block->citation() ?>
|
||||
</footer>
|
||||
<?php endif ?>
|
||||
</blockquote>
|
17
kirby/config/blocks/quote/quote.yml
Normal file
17
kirby/config/blocks/quote/quote.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
name: field.blocks.quote.name
|
||||
icon: quote
|
||||
wysiwyg: true
|
||||
preview: quote
|
||||
fields:
|
||||
text:
|
||||
label: field.blocks.quote.text.label
|
||||
placeholder: field.blocks.quote.text.placeholder
|
||||
type: writer
|
||||
inline: true
|
||||
icon: quote
|
||||
citation:
|
||||
label: field.blocks.quote.citation.label
|
||||
placeholder: field.blocks.quote.citation.placeholder
|
||||
type: writer
|
||||
inline: true
|
||||
icon: user
|
3
kirby/config/blocks/table/table.yml
Normal file
3
kirby/config/blocks/table/table.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
name: Table
|
||||
icon: menu
|
||||
preview: table
|
2
kirby/config/blocks/text/text.php
Normal file
2
kirby/config/blocks/text/text.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<?= $block->text();
|
9
kirby/config/blocks/text/text.yml
Normal file
9
kirby/config/blocks/text/text.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
name: field.blocks.text.name
|
||||
icon: text
|
||||
wysiwyg: true
|
||||
preview: text
|
||||
fields:
|
||||
text:
|
||||
type: writer
|
||||
nodes: false
|
||||
placeholder: field.blocks.text.placeholder
|
9
kirby/config/blocks/video/video.php
Normal file
9
kirby/config/blocks/video/video.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php /** @var \Kirby\Cms\Block $block */ ?>
|
||||
<?php if ($block->url()->isNotEmpty()): ?>
|
||||
<figure>
|
||||
<?= video($block->url()) ?>
|
||||
<?php if ($block->caption()->isNotEmpty()): ?>
|
||||
<figcaption><?= $block->caption() ?></figcaption>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
<?php endif ?>
|
12
kirby/config/blocks/video/video.yml
Normal file
12
kirby/config/blocks/video/video.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
name: field.blocks.video.name
|
||||
icon: video
|
||||
preview: video
|
||||
fields:
|
||||
url:
|
||||
label: field.blocks.video.url.label
|
||||
type: url
|
||||
placeholder: field.blocks.video.url.placeholder
|
||||
caption:
|
||||
label: field.blocks.video.caption
|
||||
type: writer
|
||||
inline: true
|
Loading…
Add table
Add a link
Reference in a new issue