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
;(function() { | |
this.unveil = function(threshold, callback){ | |
var w = window, | |
th = threshold || 0, | |
images = [].slice.call(document.querySelectorAll("img.unveil")); | |
// test for browser support of `once` option for events | |
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support | |
var onceSupported = 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
{ | |
"HTML/Vue Boilerplate": { | |
"prefix": "bpv", | |
"body": [ | |
"<!DOCTYPE html>", | |
"<html lang=\"en\">", | |
"$BLOCK_COMMENT_START", | |
" $CURRENT_MONTH/$CURRENT_DATE/$CURRENT_YEAR", | |
" ${1:Description}", | |
"$BLOCK_COMMENT_END", |
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
setNextInvoiceNumber(){ | |
base('Invoices').select({ | |
maxRecords: 1, | |
sort: [{field: "Number", direction: "desc"}] | |
}).firstPage((err, records) => { | |
records.forEach((record) => { | |
this.invoiceNumber = record.get('Number') + 1 | |
}); | |
}, function done(err) { | |
if (err) { console.error(err); return; } |
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
<template> | |
<div> | |
<button v-on:click="showChild = !showChild">Toggle Child Component!</button> | |
<child-component v-if="showChild" message="I am the child component."></child-component> | |
</div> | |
</template> | |
<script> | |
import LoadingState from '@/components/LoadingState' | |
import ErrorState from '@/components/ErrorState' |
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 asyncComponentTester = function(importPromise, latency){ | |
return new Promise((resolve) => { | |
setTimeout(() => { | |
resolve(importPromise) | |
}, latency) | |
}) | |
} |
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
<template> | |
<div> | |
<button v-on:click="showChild = !showChild">Toggle Child Component!</button> | |
<child-component v-if="showChild" message="I am the child component."></child-component> | |
</div> | |
</template> | |
<script> | |
import LoadingState from '@/components/LoadingState' | |
import ErrorState from '@/components/ErrorState' |
OlderNewer