made with esnextbin
This file contains hidden or 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
import React from 'react'; | |
class ShowMore extends React.Component { | |
contentHeight = 0 | |
state = { | |
contentHeight: 0, | |
expanded: false | |
} | |
componentDidMount() { | |
this.updateHeight(); |
made with esnextbin
This file contains hidden or 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
// extracted from all.js on nov 26th 2015 | |
var h = navigator.userAgent, | |
i = { | |
iphone: /\b(iPhone|iP[ao]d)/.test(h), | |
ipad: /\b(iP[ao]d)/.test(h), | |
android: /Android/i.test(h), | |
nativeApp: /FBAN\/\w+;/i.test(h), | |
mobile: /Mobile/i.test(h) | |
}; | |
isMobile = i.iphone || i.ipad || i.android || i.mobile; |
This file contains hidden or 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 keypath_resolve(keypath, instance, caller){ | |
return (function _resolve(keypath, instance, caller){ | |
var keypathArray, mapped; | |
// if instance is the caller, return the current keypath | |
if(instance === caller) { | |
return keypath; | |
} | |
// split the keypath, look for the first key in viewmodel mappings |
This file contains hidden or 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
/* | |
animations is declared like this: | |
- simple (one or more rules, in one duration): | |
'name':{style:value,style2:value} | |
- complex (one or more rules, split duration): | |
'name':[ | |
[{style:value,style2:value},'unitless percentage of duration'||{options}], | |
[{style:value,style2:value},'unitless percentage of duration'||{options}] | |
] | |
*/ |
This file contains hidden or 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
/* | |
Requires animate.css, and support for the 'transitionend' event. | |
(See https://developer.mozilla.org/en-US/docs/Web/Events/transitionend for browser support) | |
*/ | |
(function ( global, factory ) { | |
'use strict'; | |
// Common JS (i.e. browserify) environment | |
if ( typeof module !== 'undefined' && module.exports && typeof require === 'function' ) { |
This file contains hidden or 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
// add the thumbnail-sizes you need in functions.php | |
if ( function_exists( 'add_image_size' ) ) { | |
// repeat for all the thumbnail-sizes you need | |
add_image_size( 'thumb790x450', 790, 450, true ); | |
} | |
// helper-function for getting the attachemnt-ID from source. You need this when you only have an image-src | |
function get_attachment_id_from_src ($image_src) { | |
global $wpdb; | |
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'"; | |
$id = $wpdb->get_var($query); |
This file contains hidden or 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
@charset "UTF-8"; | |
/* Foundation 3, artfully masterminded by ZURB Addition offcanvas.css - Specific CSS for off-canvas layouts Off canvas layout CSS/JS provided by or adapted from work by Jason Weaver and Luke Wroblewski | |
Requires: globals.css grid.css modernizr.js (not the foundation one) | |
Edit: translate3d fix by Jens Anders Bakke (github.com/cfenzo) | |
*/ | |
body.off-canvas { padding: 0; margin: 0; } | |
.container { width: 100%; } | |
.row { overflow: hidden; } |
NewerOlder