- Rewritten architecture. Instead of a js-based router/controller architecture, the panel now uses plain server-rendered views and speeds them up with Pjax for a more reliable solution in case of js issues.
- New static sidebar for a better user experience while editing content
- Context menus for files and pages for easier editing and administration in the sidebar
- A beautiful new unified search for pages and users
- A new "style: table" option for structure fields, which will turn the display of entries into a nice table
- A new "modalsize: small|medium|large" option for structure fields, which helps to control the width of structure modals
- Far better user experience for file uploads. Files can now be dragged directly into the browser in the file views and on in page forms.
- Custom user form fields with new user blueprints. You can now add a blueprint per role to site/blueprints/users (i.e. site/blueprints/users/admin.yml) and set additional custom fields there for each role. They will be adde
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 | |
| // resize an image by the width | |
| $image->resize($width)->url(); | |
| // resize by width and height. The bigger one will be downscaled | |
| $image->resize($width, $height)->url(); | |
| // adjust the jpeg compression | |
| $image->resize($width, $height, $quality)->url(); |
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($articles as $article): ?> | |
| <article> | |
| <a href="<?php echo $article->url() ?>"> | |
| <h1><?php echo $article->title()->html() ?></h1> | |
| <?php if($image = $article->image('cover.jpg')): ?> | |
| <figure> | |
| <img src="<?php echo $image->url() ?>" alt=""> | |
| </figure> | |
| <?php endif ?> |
I hereby claim:
- I am bastianallgeier on github.
- I am bastianallgeier (https://keybase.io/bastianallgeier) on keybase.
- I have a public key whose fingerprint is 90BD 230B 5676 B805 8D9A 30B1 067C 1D1A 2864 D6C3
To claim this, I am signing this object:
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 | |
| $page->children()->filter(function($page) { | |
| return ($page->template() == 'article.text' or $page->template() == 'article.video'); | |
| }); |
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 | |
| c::set('routes', array( | |
| array( | |
| 'pattern' => 'post', | |
| 'method' => 'POST', | |
| 'action' => function() { | |
| if(get('token') != 'your-very-long-auth-token') { | |
| return response::error('Unauthorized'); |
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 | |
| class KirbyExtended extends Kirby { | |
| // your stuff | |
| } | |
| $kirby = kirby('KirbyExtended'); |
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::$handlers['template'] = function($kirby, $page, $data = array()) { | |
| require_once(__DIR__ . DS . 'vendor' . DS . 'autoload.php'); | |
| $loader = new Twig_Loader_Filesystem($kirby->roots()->templates()); | |
| $twig = new Twig_Environment($loader, array( | |
| 'cache' => false | |
| )); |
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
| <img src="<?php $page->image()->crop(300, 200)->url() ?>" alt="Cropped by width and height"> | |
| <img src="<?php $page->image()->crop(300)->url() ?>" alt="Cropped box"> | |
| <img src="<?php $page->image()->resize(300, 200)->url() ?>" alt="Resized by width and height"> | |
| <img src="<?php $page->image()->resize(300)->url() ?>" alt="Resized by width only"> | |
| <img src="<?php $page->image()->resize(false, 200)->url() ?>" alt="Resized by height only"> |