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
/* | |
Demo: | |
http://codepen.io/vincentorback/pen/ZLLJbB | |
*/ | |
export function objectFit (el) { | |
let objectElReplacement = `<div | |
class="${el.classList}" | |
style=" | |
background-image:url(${el.getAttribute('src')}); |
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
/** | |
* Dependencies | |
*/ | |
const breakpoints = { | |
xs: 300, | |
sm: 600, | |
md: 800, | |
lg: 1200, | |
xl: 1600 | |
}; |
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
One-pager / Scroll: | |
- http://www.north2.net/ | |
- http://10x16.com/ | |
- http://www.hm.com/us/kenzo#inspiration | |
- http://www.stinkdigital.com/ | |
- https://nameoflove.com/ | |
- https://www.thened.com/ | |
- https://thecreativeindependent.com/ | |
- http://www.melville-design.com/ | |
- http://designgest.com/ |
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 | |
/** | |
* Why does this exist? http://xkcd.com/1179/ also because it makes sense to have a standard way in WordPress to work with | |
* dates and times so that plugin developers can create plugins that will work in any timezone worldwide. | |
* | |
* WordPress sets the default timezone during execution to UTC, reguardless of what the server is set to. | |
* This means that date( 'FORMAT' ) will always give you the current time in UTC, not the timezone you have set | |
* in the WP admin settings. Use date( 'FORMAT', current_time( 'timestamp' ) ) instead to get WP local time. Likewise, | |
* use current_time( 'timestamp' ) instead of time() for the local time. | |
*/ |
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
<img class="img" src="http://placekitten.com/320/480" alt="" data-big="http://placekitten.com/1024/768" /> |
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
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.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
// ========================= getStyleProperty by kangax =============================== | |
// http://perfectionkills.com/feature-testing-css-properties/ | |
var getStyleProperty = (function(){ | |
var prefixes = ['Moz', 'Webkit', 'Khtml', 'O', 'Ms']; | |
var _cache = { }; | |
function getStyleProperty(propName, element) { |