- Install dnsmasq:
brew install dnsmasq
cd $(brew --prefix); mkdir etc; echo 'address=/.test/127.0.0.1' > etc/dnsmasq.conf
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
sudo mkdir /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'
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 | |
// Bei mir spielen mehrere Dateien eine Rolle | |
// Die Query für die einzelnen Beitragsquellen habe ich in collections: https://getkirby.com/docs/guide/templates/collections | |
// blog collection: | |
return function ($site) { | |
return page('blog')->index()->listed(); | |
}; | |
// Die Daten trage ich im controller für die sitemap zusammen: |
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 | |
namespace mauricerenck\Komments; | |
$kommentUtils = new KommentBaseUtils(); | |
$komments = $kommentUtils->parseKomments($page->kommentsInbox()); | |
$kommentList = ['LIKES' => [], 'REPOSTS' => [], 'REPLIES' => [], 'MENTIONS' => []]; | |
$kommentsInModeration = 0; | |
function addReply($komment) |
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
inputField.addEventListener('keyup', event => { | |
// prevent some evil queries | |
const keyword = inputField.value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&') | |
// at least two chars needed to trigger the search | |
if (keyword.length < 2) { | |
return false | |
} |
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 | |
class EpisodeTemplateNamePage extends Page | |
{ | |
public function podcasterDescription() | |
{ | |
$field = new Field($this, 'podcasterDescription', $this->podcasterDescription()->value() . $this->podcasterContent()->value()); | |
return $field; | |
} | |
} |
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
export const initLazyloading = (selector: string): void => { | |
let images = document.querySelectorAll(selector) | |
if ('IntersectionObserver' in window) { | |
// Create new observer object | |
let lazyImageObserver = new IntersectionObserver(function(entries, observer) { | |
// Loop through IntersectionObserverEntry objects | |
entries.forEach(function(entry) { | |
// Do these if the target intersects with the root | |
if (entry.isIntersecting) { |
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
export const initLazyloading = (selector: string): void => { let images = document.querySelectorAll(selector) if ('IntersectionObserver' in window) { // Create new observer object let lazyImageObserver = new IntersectionObserver(function(entries, observer) { // Loop through IntersectionObserverEntry objects entries.forEach(function(entry) { // Do these if the target intersects with the root if (entry.isIntersecting) { let lazyImage: any = entry.target lazyImage.src = lazyImage.dataset.src lazyImage.classList.remove('lazy') lazyImage.classList.add('lazyloaded') lazyImageObserver.unobserve(lazyImage) } }) }) // Loop through and observe each image images.forEach(function(lazyImage) { lazyImageObserver.observe(lazyImage) }) } } | |
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
<!-- right after <body> --> | |
<div class="fader"></div> | |
<script> | |
const fader = document.querySelector('.fader') | |
fader.classList.add('fade'); | |
</script> | |
<!-- before </body> --> |
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
{ | |
"ab":{ | |
"name":"Abkhaz", | |
"nativeName":"аҧсуа" | |
}, | |
"aa":{ | |
"name":"Afar", | |
"nativeName":"Afaraf" | |
}, | |
"af":{ |
NewerOlder