Skip to content

Instantly share code, notes, and snippets.

View Thanood's full-sized avatar

Daniel Bendel Thanood

  • Cologne, Germany
View GitHub Profile
@Thanood
Thanood / app.html
Last active February 24, 2017 14:28 — forked from brylie/app.html
Aurelia Gist
<template>
<require from="bootstrap/css/bootstrap.css"></require>
<require from="./open-api-info"></require>
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="#">
<i class="fa fa-user"></i>
<span>
Open API Designer
</span>
@Thanood
Thanood / app.html
Last active July 4, 2017 12:30
Aurelia-Materialize bridge base + md-chips test
<template>
<require from="materialize/dist/css/materialize.css"></require>
<label>chips</label>
<div md-chips="data.two-way: chips"></div>
<div repeat.for="chip of chips">
<p>${chip.tag}</p>
</div>
<button md-button md-waves="color: light;" click.delegate="addChip()">Add a chip</button>
<button md-button md-waves="color: light;" click.delegate="removeChip()">Remove last chip</button>
</template>
@Thanood
Thanood / app.html
Last active February 22, 2017 19:47
Aurelia-Materialize bridge au-md-tabs
<template>
<au-md-tabs md-stretch.bind="stretched" view-model.ref="demotabs">
<au-md-tab md-label="tab 1" class="z-depth-1" style="padding: 25px;">
This is tab 1
</au-md-tab>
<au-md-tab md-label="tab 2" class="z-depth-1" style="padding: 25px;">
This is tab 2
</au-md-tab>
<au-md-tab md-label="tab 3" class="z-depth-1" style="padding: 25px;">
This is tab 3
@Thanood
Thanood / app.html
Created February 6, 2017 14:57
Aurelia-Materialize bridge select observation issue
<template>
<div>
<select md-select value.two-way="selectedMeal">
<option model.bind="null">Select your meal</option>
<option repeat.for="meal of food" model.bind="meal">${meal.name} - ${meal.count}</option>
</select>
<a md-button="flat: true;" md-waves click.trigger="setSelectedMeal()" class="accent-text">select steak</a>
<a md-button="flat: true;" md-waves click.trigger="increasePizzaCount()" class="accent-text">increase pizza count</a>
You selected: ${selectedMeal | stringify}
@Thanood
Thanood / _docs.md
Created January 29, 2017 15:27
Aurelia-Materialize bridge tabs swipeable

Indicator issue when using tabs with waves

Waves make the container position: relative; and because of that the position of the child (a in the tab li) cannot be calculated correctly, it's always at left: 0.

To work around this, set this in a css file (like in app.css here):

[md-tabs] .waves-effect {
  position: static;
}
@Thanood
Thanood / app.html
Last active January 29, 2017 15:10
Aurelia-Materialize bridge collapsible prevent open/close
<template>
<require from="./mdx-no-collapse"></require>
<div>
Thanks to @djensen47!
</div>
<div class="collapsible-basic-use">
<ul md-collapsible>
<li>
<div class="collapsible-header">
First
@Thanood
Thanood / app.html
Created January 29, 2017 14:47
Aurelia-Materialize bridge chips editor autocomplete
<template>
<div md-chips="data.bind: chips; autocomplete-data.bind: autocompleteData;"></div>
<div>
<!-- chip data: ${chips|stringify} -->
chip data:
<ul>
<li repeat.for="chip of chips">
${chip.tag}
</li>
</ul>
@Thanood
Thanood / app.html
Last active January 29, 2017 14:44
Aurelia-Materialize bridge chips editor events
<template>
<require from="./logger"></require>
<div md-chips="data.bind: chips; placeholder:+tag;" change.delegate="logChange($event.detail)" selected.delegate="logSelect($event.detail)"></div>
<div>
<!-- chip data: ${chips|stringify} -->
chip data:
<ul>
<li repeat.for="chip of chips">
${chip.tag}
</li>
@Thanood
Thanood / app.html
Last active January 9, 2017 19:46 — forked from eikaramba/app.html
Aurelia-Materialize bridge select filtered repeat
<template>
<require from="./filterPizzaValueConverter"></require>
<div style="margin-bottom: 15px;">
Thanks to @eikaramba
</div>
<div>
<md-checkbox md-checked.bind="shouldFilter">filter pizza (changes the array for select)</md-checkbox>
<select md-select multiple md-select.ref="select" value.two-way="selectedMeal">
<option value="" disabled>Select your meal</option>
<option repeat.for="meal of food | filterPizza:shouldFilter" model.bind="meal" value.bind="meal.id">${meal.name}</option>
@Thanood
Thanood / app.html
Last active January 3, 2017 08:58
Aurelia-Materialize bridge datepicker label
<template>
<require from="./md-datepicker-label"></require>
<require from="./stringifyValueConverter"></require>
<div>
Thanks to @MaximBalaganskiy!
</div>
<div>
<input md-datepicker-label="next appointment" md-datepicker="container: body; value.two-way: selectedDate;" type="date" />
</div>
<div>