Skip to content

Instantly share code, notes, and snippets.

View TylerJPresley's full-sized avatar

Tyler J Presley TylerJPresley

View GitHub Profile
@TylerJPresley
TylerJPresley / app.html
Last active January 24, 2017 21:35
Aurelia Gist
<template>
<h1>${message}</h1>
<div repeat.for="line of lines">
<input type="number" placeholder="Quantity" value.bind="line.quantity">
<input type="number" placeholder="Price" value.bind="line.price">
${line.quantity * line.price}
</div>
total: ${total}
@TylerJPresley
TylerJPresley / app.html
Last active December 15, 2016 20:35 — forked from pjschreifels/app.html
Select all trigger for checked.bind values.
<template>
<require from="./page"></require>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<page></page>
</div>
</div>
</div>
@TylerJPresley
TylerJPresley / index-view.html
Created August 11, 2016 14:43
Handling params // Aurelia (RequireJS/CLI)
...
<pagination url="/widgets" pagination.bind="pagination" params.bind="paginationParams"></pagination>
...
@TylerJPresley
TylerJPresley / _README.md
Created July 31, 2016 23:15
Amaran Notifications // Aurelia (RequireJS/CLI)
  1. run npm install github:hakanersu/AmaranJS --save

  2. add the entry to app-bundle in aurelia.json

  "jquery",
  {
    "name": "AmaranJS",
    "path": "../node_modules/AmaranJS/dist/js/",
    "main": "jquery.amaran"
 },
@TylerJPresley
TylerJPresley / date-picker.html
Created July 16, 2016 23:40
Datepicker // Aurelia (RequireJS/CLI)
<template>
<require from="resources/components/adaptive-input"></require>
<adaptive-input input-class="form-control date" type="text" id.bind="id" label.bind="label" value.bind="value"></adaptive-input>
</template>
@TylerJPresley
TylerJPresley / _nprogress.scss
Created July 10, 2016 20:40
nprogress scss
$nprogresscolor:#4FC3F7;
#nprogress {
.bar { background-color: $nprogresscolor!important; height: 3px!important; position: fixed; width: 100%; top: 0; left: 0; z-index:999999; }
.peg { box-shadow: 0 0 10px $nprogresscolor, 0 0 5px $nprogresscolor; }
.spinner { display:none!important; }
}
@TylerJPresley
TylerJPresley / app.html
Last active September 4, 2017 20:40
Very basic loader functionality // Aurelia (CLI/RequireJS)
<template>
<router-view></router-view>
<div id="page-loading" show.bind="_router.isNavigating">
<div id="page-loading-inner">
<!-- Loading animation or text -->
</div>
</div>
@TylerJPresley
TylerJPresley / _toastr.scss
Created July 10, 2016 20:36
Toast notificaitons / Aurelia (CLI/RequireJS)
.toast-title { font-weight: bold; }
.toast-message { -ms-word-wrap: break-word; word-wrap: break-word; }
.toast-message a,
.toast-message label { color: #ffffff; }
.toast-message a:hover { color: #cccccc; text-decoration: none; }
.toast-close-button {
position: relative;
right: -0.3em;
top: -0.3em;
float: right;
@TylerJPresley
TylerJPresley / app-storage.js
Last active September 4, 2017 14:12
App storage // Aurelia (CLI/RequireJS)
import { Cookie } from './cookie';
import * as moment from 'moment';
import * as store from 'store';
/**
* AppStorage class
*
* @module _resources/app-storage
*/
@TylerJPresley
TylerJPresley / process-markup.js
Created July 9, 2016 21:14
Minify HTML in bundles // Aurelia (CLI/RequireJS)
import gulp from 'gulp';
import changedInPlace from 'gulp-changed-in-place';
import project from '../aurelia.json';
import htmlMin from 'gulp-htmlmin';
import {build} from 'aurelia-cli';
export default function processMarkup() {
return gulp.src(project.markupProcessor.source)
.pipe(changedInPlace({ firstPass: true }))
.pipe(htmlMin({ collapseWhitespace: true} ))