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
//- compile and see the output online at below URL | |
http://jade-lang.com/ | |
//- navigation data | |
-var navLinks = { 'Home': 'home.html', 'About': 'about.html', 'Services': 'services.html', 'Contact': 'contact.html'}; | |
//- set default selected item (useful for adding active state for current page navigation link in each page) | |
- var activeLink = 'Home'; | |
nav(role="navigation" aria-label="Primary") |
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
<div class="flex-row"> | |
<div class="flex-col"></div> | |
<div class="flex-col"></div> | |
<div class="flex-col"></div> | |
<div class="flex-col"></div> | |
<div class="flex-col"></div> | |
<div class="flex-col"></div> | |
<div class="flex-col"></div> | |
<div class="flex-col"></div> | |
<div class="flex-col"></div> |
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
//- compile and see the output online at below URL | |
http://jade-lang.com/ | |
//- table data | |
- var tableData = [['R1 Col1', 'R1 Col2', 'R1 Col3'], ['R2 Col1', 'R2 Col2', 'R2 Col3'], ['R3 Col1', 'R3 Col2', 'R3 Col3'], ['R4 Col1', 'R4 Col2', 'R4 Col3'], ['R5 Col1', 'R5 Col2', 'R5 Col3']] | |
//- table markup | |
table.table | |
//- table head | |
tr.t-head |
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
// setup browser env | |
const { Document, HTMLElement } = require('basichtml'); | |
global.window = global; | |
global.document = new Document(); | |
global.customElements = document.customElements; | |
global.HTMLElement = HTMLElement; | |
// mock missing api | |
document.importNode = (node, deep) => node.cloneNode(deep); | |
global.requestAnimationFrame = (callback) => setTimeout(callback, 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
// setup browser env | |
const jsdom = require("jsdom@11.5.1"); | |
const { JSDOM } = jsdom; | |
const doc = new JSDOM(`<!doctype html><html><head><meta charset="utf-8"></head><body></body></html>`); | |
global.window = doc.window; | |
global.document = window.document; | |
// mock missing api | |
document.importNode = (node, deep) => node.cloneNode(deep); | |
global.requestAnimationFrame = (callback) => setTimeout(callback, 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
const path = require('path'); | |
const lodash = require('lodash'); | |
const webpack = require('webpack'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | |
const pkg = require(path.join(process.cwd(), 'package.json')); | |
const ENV = process.env.NODE_ENV || 'development'; | |
const isProd = (ENV === 'production'); |
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
<p>Click on each header element to see number of clicks updated | |
<header-text-base text="Rendered with base-custom-element"></header-text-base> | |
<header-text-lit text="Rendered with lit-html"></header-text-lit> | |
<header-text-hyper text="Rendered with hyper-html"></header-text-hyper> |
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
#!/usr/bin/env node | |
/** | |
* automated gh-pages deployment | |
*/ | |
const path = require('path'); | |
const shell = require('shelljs'); | |
const { which, echo, exit, exec, cd, mkdir, rm } = shell; | |
const distRoot = 'dist'; |
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
const image = new Image(); | |
image.src = URL.createObjectURL(imageElement); | |
console.info('imageElement', image.src); |
OlderNewer