Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davismj/ba702bc84955ae8f4a256d4b743a9adc to your computer and use it in GitHub Desktop.
Save davismj/ba702bc84955ae8f4a256d4b743a9adc to your computer and use it in GitHub Desktop.
import {inject} from 'aurelia-framework';
import $ from 'jQuery'; // i'm not sure about this line, check the jquery site or stack overflow. $ should be defined.
import 'materialize-css'; // this will load the materialize library
@inject(Element)
export class CollapsibleCustomAttribute {
private element;
constructor(element) {
this.element = $(element);
}
attached() {
this.element.collapsible({
accordion: false
});
}
}
System.config({
defaultJSExtensions: true,
transpiler: false,
paths: {
"*": "dist/*",
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
meta: {
"bootstrap": {
"deps": [
"jquery"
]
}
},
map: {
"aurelia-animator-css": "npm:aurelia-animator-css@1.0.0-rc.1.0.0",
"aurelia-bootstrapper": "npm:aurelia-bootstrapper@1.0.0-rc.1.0.0",
"aurelia-fetch-client": "npm:aurelia-fetch-client@1.0.0-rc.1.0.0",
"aurelia-framework": "npm:aurelia-framework@1.0.0-rc.1.0.0",
"aurelia-history-browser": "npm:aurelia-history-browser@1.0.0-rc.1.0.0",
"aurelia-loader-default": "npm:aurelia-loader-default@1.0.0-rc.1.0.0",
"aurelia-logging-console": "npm:aurelia-logging-console@1.0.0-rc.1.0.0",
"aurelia-pal-browser": "npm:aurelia-pal-browser@1.0.0-rc.1.0.0",
"aurelia-polyfills": "npm:aurelia-polyfills@1.0.0-rc.1.0.0",
"aurelia-router": "npm:aurelia-router@1.0.0-rc.1.0.0",
"aurelia-templating-binding": "npm:aurelia-templating-binding@1.0.0-rc.1.0.0",
"aurelia-templating-resources": "npm:aurelia-templating-resources@1.0.0-rc.1.0.0",
"aurelia-templating-router": "npm:aurelia-templating-router@1.0.0-rc.1.0.0",
"bluebird": "npm:bluebird@3.4.1",
"bootstrap": "github:twbs/bootstrap@3.3.6",
"fetch": "github:github/fetch@1.0.0",
"font-awesome": "npm:font-awesome@4.6.3",
"jquery": "npm:jquery@2.2.4",
"materialize-css": "npm:materialize-css@0.97.6",
"text": "github:systemjs/plugin-text@0.0.8",
"github:jspm/nodelibs-assert@0.1.0": {
"assert": "npm:assert@1.4.1"
},
"github:jspm/nodelibs-buffer@0.1.0": {
"buffer": "npm:buffer@3.6.0"
},
"github:jspm/nodelibs-process@0.1.2": {
"process": "npm:process@0.11.5"
},
"github:jspm/nodelibs-util@0.1.0": {
"util": "npm:util@0.10.3"
},
"github:jspm/nodelibs-vm@0.1.0": {
"vm-browserify": "npm:vm-browserify@0.0.4"
},
"github:twbs/bootstrap@3.3.6": {
"jquery": "npm:jquery@2.2.4"
},
"npm:assert@1.4.1": {
"assert": "github:jspm/nodelibs-assert@0.1.0",
"buffer": "github:jspm/nodelibs-buffer@0.1.0",
"process": "github:jspm/nodelibs-process@0.1.2",
"util": "npm:util@0.10.3"
},
"npm:aurelia-animator-css@1.0.0-rc.1.0.0": {
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-rc.1.0.0"
},
"npm:aurelia-binding@1.0.0-rc.1.0.2": {
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-rc.1.0.0"
},
"npm:aurelia-bootstrapper@1.0.0-rc.1.0.0": {
"aurelia-event-aggregator": "npm:aurelia-event-aggregator@1.0.0-rc.1.0.0",
"aurelia-framework": "npm:aurelia-framework@1.0.0-rc.1.0.0",
"aurelia-history": "npm:aurelia-history@1.0.0-rc.1.0.0",
"aurelia-history-browser": "npm:aurelia-history-browser@1.0.0-rc.1.0.0",
"aurelia-loader-default": "npm:aurelia-loader-default@1.0.0-rc.1.0.0",
"aurelia-logging-console": "npm:aurelia-logging-console@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-pal-browser": "npm:aurelia-pal-browser@1.0.0-rc.1.0.0",
"aurelia-polyfills": "npm:aurelia-polyfills@1.0.0-rc.1.0.0",
"aurelia-router": "npm:aurelia-router@1.0.0-rc.1.0.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-rc.1.0.0",
"aurelia-templating-binding": "npm:aurelia-templating-binding@1.0.0-rc.1.0.0",
"aurelia-templating-resources": "npm:aurelia-templating-resources@1.0.0-rc.1.0.0",
"aurelia-templating-router": "npm:aurelia-templating-router@1.0.0-rc.1.0.0"
},
"npm:aurelia-dependency-injection@1.0.0-rc.1.0.0": {
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-event-aggregator@1.0.0-rc.1.0.0": {
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0"
},
"npm:aurelia-framework@1.0.0-rc.1.0.0": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-rc.1.0.2",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-rc.1.0.0",
"aurelia-loader": "npm:aurelia-loader@1.0.0-rc.1.0.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-rc.1.0.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-rc.1.0.0"
},
"npm:aurelia-history-browser@1.0.0-rc.1.0.0": {
"aurelia-history": "npm:aurelia-history@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-loader-default@1.0.0-rc.1.0.0": {
"aurelia-loader": "npm:aurelia-loader@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-loader@1.0.0-rc.1.0.0": {
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0"
},
"npm:aurelia-logging-console@1.0.0-rc.1.0.0": {
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0"
},
"npm:aurelia-metadata@1.0.0-rc.1.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-pal-browser@1.0.0-rc.1.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-polyfills@1.0.0-rc.1.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-route-recognizer@1.0.0-rc.1.0.0": {
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0"
},
"npm:aurelia-router@1.0.0-rc.1.0.0": {
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-rc.1.0.0",
"aurelia-event-aggregator": "npm:aurelia-event-aggregator@1.0.0-rc.1.0.0",
"aurelia-history": "npm:aurelia-history@1.0.0-rc.1.0.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0",
"aurelia-route-recognizer": "npm:aurelia-route-recognizer@1.0.0-rc.1.0.0"
},
"npm:aurelia-task-queue@1.0.0-rc.1.0.0": {
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0"
},
"npm:aurelia-templating-binding@1.0.0-rc.1.0.0": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-rc.1.0.2",
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-rc.1.0.0"
},
"npm:aurelia-templating-resources@1.0.0-rc.1.0.0": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-rc.1.0.2",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-rc.1.0.0",
"aurelia-loader": "npm:aurelia-loader@1.0.0-rc.1.0.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-rc.1.0.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-rc.1.0.0"
},
"npm:aurelia-templating-router@1.0.0-rc.1.0.0": {
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-rc.1.0.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0",
"aurelia-router": "npm:aurelia-router@1.0.0-rc.1.0.0",
"aurelia-templating": "npm:aurelia-templating@1.0.0-rc.1.0.0"
},
"npm:aurelia-templating@1.0.0-rc.1.0.0": {
"aurelia-binding": "npm:aurelia-binding@1.0.0-rc.1.0.2",
"aurelia-dependency-injection": "npm:aurelia-dependency-injection@1.0.0-rc.1.0.0",
"aurelia-loader": "npm:aurelia-loader@1.0.0-rc.1.0.0",
"aurelia-logging": "npm:aurelia-logging@1.0.0-rc.1.0.0",
"aurelia-metadata": "npm:aurelia-metadata@1.0.0-rc.1.0.0",
"aurelia-pal": "npm:aurelia-pal@1.0.0-rc.1.0.0",
"aurelia-path": "npm:aurelia-path@1.0.0-rc.1.0.0",
"aurelia-task-queue": "npm:aurelia-task-queue@1.0.0-rc.1.0.0"
},
"npm:bluebird@3.4.1": {
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:buffer@3.6.0": {
"base64-js": "npm:base64-js@0.0.8",
"child_process": "github:jspm/nodelibs-child_process@0.1.0",
"fs": "github:jspm/nodelibs-fs@0.1.2",
"ieee754": "npm:ieee754@1.1.6",
"isarray": "npm:isarray@1.0.0",
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:font-awesome@4.6.3": {
"css": "github:systemjs/plugin-css@0.1.23"
},
"npm:inherits@2.0.1": {
"util": "github:jspm/nodelibs-util@0.1.0"
},
"npm:materialize-css@0.97.6": {
"css": "github:systemjs/plugin-css@0.1.23",
"jquery": "github:components/jquery@3.1.0"
},
"npm:process@0.11.5": {
"assert": "github:jspm/nodelibs-assert@0.1.0",
"fs": "github:jspm/nodelibs-fs@0.1.2",
"vm": "github:jspm/nodelibs-vm@0.1.0"
},
"npm:util@0.10.3": {
"inherits": "npm:inherits@2.0.1",
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:vm-browserify@0.0.4": {
"indexof": "npm:indexof@0.0.1"
}
}
});
{
"name": "aurelia-skeleton-navigation-typescript",
"version": "1.0.0-beta.3.0.0",
"description": "A starter kit for building a standard navigation-style app with Aurelia and TypeScript.",
"keywords": [
"aurelia",
"navigation",
"skeleton",
"typescript",
"vscode"
],
"homepage": "http://aurelia.io",
"bugs": {
"url": "https://github.com/aurelia/skeleton-navigation-typescript/issues"
},
"license": "CC0-1.0",
"author": "Mike Graham <mgraham@technicalmedia.com> (http://cmichaelgraham.io/)",
"main": "dist/main.js",
"repository": {
"type": "git",
"url": "http://github.com/aurelia/skeleton-navigation-typescript"
},
"scripts": {
"postinstall": "./node_modules/.bin/typings install",
"test": "gulp test",
"e2e": "gulp serve e2e"
},
"devDependencies": {
"aurelia-bundler": "^0.4.0",
"aurelia-tools": "^0.2.3",
"browser-sync": "^2.13.0",
"conventional-changelog": "1.1.0",
"del": "^2.2.1",
"es6-module-loader": "^0.17.11",
"gulp": "^3.9.1",
"gulp-bump": "^2.1.0",
"gulp-changed": "^1.3.0",
"gulp-htmlmin": "^2.0.0",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.1.0",
"gulp-protractor": "2.4.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-tslint": "^5.0.0",
"gulp-typescript": "^2.13.6",
"isparta": "^4.0.0",
"jasmine-core": "^2.4.1",
"jspm": "^0.16.15",
"karma": "^0.13.22",
"karma-chrome-launcher": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-systemjs": "^0.14.0",
"object.assign": "^4.0.3",
"require-dir": "^0.3.0",
"run-sequence": "^1.2.1",
"systemjs": "0.19.31",
"tslint": "^3.11.0",
"typescript": ">=1.9.0-dev || ^2.0.0",
"typings": "^1.3.0",
"vinyl-paths": "^2.1.0",
"yargs": "^4.7.1"
},
"jspm": {
"dependencies": {
"aurelia-animator-css": "npm:aurelia-animator-css@^1.0.0-rc.1.0.0",
"aurelia-bootstrapper": "npm:aurelia-bootstrapper@^1.0.0-rc.1.0.0",
"aurelia-fetch-client": "npm:aurelia-fetch-client@^1.0.0-rc.1.0.0",
"aurelia-framework": "npm:aurelia-framework@^1.0.0-rc.1.0.0",
"aurelia-history-browser": "npm:aurelia-history-browser@^1.0.0-rc.1.0.0",
"aurelia-loader-default": "npm:aurelia-loader-default@^1.0.0-rc.1.0.0",
"aurelia-logging-console": "npm:aurelia-logging-console@^1.0.0-rc.1.0.0",
"aurelia-pal-browser": "npm:aurelia-pal-browser@^1.0.0-rc.1.0.0",
"aurelia-polyfills": "npm:aurelia-polyfills@^1.0.0-rc.1.0.0",
"aurelia-router": "npm:aurelia-router@^1.0.0-rc.1.0.0",
"aurelia-templating-binding": "npm:aurelia-templating-binding@^1.0.0-rc.1.0.0",
"aurelia-templating-resources": "npm:aurelia-templating-resources@^1.0.0-rc.1.0.0",
"aurelia-templating-router": "npm:aurelia-templating-router@^1.0.0-rc.1.0.0",
"bluebird": "npm:bluebird@3.4.1",
"bootstrap": "github:twbs/bootstrap@^3.3.6",
"fetch": "github:github/fetch@^1.0.0",
"font-awesome": "npm:font-awesome@4.6.3",
"jquery": "npm:jquery@^2.2.4",
"materialize-css": "npm:materialize-css@^0.97.6",
"text": "github:systemjs/plugin-text@^0.0.8"
},
"devDependencies": {}
}
}
<template>
<require from="./collapsibleCustomAttribute">
<ul class="collapsible" collapsible>
<li>
<div class="collapsible-header"><i class="material-icons">filter_drama</i>First</div>
<div class="collapsible-body"><p>Lorem ipsum dolor sit amet.</p></div>
</li>
<li>
<div class="collapsible-header"><i class="material-icons">place</i>Second</div>
<div class="collapsible-body"><p>Lorem ipsum dolor sit amet.</p></div>
</li>
<li>
<div class="collapsible-header"><i class="material-icons">whatshot</i>Third</div>
<div class="collapsible-body"><p>Lorem ipsum dolor sit amet.</p></div>
</li>
</ul>
<section class="au-animate">
<h2>${heading}</h2>
<form role="form" submit.delegate="submit()">
<div class="form-group">
<label for="fn">First Name</label>
<input type="text" value.bind="firstName" class="form-control" id="fn" placeholder="first name">
</div>
<div class="form-group">
<label for="ln">Last Name</label>
<input type="text" value.bind="lastName" class="form-control" id="ln" placeholder="last name">
</div>
<div class="form-group">
<label>Full Name</label>
<p class="help-block">${fullName | upper}</p>
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</section>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment