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
import _ from 'lodash' | |
export const state = () => ({ | |
_contains: 'some', | |
_badges: null, | |
_topics: [], | |
_dates: [], | |
_upvotes: 0, | |
}) |
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
<template> | |
<div class="filter" @click="toggleFilter" :class="{'is-active': isShowFilter}"> | |
<div class="filter__title" :class="{'has-filter': hasFilter}"> | |
<IconFilter class="filter__icon" /> | |
<span class="filter__text">Filter <span>by</span></span> | |
</div> | |
<ul class="filter__list"> | |
<li class="filter__item" | |
v-for="(filter, i) in list" | |
:key="`filter.${i}`" |
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
/** | |
* Generate all the possible combinations among a set of nested arrays. | |
* | |
* @param array $data The entrypoint array container. | |
* @param array $all The final container (used internally). | |
* @param array $group The sub container (used internally). | |
* @param mixed $val The value to append (used internally). | |
* @param int $i The key index (used internally). | |
*/ | |
function generate_combinations(array $data, array &$all = array(), array $group = array(), $value = null, $i = 0) |
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
function numberEnd(n, titles) { | |
var cases = [2, 0, 1, 1, 1, 2]; | |
return titles[(n % 100 > 4 && n % 100 < 20) ? 2 : cases[Math.min(n % 10, 5)]]; | |
} |
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
/** | |
* Plugin that transform ur inline-blocked grid into a | |
* pinterest-like grid :) | |
* @author arkadylukashov | |
* @link https://gist.github.com/arkadylukashov/6218172 | |
*/ | |
;(function ($) { | |
$.fn.pinnize = function(options) { | |
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
/* piecon */ | |
(function(){var i={},j=null,k=null,f=null,g=null,h={},l={color:"#ff0084",background:"#bbb",shadow:"#fff",fallback:!1},c,o=navigator.userAgent.toLowerCase();c=function(e){return-1!==o.indexOf(e)};var p=c("msie");c("chrome");c("chrome")||c("safari");var q=c("safari")&&!c("chrome");c("mozilla")&&!c("chrome")&&c("safari");var m=function(e){for(var a=document.getElementsByTagName("link"),c=document.getElementsByTagName("head")[0],f=0,h=a.length;f<h;f++)("icon"===a[f].getAttribute("rel")||"shortcut icon"=== | |
a[f].getAttribute("rel"))&&c.removeChild(a[f]);a=document.createElement("link");a.type="image/x-icon";a.rel="icon";a.href=e;document.getElementsByTagName("head")[0].appendChild(a)},n=function(){g||(g=document.createElement("canvas"),g.width=16,g.height=16);return g};i.setOptions=function(e){h={};for(var a in l)h[a]=e.hasOwnProperty(a)?e[a]:l[a];return this};i.setProgress=function(e){f||(f=document.title);if(!k||!j){var a;a:{a=document.getElementsByTagName("link");for(var c=0,i=a.length;c<i;c++)if("i |
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
/** | |
* Provides requestAnimationFrame in a cross browser way. | |
* @author paulirish / http://paulirish.com/ | |
*/ | |
if ( !window.requestAnimationFrame ) { | |
window.requestAnimationFrame = ( function() { | |
return window.webkitRequestAnimationFrame || |
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
(function($) { | |
$.fn.preload = function(forPreload, options) { | |
var settings = $.extend({ | |
debug : false, | |
percentage : { | |
textCnt : '', | |
lineCnt : '' | |
}, |
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
(function($) { | |
$.fn.fullscreen = function(options) { | |
var settings = $.extend({ | |
to: false, | |
exit: 'Normal size', | |
onScreenChange: $.noop, | |
onFail: $.noop | |
},options); | |
NewerOlder