Pull changes:
git subtree pull --prefix packages/onist-data onist-data master --squashPush to my fork:
git subtree push --prefix packages/onist-data my-onist-data master| var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i; | |
| return input.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function(match, index, title){ | |
| if (index > 0 && index + match.length !== title.length && | |
| match.search(smallWords) > -1 && title.charAt(index - 2) !== ":" && | |
| (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') && | |
| title.charAt(index - 1).search(/[^\s-]/) < 0) { | |
| return match.toLowerCase(); | |
| } |
| paper.install(window); | |
| var canvas, parent, hero, mousePos; | |
| var locs = []; | |
| var paths = []; | |
| var thetas = []; | |
| var nodes = 0; | |
| window.onload = function() { | |
| paper.setup('js-vector-field'); |
Pull changes:
git subtree pull --prefix packages/onist-data onist-data master --squashPush to my fork:
git subtree push --prefix packages/onist-data my-onist-data master| #!/bin/bash | |
| # | |
| # Run JSHint validation before commit. | |
| files=$(git diff --cached --name-only --diff-filter=ACM | grep '.js$') | |
| pass=true | |
| # JSHint | |
| if [ "$files" != "" ]; then | |
| for file in ${files}; do | |
| jshint ${file} |
| var gulp = require('gulp'); | |
| var connect = require('gulp-connect'); | |
| var watch = require('gulp-watch'); | |
| var exec = require('gulp-exec'); | |
| var livereload = require('gulp-livereload'); | |
| var sass = require('gulp-ruby-sass'); | |
| var minifyCss = require('gulp-minify-css'); | |
| var rename = require('gulp-rename'); | |
| gulp.task('sass', function(done) { |
| @mixin box-shadow-helper($level: 1) { | |
| @if $level == 1 { | |
| box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); | |
| } @else if $level == 2 { | |
| box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); | |
| } @else if $level == 3 { | |
| box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); | |
| } @else if $level == 4 { | |
| box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); | |
| } @else if $level == 5 { |
From Patakk (http://patakk.tumblr.com/info):
Here’s a simple function you can use for easing motions, just set your “time” variable to go from 0 to 1. The ‘g’ adjusts the amount of easing.
In the animation above I used the function like this:
x = 300 * ease(time, g);
A Pen by Varun Vachhar on CodePen.
| <!-- Photos --> | |
| {{#if showPhotosRow}} | |
| <h5>Photos <small>(click to view)</small></h5> | |
| {{#each photos}} | |
| {{#if isAssembleOrSelected}} | |
| <div class="relative additionalitem-photo"> | |
| <img | |
| class="thumbnail {{#if selected}}selected{{/if}}" | |
| src="{{#photoUrl this}}{{/photoUrl}}" | |
| data-name="{{photoName}}" /> |
A Pen by Varun Vachhar on CodePen.