This file contains 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
(function () { | |
'use strict' | |
// Fetch all the forms we want to apply custom Bootstrap validation styles to | |
var forms = document.querySelectorAll('.needs-validation') | |
// Loop over them and prevent submission | |
Array.prototype.slice.call(forms) | |
.forEach(function (form) { | |
form.addEventListener('submit', function (event) { | |
event.preventDefault() | |
event.stopPropagation() |
This file contains 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 | |
$concepts = [ | |
'https://images.unsplash.com/photo-1450897918656-527057db59d3?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxleHBsb3JlLWZlZWR8MjExfHx8ZW58MHx8fHw%3D&auto=format&fit=crop&w=800&h=400&q=60', | |
'https://images.unsplash.com/photo-1515606378517-3451a4fa2e12?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&h=400&q=80', | |
'https://images.unsplash.com/photo-1596171810878-888894ed5b8f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&h=400&q=80', | |
'https://images.unsplash.com/photo-1560771913-2d303774f0fa?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&h=400&q=80', | |
'https://images.unsplash.com/photo-1605597574993-342d8dbb8a7a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=800&h=400&q=80', | |
]; | |
$texts = [ |
This file contains 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 | |
// Converting Markdown posts to Kirby Blocks | |
// Useful for K2 to K3 content Migrations | |
// Or if you want to transform automatically your Markdown to Kirby Blocks | |
// Get posts | |
$posts = $page->children()->listed(); | |
foreach ($posts as $post) { |
This file contains 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
div[data-testid="placementTracking"] article { | |
display:none; | |
} |
This file contains 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
{ | |
"K:Snippet": { | |
"scope": "php,html", | |
"prefix": "sn", | |
"body": [ | |
"<?php snippet('${1|header,footer,cta|}') ?>" | |
], | |
"description": "Create Kirby Snippet" | |
}, | |
"Open PHP": { |
This file contains 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
{ | |
"Countries": [{ | |
"country": "Afghanistan", | |
"noun": "Afghan(s)", | |
"adj": "Afghan", | |
"alpha-2": "AF", | |
"alpha-3": "AFG", | |
"country-code": 4 | |
}, | |
{ |
This file contains 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
{ | |
"Countries": [{ | |
"name": "Afghanistan", | |
"code": "AF" | |
}, | |
{ | |
"name": "Åland Islands", | |
"code": "AX" | |
}, | |
{ |
This file contains 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 | |
// Read the Kirby Data from the page Text File 'kd' | |
$doc = data::read($page->textfile(), 'kd'); | |
// Add or modify the entries | |
$doc['Text'] = 'Lorem ipsum dolor…'; | |
$doc['Likes'] = 22; | |
// Write the Text File with the new data |
This file contains 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
// --------------------------------------------------------------------------- | |
// Languages: Yaml | |
// --------------------------------------------------------------------------- | |
.source.yaml{ | |
// Yaml: %key | |
.tag.yaml { color: @color-brown_light; } | |
// Yaml: %value - string | |
.string.quoted.single{ color: @color-green; } |