Skip to content

Instantly share code, notes, and snippets.


Jimmy Rittenborg JimmyRittenborg

View GitHub Profile
JimmyRittenborg / config.php
Last active Feb 15, 2018
Change Guggenheim Gallery default kirbytext tag from `gallery` which may collide with other plugins etc.
View config.php
JimmyRittenborg /
Last active Feb 8, 2021
Hot to use dnsmasq to resolve to all your local *.dev sites on macOS
if test ! $(which brew); then
echo "Installing homebrew"
ruby -e "$(curl -fsSL"
echo -e "\n\nChecking for brew updates..."
echo "=============================="
JimmyRittenborg / image-autothumb-kirbytexttag.php
Created Nov 29, 2015
This ia a rough example of making the image kirbytext tag support PhotoSwipe and automatically generate thumbnails. (Works - but not tested entirely through)
View image-autothumb-kirbytexttag.php
// Custom image kirbytag highjack
// This file should reflect the image tag functionality found in /kirby/extensions/tags.php
kirbytext::$tags['image'] = array(
'attr' => array(
View guggenheim-styles.css
.guggenheim {
max-width: 100%;
box-sizing: content-box;
.guggenheim__ratio-container {
position: relative;
.guggenheim__image {
JimmyRittenborg / main.scss
Last active Oct 5, 2015
PhotoSwipe - Aspect Ratio Fix
View main.scss
Add these in the main.scss that ships with PhotoSwipe.
.pswp__item--ratiofix .pswp__img:last-child {
opacity: 0.001;
will-change: opacity;
transition: opacity $pswp__show-hide-transition-duration cubic-bezier(.4,0,.22,1);
JimmyRittenborg / compress.liquid
Last active Sep 15, 2022
HTML Compressor in Shopify Liquid
View compress.liquid
{% comment %}
{% endcomment %}{% capture _content %}{{ content }}{% endcapture %}{% comment %}
Remove redundant closing tags
{% endcomment %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% for _element in _endings %}
{% capture _end %}</{{ _element }}>{% endcapture %}
JimmyRittenborg / image.php
Created Nov 10, 2014
Force a thumbnail for the kirbytext image tag. Place this in /site/tags/image.php
View image.php
// This file should reflect the image tag functionality found in /kirby/extensions/tags.php
// image tag
kirbytext::$tags['image'] = array(
'attr' => array(