SVG + GSAP
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
<script> | |
Moon.phase('2018', '01', '19'); // returns `quarter-moon` | |
</script> |
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
<script> | |
var ymd = '2018-01-19', | |
lat = '59.10', | |
lng = '16.40'; | |
Sun.info(ymd, lat, lng).then(function() { | |
console.log(Sun.rise); | |
console.log(Sun.set); | |
}); |
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
var GeoLocation = { | |
cb: '', | |
lat: '', | |
lng: '', | |
getPosition: function() { | |
var that = this; | |
if(navigator.geolocation) { | |
$.when( |
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
var Modal = { | |
open: function(id) { | |
document.querySelector('.modal[data-modal-id="' + id + '"]').classList.add('active') | |
}, | |
close: function(id) { | |
document.querySelector('.modal[data-modal-id="' + id + '"]').classList.remove('active') | |
} | |
} |
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
<html> | |
<head> | |
<style> | |
.line-loader { | |
height: 0.25rem; | |
background: black; | |
width: 0; | |
position: absolute; | |
top: 0; left: 0; | |
transition: width 0.25s cubic-bezier(1.000, 0.000, 0.000, 1.000); |
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 | |
function price_shortcode($id) { | |
if($id != '') { | |
$post_id = $id[0]; | |
$html = ''; | |
global $wpdb; | |
$args = array( | |
'post_type' => 'price_list_init', | |
'name' => $id |
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
<style type="text/css">.body-js { opacity: 0; height: 100%; }</style> | |
<script type="text/javascript"> | |
!function(a,b){a.async=b}(this,function(){function a(a,b){function c(){g.incr(b)}function d(){"complete"===f.readyState&&c()}function e(){console.warn("[async] occurred an error while fetching",a)}var f=document.createElement("script");f.type="text/javascript",f.onload=c,f.async=!0,f.onreadystatechange=d,f.onerror=e,f.src=a,document.head.appendChild(f)}function b(a){c.apply(this,a)}function c(){var c=Array.prototype.slice.call(arguments),d=c[0];"string"==typeof d&&(d=[d]),"[object Array]"===Object.prototype.toString.call(c[1])&&(c[1]=b.bind(this,c.slice(1,c.length)));for(var f=g.push(d.length,c[1]),h=0;h<d.length;h++){var i=d[h];a(e[i]||i,f)}}var d=Object.prototype.hasOwnProperty,e={},f={"extends":function(a,b,c){for(var e in b)d.call(b,e)&&("constructor"===e&&a===global||(void 0===b[e]?delete a[e]:c&&"undefined"!=typeof a[e]||(a[e]=b[e])));return a},merge:function(a,b){var c={};for(var d in a)c[d]=a |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
"use strict"; | |
(function() { | |
class ScriptAsync extends HTMLElement { |
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 | |
function compress_page($buffer) { | |
$search = array("/<!–\{(.*?)\}–>|<!–(.*?)–>|[\t\r\n]|<!–|–>|\/\/ <!–|\/\/ –>|<!\[CDATA\[|\/\/ \]\]>|\]\]>|\/\/\]\]>|\/\/<!\[CDATA\[/" => ""); | |
$buffer = preg_replace(array_keys($search), array_values($search), $buffer); | |
return $buffer; | |
} | |
ob_start('compress_page'); | |
// Page here | |
ob_end_flush(); |
NewerOlder