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
/** | |
* Single Component helper | |
*/ | |
import $ from 'jquery'; | |
import Emitter from './Events'; | |
class Component { | |
constructor(element, options) { | |
this.element = element; |
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
<?php | |
/** | |
* @package Any_Rest | |
* @version 1.7 | |
*/ | |
/* | |
Plugin Name: Any Rest | |
Description: Get any page by slug | |
Usage: http://test1.localhost/wp-json/anyrest/v2/apt?slug=hello-world |
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
// shorthand helpers | |
export const html = document.documentElement; | |
export const body = document.body; | |
export const el = (e, p = document) => p.querySelector(e); | |
export const els = (e, p = document) => Array.prototype.slice.call(p.querySelectorAll(e)); | |
export const onLoad = cb => document.addEventListener('DOMContentLoaded', cb, false); | |
export const isArray = obj => (Object.prototype.toString.call(obj).toLowerCase().indexOf('array') >= 0); | |
export const isArrayLike = obj => { |
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
[ | |
{ | |
"block":"Basic Latin", | |
"range":"0000-007F", | |
"low":"0000", | |
"high":"007F" | |
}, | |
{ | |
"block":"Latin-1 Supplement", | |
"range":"0080-00FF", |
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
export default class Component { | |
constructor(element, options) { | |
this.element = element; | |
this.element['__component__'] = this; | |
this.options = {...options, ...parseOptions(this.element)}; | |
} | |
el(s) {return el(s, this.element)} | |
els(s) {return els(s, this.element)} | |
init() {} | |
destroy() {} |
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
const a = new AudioContext(); | |
const oo = a.createOscillator(); | |
oo.connect(a.destination); | |
oo.type="square"; | |
oo.start(); | |
window.addEventListener("mouseover", e => oo.frequency.linearRampToValueAtTime(e.target .innerHTML.length * 0.1 + 37, a.currentTime + 0.37)); |
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
// File webpack.mix.js | |
const mix = require('laravel-mix'); | |
const PATHS = { | |
src: 'src', | |
dist: '.', | |
proxy: 'http://localhost:8888/project' | |
}; |
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
var MquScroll = function(options) { | |
//-------------------------------------------------------------- | |
// Compatibility | |
//-------------------------------------------------------------- | |
var raf = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(callback) { | |
window.setTimeout(callback, 1000 / 60) | |
}; | |
var passiveSupported = false; |
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
export default { | |
name : 'Dynamo', | |
functional: true, | |
props : { | |
template: String | |
}, | |
render(createElement, context) | |
{ | |
context.parent.$once('hook:mounted', () => { | |
context.parent.$forceUpdate() |
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 TweenLite from 'gsap/TweenLite'; | |
import CSSPlugin from 'gsap/CSSPlugin'; | |
/* | |
* The GSAP-Simple transition is not used, but keep it as a template | |
* Author: Chris Panayotoff [email protected] | |
* */ | |
import Vue from 'vue'; |