Skip to content

Instantly share code, notes, and snippets.

View AStoker's full-sized avatar

Andrew Stoker AStoker

View GitHub Profile
@AStoker
AStoker / app.html
Last active October 31, 2016 17:43 — forked from fabioluz/app.html
<template>
<require from="./inline-svg"></require>
<style>
.cool {
fill: red;
}
.worked {
fill: blue;
}
</style>
<template>
<require from="./pagerCustomElement"></require>
<pager items.bind="tracks">
<div slot="title-template">Some song</div>
<div slot="content-template">
<div repeat.for="line of item.content">
Line: ${$index + 1}. ${line.lyric}
</div>
</div>
</pager>
@AStoker
AStoker / app.html
Last active November 7, 2016 21:35
Testing out Slot functionality
<template>
<require from="./customListCustomElement"></require>
<custom-list items.bind="tracks">
<div slot="title-template">Some song</div>
<div slot="content-template">
<div repeat.for="line of item.content">
Line: ${$index + 1}. ${line.lyric}
</div>
</div>
@AStoker
AStoker / app.html
Last active November 10, 2016 16:55
Testing out nested shadow dom
<template>
<require from="./customListCustomElement"></require>
<custom-list items.bind="tracks">
<template replace-part="title-override">Nothing to see here</template>
</custom-list>
</template>
@AStoker
AStoker / app.html
Last active November 17, 2016 16:33
Toggle Switch iOS
<template>
<require from="./switch"></require>
<span>${toggleState}</span><br />
<label for="toggle">Toggle: </label>
<switch id="toggle" value.bind="toggleState" />
</template>
@AStoker
AStoker / app.html
Last active July 23, 2017 12:38
Toggle Switch Material
<template>
<require from="./switch"></require>
<span>${toggleState}</span><br />
<label for="toggle">Toggle: </label>
<switch id="toggle" value.bind="toggleState"></switch>
</template>
@AStoker
AStoker / app.html
Last active November 16, 2016 20:58
gets across elements
<template>
<require from="./switch"></require>
<span>${toggleState}</span><br />
<label for="toggle">Toggle: </label>
<switch id="toggle" value.bind="toggleState"></switch>
</template>
@AStoker
AStoker / app.html
Created January 6, 2017 19:32 — forked from Vheissu/app.html
Dynamic using enhance
<template>
<div>Stuff here</div>
<button click.delegate="loadm1($event)">Load M1</button>
<button click.delegate="loadm2($event)">Load M2</button>
<button click.delegate="loadm2again($event)">Load Another M2</button>
<div id="m1holder"></div>
<div id="m2holder"></div>
<div id="m2holderagain"></div>
</template>
@AStoker
AStoker / app.html
Last active July 5, 2017 18:30 — forked from jdanyow/app.html
Changing debounce time
<template>
<label>Debounce: ${debounce}</label>
<br />
<input value.bind="inputValue & debounce: debounce" />
<span>: ${inputValue}</span>
<br />
<button click.delegate="toggleDebounceLength()">Toggle Debounce Length</button>
</template>
@AStoker
AStoker / CustomElement1.html
Last active July 6, 2017 13:01
Checked binding in nested custom element
<template>
<require from="CustomElement2"></require>
<label>Custom Element 1</label>
<br />
<input value.bind="query" />
<br />
<custom-element2 items.bind="items2">
<template replace-part="item">
<li repeat.for="item of items">
<label click.delegate="select(item, $event)">