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
/* | |
* Checks If String Contains Only White Spaces | |
* | |
* Useful for Fields Validation $input.val().isEmpty() | |
*/ | |
String.prototype.isEmpty = function () { | |
return /^\s*$/.test(this); | |
} |
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
/* | |
* Randomly slice an array and rearrange elements | |
* | |
* Useful for fake ajax data | |
* | |
* jQuery Example: | |
* $.get("/fake-ajax.json", function (data) { | |
* renderSomething(data.randomizeData()); | |
* }); | |
* |
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 testReplies = 10000, | |
testCode = function() { | |
/* code to test */ | |
//$(this) is #actionBox, use it as your container | |
//#actionBox that will be removed after test | |
}, | |
actionBoxConfigure = function(){ | |
/* put elements into actionBox here */ | |
//var i=100; |
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
/* ------------------------------------------------------- | |
Based on css reset & normalaize.css | |
-------------------------------------------------------*/ | |
:focus {outline: 0;} | |
input, button, textarea { padding: 0; margin: 0;} | |
input[disabled] { opacity: 1; } | |
h1, h2, h3, h4, h5, h6 {font-weight: inherit;} | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
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
/* ------------------------------------------------------- | |
CSS Reset (https://gist.github.com/ruslansavenok/7468826) | |
-------------------------------------------------------*/ | |
:focus{outline:0}input,button{padding:0;margin:0}h1,h2,h3,h4,h5,h6{font-weight:normal}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}sub, |
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
.no-selection { | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-khtml-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} | |
.clearfix:after { | |
content: ""; |
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
$(document).ready(function () { | |
$debug = $('<div class="debug"></div>').css({ | |
position: 'fixed', | |
bottom: 0, | |
right: 0, | |
color: "#fff", | |
background: "#000", | |
padding: "5px", | |
"z-index": 99999 | |
}).appendTo('body'); |
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 id="jsbin-css"> | |
.page-header { | |
position: fixed; | |
background: rgba(0, 0, 0, 0.7); | |
width: 100%; | |
height: 60px; | |
z-index: 1000; | |
} | |
.page-header select { |
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 id="jsbin-css"> | |
.page-header { | |
position: fixed; | |
background: rgba(0, 0, 0, 0.7); | |
width: 100%; | |
height: 60px; | |
z-index: 1000; | |
} | |
.page-header select { |
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
{ | |
type: 'Page', | |
match: '/:uid', | |
path: '/preview-page', | |
filter: data => data.node._meta.uid !== 'index', | |
component: require.resolve('./src/templates/page.js'), | |
langs: ['en-us'], | |
}, | |
{ | |
type: 'Page', |