type: group
fields:
link:
label: Link-Typ
type: select
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types = 1); | |
set_time_limit(0); | |
use Kirby\CLI\CLI; | |
use Kirby\Toolkit\Dir; | |
use Kirby\Toolkit\Str; | |
use Kirby\Cms\Media; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automatically get folder name to get Valet URL | |
domain=$(basename "$PWD"); | |
# Watch style.scss and compile it | |
node-sass -w assets/scss/style.scss assets/css/style.css | | |
# Browsersync on Valet URL | |
browser-sync start --proxy "$domain.test" --host "$domain.test" --open 'external' --files 'assets/css/*.css' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'routes' => [ | |
[ | |
'pattern' => 'imagetemplates', | |
'action' => function () { | |
$result = ''; | |
foreach(site()->index() as $page) { | |
$result .= '<h2>' . $page->title() . '</h2>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php foreach($sections->children()->listed() as $section): ?> | |
<?php snippet('sections/' . $section->intendedTemplate(), array('page' => $section)) ?> | |
<?php endforeach ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Kirby::plugin('medienbaecker/shy', [ | |
'hooks' => [ | |
'kirbytags:before' => function ($text, $data, $options) { | |
return Str::replace($text, "(-)", "­"); | |
} | |
] | |
]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# site/models/section.php | |
class SectionPage extends Page { | |
public function url($options = null): string { | |
return $this->parents()->filterBy("intendedTemplate", "!=", "sections")->first()->url() . '#' . $this->slug(); | |
} | |
} |
This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.
Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application: