Skip to content

Instantly share code, notes, and snippets.

View jensfranke's full-sized avatar
💛

Jens Franke jensfranke

💛
View GitHub Profile
@mbecher
mbecher / figure.php
Last active August 1, 2019 11:33
getkirby tags/figure.php with srcset and thumbnail creation
<?php
kirbytext::$tags['figure'] = array(
'attr' => array(
'width',
'height',
'alt',
'text',
'title',
'class',
@BenMorel
BenMorel / viewport-units-ios.scss
Last active March 11, 2022 13:15
SCSS mixin to support vh and vw units on all iOS Safari versions. Based on an idea by Patrick Burtchaell's: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587
/**
* Fix for vw, vh, vmin, vmax on iOS 7.
* http://caniuse.com/#feat=viewport-units
*
* This fix works by replacing viewport units with px values on known screen sizes.
*
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix.
* Target devices running iOS 8+ will incidentally execute the media query,
* but this will still produce the expected result; so this is not a problem.
@paulirish
paulirish / what-forces-layout.md
Last active May 20, 2024 17:15
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@williamgomes
williamgomes / craft:config:general.php
Last active June 30, 2023 12:20
how to configure nginx with craft (also multilingual)
<?php
/**
* General Configuration
*
* All of your system's general configuration settings go in here.
* You can see a list of the default settings in craft/app/etc/config/defaults/general.php
*/
return array(
@ivi-admin
ivi-admin / Kirby CMS nginx config for Laravel Forge
Last active May 13, 2018 19:00
Adds the removal of the trailing slash, Kirby config lines and panel redirection. Don't change the SSL certificate lines from what is auto-generated by Forge!
# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/www.domain.com/before/*;
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.domain.com;
root /home/forge/www.domain.com/;
# FORGE SSL (DO NOT REMOVE!)
@stursby
stursby / README.md
Last active May 13, 2022 07:41
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

@KatieMFritz
KatieMFritz / craft3-ax.md
Last active November 15, 2019 14:13
Craft 3 plugins for author experience

Craft 3 plugins for better author experience

Annotated Notes: For admin notes with automatic timestamps.

Control Panel Body Classes: Add body classes to various Control Panel screens for easier styling (in combination with Control Panel CSS).

Control Panel CSS: To make style tweaks to the control panel. See web/cp.css for styles.

Control Panel Nav: Custom navigation menus for each user type, for easier navigation.