Material Design (CSS-based) - Tiles ('-' * 36) Based on: Material Design by Google (http://www.google.com/design/)
Material Design Animation Timing (http://codepen.io/zavoloklom/details/Jbrho/)
A Pen by Sergey Kupletsky on CodePen.
/* Material Design Adaptive Breakpoints */ | |
/* | |
Below you'll find CSS media queries based on the breakpoint guidance | |
published by the Material Design team. You can choose to use, customise | |
or remove these breakpoints based on your needs. | |
http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoints | |
*/ | |
/* mobile-small */ |
// Get the active Media Query as defined in the CSS | |
// Use the following format: | |
// #getActiveMQ-watcher { font-family: "default"; } | |
// @media only screen and (min-width:20em){ #getActiveMQ-watcher { font-family: "small"; } } | |
// etc. | |
window.getActiveMQ = function() { | |
// Build the watcher | |
var $watcher = document.createElement('div'), | |
// alias getComputedStyle | |
computed = window.getComputedStyle, |
<script> | |
// test for localStorage support | |
if(('localStorage' in window) && window['localStorage'] !== null){ | |
var f = document.getElementById('mainform'); | |
// test with PHP if the form was sent (the submit button has the name "sent") | |
<?php if(isset($_POST['sent']))){?> | |
// get the HTML of the form and cache it in the property "state" | |
localStorage.setItem('state',f.innerHTML); |
Material Design (CSS-based) - Tiles ('-' * 36) Based on: Material Design by Google (http://www.google.com/design/)
Material Design Animation Timing (http://codepen.io/zavoloklom/details/Jbrho/)
A Pen by Sergey Kupletsky on CodePen.
<?php | |
/** | |
* Return the value for a key in an array or a property in an object. | |
* Typical usage: | |
* | |
* $object->foo = 'Bar'; | |
* echo get_key($object, 'foo'); | |
* | |
* $array['baz'] = 'Bat'; | |
* echo get_key($array, 'baz'); |
$id='1227feacf41c472e5ee34e20b510a240ad81ea6e'; | |
echo 'id '.$id."\n"; | |
$url = 'http://example.com/activity/pub?id='.$id; | |
echo 'url '.$url."\n"; | |
$data = array( 'foo' => 'bar' ); | |
$data_json = json_encode($data); | |
echo $data_json."\n"; |