Instantly share code, notes, and snippets.

View payment.twig
{% extends '_layout' %}
{% block content %}
{% include 'shop/_includes/meter' %}
<section class="container center-ns ph6-ns ph4">
<div class="flex-ns flex-wrap items-start justify-left">
<div class="w-100 tc mb4">
<h2 class="pa0 ma0 f2">Payment</h2>
View MainNav.vue
<div class="vh-100 nav-bar">
<nav role="main" class="w-100 tl">
<ul class="center pv5 ph5">
<li class="db v-mid mb3 text-gray">My Folders</li>
<li class="db v-mid mb3 text-gray">Shared with me</li>
<li class="db v-mid mb3 text-gray">From Canvas8</li>
<li class="db v-mid mb3 text-gray">Sent</li>
<li class="db v-mid mb3 text-gray">Archive</li>
View gist:499d398e92973200df903a23c5f6eda6
View webpack.mix.js
let mix = require("laravel-mix");
let tailwindcss = require("tailwindcss");
let glob = require("glob-all");
let PurgecssPlugin = require("purgecss-webpack-plugin");
* Custom PurgeCSS Extractor
View raw.js
{% raw %}
<script type="text/html" id="hit-template-inner">
<span class="hit bg Grid-fill product--hover db" style="background-image:url({{frontImage}});">
<div class="block db">
<div class="absolute top-1 left-1 share-hover link z-2">
<svg class="share-icon absolute" width="19" height="18">
<use class="no-barba" xmlns:xlink="" xlink:href="/dist/images/icons.svg#share_icon"></use>
<ul class="ma0 pa0 mb4 list share-list relative">

Sans jQuery


// jQuery
$(document).ready(function() {
  // code
View jquery-device-detect
//touch/mobile detection
if (
navigator.userAgent.match(/Phone/i) ||
navigator.userAgent.match(/DROID/i) ||
navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/) ||
navigator.userAgent.match(/Windows Phone/i) ||
View index.js
'use strict';
function findUpTag(el, tag) {
while (el.parentNode) {
el = el.parentNode;
if (el.tagName === tag)
return el;
return null;
View index.js
const ListComp = {
template: `
<div class="wrapper grid" id="start-parralex">
<div class="grid__item large--one-third medium--one-whole no-padding" v-for="(key, index) in productsOrderBy">
<swiper :options="swiperOption">
<swiper-slide v-for="slide in swiperSlides">I'm Slide {{ slide }}</swiper-slide>
<div class="swiper-pagination" slot="pagination"></div>
View index.js
const store = new Vuex.Store({
state: {
products: [
posts: []
mutations: {
addProducts (state, product) {
// mutate state