You would need to install https://github.com/ramsey/uuid to make it work. Depending on the use case it could also make sense to implement those as traits.
<?php
class ArticlePage extends UuidPage
{
}
import History from './history'; | |
import Barba from 'barba.js'; | |
const history = new History(); | |
Barba.Pjax.goTo = function(url) { | |
history.goTo(url); | |
this.onStateChange(); | |
}; |
@mixin grid-fractions($divisors, $breakpoint: null) { | |
@each $divisor in $divisors { | |
@for $dividend from 1 through $divisor - 1 { | |
@if $breakpoint { | |
&--#{$dividend}\/#{$divisor}\@#{$breakpoint} { | |
flex-basis: $dividend / $divisor * 100%; | |
max-width: $dividend / $divisor * 100%; | |
} | |
} |
import set from 'lodash/set'; | |
import get from 'lodash/get'; | |
import has from 'lodash/has'; | |
export default class Component { | |
constructor() { | |
this._data = {}; | |
this._observers = {}; | |
this.init && this.init.apply(this, arguments); | |
} |
import Component from './component'; | |
export default class Breakpoint extends Component { | |
init(mediaQueryString) { | |
const mql = window.matchMedia(mediaQueryString); | |
const listener = () => this.trigger(mql.matches ? 'match' : 'unmatch', [mql]); | |
mql.addListener(listener); | |
this.set('mql', mql); |
<?php | |
namespace LukasKleinschmidt\Component; | |
use HTML; | |
use STR; | |
use C; | |
/** | |
* Kirby Script Tag Component |
You would need to install https://github.com/ramsey/uuid to make it work. Depending on the use case it could also make sense to implement those as traits.
<?php
class ArticlePage extends UuidPage
{
}
@use 'sass:map'; | |
@use 'variants' as * with ( | |
$breakpoints: ( | |
'small': 640px, | |
'medium': 768px, | |
'large': 1024px, | |
'wide': 1280px, | |
) | |
); |
panel.plugin('lukaskleinschmidt/site', { | |
components: { | |
'k-structure-field-preview': { | |
props: { | |
value: String, | |
column: Object, | |
field: Object | |
}, | |
computed: { | |
text: function() { |
<?php | |
// bootstrap/kirby.php | |
include dirname(__DIR__) . '/vendor/autoload.php'; | |
$kirby = new Kirby([ | |
'roots' => [ | |
'base' => $base = dirname(__DIR__), | |
'index' => $base . '/public', | |
'content' => $base . '/content', |
<?php | |
use Kirby\Cms\App as Kirby; | |
use Kirby\Cms\Page; | |
use Kirby\Toolkit\A; | |
class DefaultPage extends Page | |
{ | |
// | |
} |