├── .gitignore ├── .ruby-version ├── Procfile ├── bower_components ├── jquery │ ├── src │ │ ├── outro.js │ │ ├── selector.js │ │ ├── var │ │ │ ├── arr.js │ │ │ ├── trim.js │ │ │ ├── rnotwhite.js │ │ │ ├── strundefined.js │ │ │ ├── push.js │ │ │ ├── slice.js │ │ │ ├── class2type.js │ │ │ ├── concat.js │ │ │ ├── indexOf.js │ │ │ ├── pnum.js │ │ │ ├── hasOwn.js │ │ │ ├── toString.js │ │ │ └── support.js │ │ ├── ajax │ │ │ ├── var │ │ │ │ ├── rquery.js │ │ │ │ └── nonce.js │ │ │ ├── parseJSON.js │ │ │ ├── parseXML.js │ │ │ ├── script.js │ │ │ ├── load.js │ │ │ └── jsonp.js │ │ ├── css │ │ │ ├── var │ │ │ │ ├── rmargin.js │ │ │ │ ├── cssExpand.js │ │ │ │ ├── rnumnonpx.js │ │ │ │ ├── getStyles.js │ │ │ │ └── isHidden.js │ │ │ ├── hiddenVisibleSelectors.js │ │ │ ├── swap.js │ │ │ ├── addGetHookIf.js │ │ │ ├── curCSS.js │ │ │ └── defaultDisplay.js │ │ ├── manipulation │ │ │ ├── var │ │ │ │ └── rcheckableType.js │ │ │ ├── _evalUrl.js │ │ │ └── support.js │ │ ├── data │ │ │ ├── var │ │ │ │ ├── data_priv.js │ │ │ │ └── data_user.js │ │ │ └── accepts.js │ │ ├── core │ │ │ ├── var │ │ │ │ └── rsingleTag.js │ │ │ ├── parseHTML.js │ │ │ ├── access.js │ │ │ └── ready.js │ │ ├── traversing │ │ │ ├── var │ │ │ │ └── rneedsContext.js │ │ │ └── findFilter.js │ │ ├── event │ │ │ ├── support.js │ │ │ └── alias.js │ │ ├── attributes.js │ │ ├── deprecated.js │ │ ├── effects │ │ │ └── animatedSelector.js │ │ ├── selector-sizzle.js │ │ ├── queue │ │ │ └── delay.js │ │ ├── jquery.js │ │ ├── exports │ │ │ ├── amd.js │ │ │ └── global.js │ │ ├── attributes │ │ │ ├── support.js │ │ │ └── prop.js │ │ ├── intro.js │ │ ├── wrap.js │ │ └── dimensions.js │ ├── bower.json │ ├── .bower.json │ └── MIT-LICENSE.txt ├── bootstrap │ ├── test-infra │ │ ├── requirements.txt │ │ ├── uncached-npm-install.sh │ │ └── sauce_browsers.yml │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── dist │ │ └── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ ├── bower.json │ ├── less │ │ ├── component-animations.less │ │ ├── wells.less │ │ ├── breadcrumbs.less │ │ ├── close.less │ │ ├── thumbnails.less │ │ ├── utilities.less │ │ ├── jumbotron.less │ │ ├── media.less │ │ ├── pager.less │ │ ├── bootstrap.less │ │ ├── badges.less │ │ ├── labels.less │ │ ├── code.less │ │ ├── alerts.less │ │ ├── grid.less │ │ ├── progress-bars.less │ │ ├── print.less │ │ ├── pagination.less │ │ ├── responsive-utilities.less │ │ ├── tooltip.less │ │ └── scaffolding.less │ ├── .bower.json │ ├── grunt │ │ ├── bs-raw-files-generator.js │ │ ├── shrinkwrap.js │ │ └── bs-glyphicons-data-generator.js │ ├── LICENSE │ ├── js │ │ ├── transition.js │ │ └── alert.js │ └── package.json ├── trianglify │ ├── examples │ │ ├── example0.jpg │ │ ├── example1.jpg │ │ ├── example2.jpg │ │ └── example3.jpg │ ├── bower.json │ ├── .bower.json │ ├── gulpfile.js │ └── package.json ├── bootstrap-sass-official │ ├── vendor │ │ └── assets │ │ │ ├── fonts │ │ │ └── bootstrap │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ │ ├── javascripts │ │ │ ├── bootstrap.js │ │ │ └── bootstrap │ │ │ │ ├── transition.js │ │ │ │ └── alert.js │ │ │ └── stylesheets │ │ │ ├── bootstrap │ │ │ ├── _wells.scss │ │ │ ├── _component-animations.scss │ │ │ ├── _breadcrumbs.scss │ │ │ ├── _close.scss │ │ │ ├── _thumbnails.scss │ │ │ ├── _utilities.scss │ │ │ ├── _jumbotron.scss │ │ │ ├── _media.scss │ │ │ ├── _pager.scss │ │ │ ├── bootstrap.scss │ │ │ ├── _badges.scss │ │ │ ├── _labels.scss │ │ │ ├── _code.scss │ │ │ ├── _alerts.scss │ │ │ ├── _grid.scss │ │ │ ├── _progress-bars.scss │ │ │ ├── _print.scss │ │ │ ├── _responsive-utilities.scss │ │ │ ├── _pagination.scss │ │ │ └── _tooltip.scss │ │ │ └── bootstrap.scss │ ├── bower.json │ ├── composer.json │ ├── .bower.json │ └── LICENSE └── d3 │ ├── bower.json │ ├── composer.json │ ├── README.md │ ├── .bower.json │ ├── LICENSE │ └── CONTRIBUTING.md ├── .env ├── blog.html ├── favicon.png ├── _layouts ├── schedule.html ├── blog.html ├── intro.html └── default.html ├── images ├── gandalf.jpg ├── github-name.png ├── github-tag.png ├── gettingstarted.png └── github-create.png ├── 404.md ├── Rakefile ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.ttf └── glyphicons-halflings-regular.woff ├── Gemfile ├── _chapters ├── 0 │ ├── 0-setup.md │ ├── 3-verifying.md │ └── 1-prerequisites.md ├── 1 │ ├── 3-html-forms.md │ ├── 4-post-requests.md │ └── 0-up-and-running.md ├── 2 │ ├── 3-debugging-css.md │ └── 0-intro.md ├── 3 │ ├── 1-additional-help.md │ └── 0-intro.md ├── 4 │ ├── 0-intro.md │ ├── 3-using-activerecord.md │ └── 1-database-basics.md ├── 5 │ ├── 0-intro.md │ ├── 5-readmes-and-deleting.md │ ├── 2-setup.md │ └── 1-basic-concepts.md ├── 6 │ └── 0-intro.md ├── 7 │ ├── 0-intro.md │ └── 1-project.md ├── 8 │ └── 0-intro.md ├── 9 │ ├── 0-intro.md │ └── 1-authentication.md ├── 10 │ └── 0-intro.md ├── 11 │ └── 0-intro.md ├── 12 │ ├── 1-example-repo.md │ ├── 2-git-cheatsheet.md │ ├── 0-resources.md │ └── 3-about-this-site.md └── 0-schedule.md ├── js └── scripts.js ├── config.ru ├── Readme.md ├── _includes ├── footer.html ├── analytics.js ├── header.html └── head.html ├── _config.yml ├── bower.json ├── _bowercopy.sh ├── _templates └── intro.md ├── _plugins ├── sorted_chapters.rb ├── schedule.rb └── toc.rb └── Gemfile.lock /.gitignore: -------------------------------------------------------------------------------- 1 | _site -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.1.2 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec puma -p $PORT config.ru -------------------------------------------------------------------------------- /bower_components/jquery/src/outro.js: -------------------------------------------------------------------------------- 1 | })); 2 | -------------------------------------------------------------------------------- /bower_components/bootstrap/test-infra/requirements.txt: -------------------------------------------------------------------------------- 1 | boto==2.20.0 2 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | export BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby 2 | -------------------------------------------------------------------------------- /bower_components/jquery/src/selector.js: -------------------------------------------------------------------------------- 1 | define([ "./selector-sizzle" ]); 2 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/arr.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return []; 3 | }); 4 | -------------------------------------------------------------------------------- /blog.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Blog 3 | layout: blog 4 | permalink: blog/index.html 5 | --- 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/trim.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return "".trim; 3 | }); 4 | -------------------------------------------------------------------------------- /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/favicon.png -------------------------------------------------------------------------------- /_layouts/schedule.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {{content}} 6 | 7 | {% schedule %} -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/var/rquery.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/\?/); 3 | }); 4 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/rnotwhite.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/\S+/g); 3 | }); 4 | -------------------------------------------------------------------------------- /bower_components/jquery/src/css/var/rmargin.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/^margin/); 3 | }); 4 | -------------------------------------------------------------------------------- /images/gandalf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/images/gandalf.jpg -------------------------------------------------------------------------------- /bower_components/jquery/src/var/strundefined.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return typeof undefined; 3 | }); 4 | -------------------------------------------------------------------------------- /images/github-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/images/github-name.png -------------------------------------------------------------------------------- /images/github-tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/images/github-tag.png -------------------------------------------------------------------------------- /images/gettingstarted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/images/gettingstarted.png -------------------------------------------------------------------------------- /images/github-create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/images/github-create.png -------------------------------------------------------------------------------- /404.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: 404 4 | summary: Page Not Found 5 | --- 6 | 7 | ![](/images/gandalf.jpg) 8 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/push.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./arr" 3 | ], function( arr ) { 4 | return arr.push; 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/slice.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./arr" 3 | ], function( arr ) { 4 | return arr.slice; 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/class2type.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | // [[Class]] -> type pairs 3 | return {}; 4 | }); 5 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/concat.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./arr" 3 | ], function( arr ) { 4 | return arr.concat; 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/indexOf.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./arr" 3 | ], function( arr ) { 4 | return arr.indexOf; 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/css/var/cssExpand.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return [ "Top", "Right", "Bottom", "Left" ]; 3 | }); 4 | -------------------------------------------------------------------------------- /bower_components/jquery/src/manipulation/var/rcheckableType.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/^(?:checkbox|radio)$/i); 3 | }); 4 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/pnum.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; 3 | }); 4 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/var/nonce.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../../core" 3 | ], function( jQuery ) { 4 | return jQuery.now(); 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/data/var/data_priv.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../Data" 3 | ], function( Data ) { 4 | return new Data(); 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/data/var/data_user.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../Data" 3 | ], function( Data ) { 4 | return new Data(); 5 | }); 6 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | namespace :assets do 2 | desc 'Precompile assets' 3 | task :precompile do 4 | sh "bundle exec jekyll build" 5 | end 6 | end -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /bower_components/jquery/src/var/hasOwn.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./class2type" 3 | ], function( class2type ) { 4 | return class2type.hasOwnProperty; 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/toString.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./class2type" 3 | ], function( class2type ) { 4 | return class2type.toString; 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/core/var/rsingleTag.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | // Match a standalone tag 3 | return (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); 4 | }); 5 | -------------------------------------------------------------------------------- /bower_components/jquery/src/var/support.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | // All support tests are defined in their respective modules. 3 | return {}; 4 | }); 5 | -------------------------------------------------------------------------------- /bower_components/trianglify/examples/example0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/trianglify/examples/example0.jpg -------------------------------------------------------------------------------- /bower_components/trianglify/examples/example1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/trianglify/examples/example1.jpg -------------------------------------------------------------------------------- /bower_components/trianglify/examples/example2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/trianglify/examples/example2.jpg -------------------------------------------------------------------------------- /bower_components/trianglify/examples/example3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/trianglify/examples/example3.jpg -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | ruby "2.1.1" 2 | source 'https://rubygems.org' 3 | 4 | gem 'jekyll', '>= 2.0.3' 5 | gem 'rouge', '~> 1.3.3' 6 | gem 'puma', '~> 2.8.1' 7 | gem 'rack-contrib', '~> 1.1.0' -------------------------------------------------------------------------------- /_chapters/10/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Demo Day 3 | layout: intro 4 | index: 10 5 | 6 | date: 7 | December 2 8 | 9 | due: 10 | project demos 11 | 12 | --- 13 | -------------------------------------------------------------------------------- /bower_components/jquery/src/css/var/rnumnonpx.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../../var/pnum" 3 | ], function( pnum ) { 4 | return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 5 | }); 6 | -------------------------------------------------------------------------------- /_chapters/11/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Demo Day 3 | layout: intro 4 | index: 11 5 | 6 | date: 7 | December 4 8 | 9 | due: 10 | project demos 11 | 12 | 13 | --- 14 | -------------------------------------------------------------------------------- /bower_components/bootstrap/test-infra/uncached-npm-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cp test-infra/npm-shrinkwrap.canonical.json npm-shrinkwrap.json 3 | npm install 4 | rm npm-shrinkwrap.json 5 | -------------------------------------------------------------------------------- /bower_components/jquery/src/traversing/var/rneedsContext.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../../core", 3 | "../../selector" 4 | ], function( jQuery ) { 5 | return jQuery.expr.match.needsContext; 6 | }); 7 | -------------------------------------------------------------------------------- /bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /bower_components/jquery/src/css/var/getStyles.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return function( elem ) { 3 | return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); 4 | }; 5 | }); 6 | -------------------------------------------------------------------------------- /bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /bower_components/jquery/src/event/support.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../var/support" 3 | ], function( support ) { 4 | 5 | support.focusinBubbles = "onfocusin" in window; 6 | 7 | return support; 8 | 9 | }); 10 | -------------------------------------------------------------------------------- /js/scripts.js: -------------------------------------------------------------------------------- 1 | --- 2 | layout: ~ 3 | --- 4 | {% include jquery.min.js %} 5 | {% include bootstrap.min.js %} 6 | {% include trianglify.min.js %} 7 | {% include d3.min.js %} 8 | {% include app.js %} 9 | {% include analytics.js %} -------------------------------------------------------------------------------- /_layouts/blog.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {% for post in site.posts %} 6 |

{{ post.title }}

7 |

{{ post.summary }}

8 |

{{ post.date | date: "%d %h %Y" }}

9 | {% endfor %} -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | require 'rack/contrib/try_static' 2 | require 'rack/contrib/not_found' 3 | 4 | use Rack::TryStatic, 5 | :root => "_site", 6 | :urls => %w[/], 7 | :try => ['index.html', '/index.html'] 8 | 9 | run Rack::NotFound.new('_site/404.html') 10 | -------------------------------------------------------------------------------- /_chapters/8/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Project Q&A 3 | layout: intro 4 | index: 8 5 | 6 | date: 7 | November 6 8 | 9 | overview: 10 | Javascript! 11 | 12 | due: 13 | N/A 14 | 15 | workshop: 16 | Introduction to Javascript 17 | 18 | --- 19 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qrohlf/sensible-web-development/HEAD/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /bower_components/jquery/src/attributes.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./core", 3 | "./attributes/attr", 4 | "./attributes/prop", 5 | "./attributes/classes", 6 | "./attributes/val" 7 | ], function( jQuery ) { 8 | 9 | // Return jQuery for attributes-only inclusion 10 | return jQuery; 11 | }); 12 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/parseJSON.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Support: Android 2.3 6 | // Workaround failure to string-cast null input 7 | jQuery.parseJSON = function( data ) { 8 | return JSON.parse( data + "" ); 9 | }; 10 | 11 | return jQuery.parseJSON; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /bower_components/jquery/src/deprecated.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./core", 3 | "./traversing" 4 | ], function( jQuery ) { 5 | 6 | // The number of elements contained in the matched element set 7 | jQuery.fn.size = function() { 8 | return this.length; 9 | }; 10 | 11 | jQuery.fn.andSelf = jQuery.fn.addBack; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Sensible Web Development 2 | 3 | This is the online text for a web development course I'm teaching. It contains background information about each lesson as well as homework assignments, links to external resources, and troubleshooting tips. 4 | 5 | See it in action at [http://webdev.qrohlf.com](http://webdev.qrohlf.com)! 6 | -------------------------------------------------------------------------------- /bower_components/jquery/src/effects/animatedSelector.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../selector", 4 | "../effects" 5 | ], function( jQuery ) { 6 | 7 | jQuery.expr.filters.animated = function( elem ) { 8 | return jQuery.grep(jQuery.timers, function( fn ) { 9 | return elem === fn.elem; 10 | }).length; 11 | }; 12 | 13 | }); 14 | -------------------------------------------------------------------------------- /_chapters/9/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Authentication 3 | layout: intro 4 | index: 9 5 | 6 | date: 7 | November 13 8 | 9 | overview: 10 | Authentication with a username and password using the `has_secure_password` ActiveRecord feature. 11 | 12 | due: 13 | work on project 14 | 15 | workshop: 16 | Authentication 17 | 18 | --- 19 | -------------------------------------------------------------------------------- /bower_components/jquery/src/manipulation/_evalUrl.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../ajax" 3 | ], function( jQuery ) { 4 | 5 | jQuery._evalUrl = function( url ) { 6 | return jQuery.ajax({ 7 | url: url, 8 | type: "GET", 9 | dataType: "script", 10 | async: false, 11 | global: false, 12 | "throws": true 13 | }); 14 | }; 15 | 16 | return jQuery._evalUrl; 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jquery/src/selector-sizzle.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./core", 3 | "sizzle" 4 | ], function( jQuery, Sizzle ) { 5 | 6 | jQuery.find = Sizzle; 7 | jQuery.expr = Sizzle.selectors; 8 | jQuery.expr[":"] = jQuery.expr.pseudos; 9 | jQuery.unique = Sizzle.uniqueSort; 10 | jQuery.text = Sizzle.getText; 11 | jQuery.isXMLDoc = Sizzle.isXML; 12 | jQuery.contains = Sizzle.contains; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /_includes/analytics.js: -------------------------------------------------------------------------------- 1 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 2 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 3 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 4 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 5 | 6 | ga('create', '{{site.tracking_id}}', '{{site.tracking_property}}'); 7 | ga('send', 'pageview'); -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bower_components/jquery/src/css/var/isHidden.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../../core", 3 | "../../selector" 4 | // css is assumed 5 | ], function( jQuery ) { 6 | 7 | return function( elem, el ) { 8 | // isHidden might be called from jQuery#filter function; 9 | // in that case, element will be second argument 10 | elem = el || elem; 11 | return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); 12 | }; 13 | }); 14 | -------------------------------------------------------------------------------- /bower_components/d3/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "d3", 3 | "version": "3.4.6", 4 | "main": "d3.js", 5 | "scripts": [ 6 | "d3.js" 7 | ], 8 | "ignore": [ 9 | ".DS_Store", 10 | ".git", 11 | ".gitignore", 12 | ".npmignore", 13 | ".travis.yml", 14 | "Makefile", 15 | "bin", 16 | "component.json", 17 | "index.js", 18 | "lib", 19 | "node_modules", 20 | "package.json", 21 | "src", 22 | "test" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap.js: -------------------------------------------------------------------------------- 1 | //= require bootstrap/affix 2 | //= require bootstrap/alert 3 | //= require bootstrap/button 4 | //= require bootstrap/carousel 5 | //= require bootstrap/collapse 6 | //= require bootstrap/dropdown 7 | //= require bootstrap/tab 8 | //= require bootstrap/transition 9 | //= require bootstrap/scrollspy 10 | //= require bootstrap/modal 11 | //= require bootstrap/tooltip 12 | //= require bootstrap/popover 13 | -------------------------------------------------------------------------------- /bower_components/jquery/src/css/hiddenVisibleSelectors.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../selector" 4 | ], function( jQuery ) { 5 | 6 | jQuery.expr.filters.hidden = function( elem ) { 7 | // Support: Opera <= 12.12 8 | // Opera reports offsetWidths and offsetHeights less than zero on some elements 9 | return elem.offsetWidth <= 0 && elem.offsetHeight <= 0; 10 | }; 11 | jQuery.expr.filters.visible = function( elem ) { 12 | return !jQuery.expr.filters.hidden( elem ); 13 | }; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | name: Sensible Web Development 2 | markdown: redcarpet 3 | redcarpet: 4 | extensions: 5 | - tables 6 | - with_toc_data 7 | - fenced_code_blocks 8 | highlighter: pygments 9 | baseurl: '' 10 | tracking_id: UA-40241848-2 11 | tracking_property: qrohlf.com 12 | github_repo: qrohlf/sensible-web-development 13 | exclude: [compass.rb, config.ru, Gemfile, Gemfile.lock, Procfile, Rakefile, README.md, sass, unicorn.rb, vendor] 14 | collections: 15 | chapters: 16 | output: true 17 | -------------------------------------------------------------------------------- /_chapters/0-schedule.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Course Schedule 3 | summary: (subject to change) 4 | layout: schedule 5 | --- 6 | 7 | # Schedule 8 | This is a general overview for the whole course. If you have a question about a specific week or lab, you can find more info in the introduction to the corresponding chapter. 9 | 10 | **Each lab is assigned in class and is due at the beginning of class the following week (i.e we will talk about Lab 0 in class on Week 0, and it will be due before class on Week 1)**. 11 | -------------------------------------------------------------------------------- /bower_components/jquery/src/data/accepts.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | /** 6 | * Determines whether an object can have data 7 | */ 8 | jQuery.acceptData = function( owner ) { 9 | // Accepts only: 10 | // - Node 11 | // - Node.ELEMENT_NODE 12 | // - Node.DOCUMENT_NODE 13 | // - Object 14 | // - Any 15 | /* jshint -W018 */ 16 | return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 17 | }; 18 | 19 | return jQuery.acceptData; 20 | }); 21 | -------------------------------------------------------------------------------- /bower_components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.1.0", 4 | "main": "dist/jquery.js", 5 | "license": "MIT", 6 | "ignore": [ 7 | "**/.*", 8 | "build", 9 | "speed", 10 | "test", 11 | "*.md", 12 | "AUTHORS.txt", 13 | "Gruntfile.js", 14 | "package.json" 15 | ], 16 | "devDependencies": { 17 | "sizzle": "1.10.16", 18 | "requirejs": "~2.1.8", 19 | "qunit": "~1.12.0", 20 | "sinon": "~1.7.3" 21 | }, 22 | "keywords": [ 23 | "jquery", 24 | "javascript", 25 | "library" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simplify", 3 | "version": "0.0.1", 4 | "authors": [ 5 | "Quinn Rohlf " 6 | ], 7 | "description": "My jekyll theme", 8 | "license": "Copyright 2014 Quinn Rohlf", 9 | "homepage": "http://qrohlf.com", 10 | "private": true, 11 | "ignore": [ 12 | "**/.*", 13 | "node_modules", 14 | "bower_components", 15 | "test", 16 | "tests" 17 | ], 18 | "dependencies": { 19 | "bootstrap-sass-official": "~3.1.1", 20 | "trianglify": "~0.1.3", 21 | "d3": "~3.4.6", 22 | "jquery": "~2.1.0", 23 | "bootstrap": "~3.1.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/parseXML.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Cross-browser xml parsing 6 | jQuery.parseXML = function( data ) { 7 | var xml, tmp; 8 | if ( !data || typeof data !== "string" ) { 9 | return null; 10 | } 11 | 12 | // Support: IE9 13 | try { 14 | tmp = new DOMParser(); 15 | xml = tmp.parseFromString( data, "text/xml" ); 16 | } catch ( e ) { 17 | xml = undefined; 18 | } 19 | 20 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 21 | jQuery.error( "Invalid XML: " + data ); 22 | } 23 | return xml; 24 | }; 25 | 26 | return jQuery.parseXML; 27 | 28 | }); 29 | -------------------------------------------------------------------------------- /bower_components/trianglify/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "trianglify", 3 | "main": "trianglify.js", 4 | "version": "0.1.3", 5 | "homepage": "https://github.com/qrohlf/trianglify", 6 | "authors": [ 7 | "Quinn Rohlf " 8 | ], 9 | "description": "Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.", 10 | "keywords": [ 11 | "svg", 12 | "d3.js", 13 | "visualization" 14 | ], 15 | "license": "GPLv3", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "test", 21 | "tests" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /bower_components/bootstrap/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "version": "3.1.1", 4 | "main": [ 5 | "./dist/css/bootstrap.css", 6 | "./dist/js/bootstrap.js", 7 | "./dist/fonts/glyphicons-halflings-regular.eot", 8 | "./dist/fonts/glyphicons-halflings-regular.svg", 9 | "./dist/fonts/glyphicons-halflings-regular.ttf", 10 | "./dist/fonts/glyphicons-halflings-regular.woff" 11 | ], 12 | "ignore": [ 13 | "**/.*", 14 | "_config.yml", 15 | "CNAME", 16 | "composer.json", 17 | "CONTRIBUTING.md", 18 | "docs", 19 | "js/tests" 20 | ], 21 | "dependencies": { 22 | "jquery": ">= 1.9.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /bower_components/d3/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mbostock/d3", 3 | "description": "A small, free JavaScript library for manipulating documents based on data.", 4 | "keywords": ["dom", "svg", "visualization", "js", "canvas"], 5 | "homepage": "http://d3js.org/", 6 | "license": "BSD-3-Clause", 7 | "authors": [ 8 | { 9 | "name": "Mike Bostock", 10 | "homepage": "http://bost.ocks.org/mike" 11 | } 12 | ], 13 | "support": { 14 | "issues": "https://github.com/mbostock/d3/issues", 15 | "wiki": "https://github.com/mbostock/d3/wiki", 16 | "API": "https://github.com/mbostock/d3/wiki/API-Reference", 17 | "source": "https://github.com/mbostock/d3" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /_bowercopy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # quick and dirty script to copy the relevant bower files to their appropriate places. Totally a hack. 4 | 5 | # trianglify 6 | cp -f bower_components/trianglify/trianglify.min.js _includes 7 | 8 | # glyphicons 9 | cp -f bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/* fonts 10 | 11 | # jquery 12 | cp -f bower_components/jquery/dist/jquery.min.js _includes 13 | cp -f bower_components/jquery/dist/jquery.js js 14 | cp -f bower_components/jquery/dist/jquery.min.map js 15 | 16 | # bootstrap 17 | cp -f bower_components/bootstrap/dist/js/bootstrap.min.js _includes 18 | 19 | # d3 20 | cp -f bower_components/d3/d3.min.js _includes 21 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | &.in { 21 | display: block; 22 | } 23 | } 24 | .collapsing { 25 | position: relative; 26 | height: 0; 27 | overflow: hidden; 28 | .transition(height .35s ease); 29 | } 30 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /bower_components/jquery/src/queue/delay.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../queue", 4 | "../effects" // Delay is optional because of this dependency 5 | ], function( jQuery ) { 6 | 7 | // Based off of the plugin by Clint Helfers, with permission. 8 | // http://blindsignals.com/index.php/2009/07/jquery-delay/ 9 | jQuery.fn.delay = function( time, type ) { 10 | time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 11 | type = type || "fx"; 12 | 13 | return this.queue( type, function( next, hooks ) { 14 | var timeout = setTimeout( next, time ); 15 | hooks.stop = function() { 16 | clearTimeout( timeout ); 17 | }; 18 | }); 19 | }; 20 | 21 | return jQuery.fn.delay; 22 | }); 23 | -------------------------------------------------------------------------------- /bower_components/jquery/src/css/swap.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // A method for quickly swapping in/out CSS properties to get correct calculations. 6 | jQuery.swap = function( elem, options, callback, args ) { 7 | var ret, name, 8 | old = {}; 9 | 10 | // Remember the old values, and insert the new ones 11 | for ( name in options ) { 12 | old[ name ] = elem.style[ name ]; 13 | elem.style[ name ] = options[ name ]; 14 | } 15 | 16 | ret = callback.apply( elem, args || [] ); 17 | 18 | // Revert the old values 19 | for ( name in options ) { 20 | elem.style[ name ] = old[ name ]; 21 | } 22 | 23 | return ret; 24 | }; 25 | 26 | return jQuery.swap; 27 | 28 | }); 29 | -------------------------------------------------------------------------------- /_templates/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Week Title 3 | summary: week summary 4 | layout: intro 5 | index: 0 6 | 7 | date: 8 | month and day 9 | 10 | overview: 11 | a brief overview (markdown allowed) of the week's topics 12 | 13 | reading: 14 | a reminder of what reading is due 15 | 16 | due: 17 | a reminder of what assignments are due 18 | 19 | workshop: 20 | short description of the workshop topic 21 | 22 | assignment: 23 | title: "Lab 0: Lab Title" 24 | summary: a short description of the lab 25 | requirements: 26 | - A list of items that are required for the lab 27 | - these can have inline markdown formatting 28 | due: before next week's class 29 | tag: v0.0.0 30 | --- -------------------------------------------------------------------------------- /bower_components/jquery/src/css/addGetHookIf.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | 3 | function addGetHookIf( conditionFn, hookFn ) { 4 | // Define the hook, we'll check on the first run if it's really needed. 5 | return { 6 | get: function() { 7 | if ( conditionFn() ) { 8 | // Hook not needed (or it's not possible to use it due to missing dependency), 9 | // remove it. 10 | // Since there are no other hooks for marginRight, remove the whole object. 11 | delete this.get; 12 | return; 13 | } 14 | 15 | // Hook needed; redefine it so that the support test is not executed again. 16 | 17 | return (this.get = hookFn).apply( this, arguments ); 18 | } 19 | }; 20 | } 21 | 22 | return addGetHookIf; 23 | 24 | }); 25 | -------------------------------------------------------------------------------- /_plugins/sorted_chapters.rb: -------------------------------------------------------------------------------- 1 | module Next 2 | class Generator < Jekyll::Generator 3 | def generate(site) 4 | # puts site.collections["chapters"].docs.class 5 | chapter_groups = site.collections["chapters"].docs.group_by do |section| 6 | section.relative_path.split('/')[1] # group by chapter number 7 | end 8 | chapter_groups_sorted = Hash[chapter_groups.sort_by{|i, c| i.to_i}] # sort the chapters 9 | chapter_groups_sorted.each do |k, v| 10 | v.sort_by!{|i, c| i.to_i} if v.class == 'Array' # sort the sections 11 | end 12 | site.config['chapter_groups'] = chapter_groups_sorted 13 | site.config['sorted_chapters'] = chapter_groups_sorted.values.flatten 14 | end 15 | end 16 | end -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_wells.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: $well-bg; 12 | border: 1px solid $well-border; 13 | border-radius: $border-radius-base; 14 | @include box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: $border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: $border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /bower_components/d3/README.md: -------------------------------------------------------------------------------- 1 | # Data-Driven Documents 2 | 3 | 4 | 5 | **D3.js** is a JavaScript library for manipulating documents based on data. **D3** helps you bring data to life using HTML, SVG and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation. 6 | 7 | Want to learn more? [See the wiki.](https://github.com/mbostock/d3/wiki) 8 | 9 | For examples, [see the gallery](https://github.com/mbostock/d3/wiki/Gallery) and [mbostock’s bl.ocks](http://bl.ocks.org/mbostock). 10 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_component-animations.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | @include transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | &.in { 21 | display: block; 22 | } 23 | } 24 | .collapsing { 25 | position: relative; 26 | height: 0; 27 | overflow: hidden; 28 | @include transition(height .35s ease); 29 | } 30 | -------------------------------------------------------------------------------- /bower_components/jquery/src/jquery.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "./core", 3 | "./selector", 4 | "./traversing", 5 | "./callbacks", 6 | "./deferred", 7 | "./core/ready", 8 | "./data", 9 | "./queue", 10 | "./queue/delay", 11 | "./attributes", 12 | "./event", 13 | "./event/alias", 14 | "./manipulation", 15 | "./manipulation/_evalUrl", 16 | "./wrap", 17 | "./css", 18 | "./css/hiddenVisibleSelectors", 19 | "./serialize", 20 | "./ajax", 21 | "./ajax/xhr", 22 | "./ajax/script", 23 | "./ajax/jsonp", 24 | "./ajax/load", 25 | "./effects", 26 | "./effects/animatedSelector", 27 | "./offset", 28 | "./dimensions", 29 | "./deprecated", 30 | "./exports/amd", 31 | "./exports/global" 32 | ], function( jQuery ) { 33 | 34 | return jQuery; 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-sass", 3 | "version": "3.1.1", 4 | "homepage": "https://github.com/twbs/bootstrap-sass", 5 | "authors": [ 6 | "Thomas McDonald", 7 | "Tristan Harward", 8 | "Peter Gumeson", 9 | "Gleb Mazovetskiy" 10 | ], 11 | "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.", 12 | "main": ["vendor/assets/stylesheets/bootstrap.scss", "vendor/assets/javascripts/bootstrap.js"], 13 | "keywords": [ 14 | "twbs", 15 | "bootstrap", 16 | "sass" 17 | ], 18 | "license": "MIT", 19 | "ignore": [ 20 | "**/.*", "lib", "tasks", "templates", "test", "*.gemspec", "Rakefile", "Gemfile" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal; 8 | margin-bottom: $line-height-computed; 9 | list-style: none; 10 | background-color: $breadcrumb-bg; 11 | border-radius: $border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "#{$breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: $breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: $breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /bower_components/jquery/src/exports/amd.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Register as a named AMD module, since jQuery can be concatenated with other 6 | // files that may use define, but not via a proper concatenation script that 7 | // understands anonymous AMD modules. A named AMD is safest and most robust 8 | // way to register. Lowercase jquery is used because AMD module names are 9 | // derived from file names, and jQuery is normally delivered in a lowercase 10 | // file name. Do this after creating the global so that if an AMD module wants 11 | // to call noConflict to hide this version of jQuery, it will work. 12 | if ( typeof define === "function" && define.amd ) { 13 | define( "jquery", [], function() { 14 | return jQuery; 15 | }); 16 | } 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /bower_components/d3/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "d3", 3 | "version": "3.4.6", 4 | "main": "d3.js", 5 | "scripts": [ 6 | "d3.js" 7 | ], 8 | "ignore": [ 9 | ".DS_Store", 10 | ".git", 11 | ".gitignore", 12 | ".npmignore", 13 | ".travis.yml", 14 | "Makefile", 15 | "bin", 16 | "component.json", 17 | "index.js", 18 | "lib", 19 | "node_modules", 20 | "package.json", 21 | "src", 22 | "test" 23 | ], 24 | "homepage": "https://github.com/mbostock/d3", 25 | "_release": "3.4.6", 26 | "_resolution": { 27 | "type": "version", 28 | "tag": "v3.4.6", 29 | "commit": "5d58ae83001016f6ad3c30191433bd6941498332" 30 | }, 31 | "_source": "git://github.com/mbostock/d3.git", 32 | "_target": "~3.4.6", 33 | "_originalSource": "d3", 34 | "_direct": true 35 | } -------------------------------------------------------------------------------- /bower_components/jquery/src/exports/global.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../var/strundefined" 4 | ], function( jQuery, strundefined ) { 5 | 6 | var 7 | // Map over jQuery in case of overwrite 8 | _jQuery = window.jQuery, 9 | 10 | // Map over the $ in case of overwrite 11 | _$ = window.$; 12 | 13 | jQuery.noConflict = function( deep ) { 14 | if ( window.$ === jQuery ) { 15 | window.$ = _$; 16 | } 17 | 18 | if ( deep && window.jQuery === jQuery ) { 19 | window.jQuery = _jQuery; 20 | } 21 | 22 | return jQuery; 23 | }; 24 | 25 | // Expose jQuery and $ identifiers, even in 26 | // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 27 | // and CommonJS for browser emulators (#13566) 28 | if ( typeof noGlobal === strundefined ) { 29 | window.jQuery = window.$ = jQuery; 30 | } 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /_chapters/7/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Projects 3 | layout: intro 4 | index: 7 5 | 6 | date: 7 | October 30 8 | 9 | overview: 10 | This week will be an opportunity for you to ask questions about the final project, followed by a work session where you can get help with your project from me and your classmates. 11 | 12 | reading: 13 | 'Optional: read [this blog post](http://qrohlf.com/posts/creating-lisst/) about what I think makes for a successful project.' 14 | 15 | due: 16 | "Post 1-3 ideas for your project topic on this [GitHub thread](https://github.com/qrohlf/sensible-web-development/issues/3) by TUESDAY. I will follow up with you to make sure that you've got a feasible project topic chosen by THURSDAY. See the next page for some guidelines for the project." 17 | 18 | workshop: 19 | Projects Q&A/Office Hours 20 | 21 | --- 22 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /bower_components/jquery/src/manipulation/support.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../var/support" 3 | ], function( support ) { 4 | 5 | (function() { 6 | var fragment = document.createDocumentFragment(), 7 | div = fragment.appendChild( document.createElement( "div" ) ); 8 | 9 | // #11217 - WebKit loses check when the name is after the checked attribute 10 | div.innerHTML = ""; 11 | 12 | // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 13 | // old WebKit doesn't clone checked state correctly in fragments 14 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 15 | 16 | // Make sure textarea (and checkbox) defaultValue is properly cloned 17 | // Support: IE9-IE11+ 18 | div.innerHTML = ""; 19 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 20 | })(); 21 | 22 | return support; 23 | 24 | }); 25 | -------------------------------------------------------------------------------- /bower_components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.1.0", 4 | "main": "dist/jquery.js", 5 | "license": "MIT", 6 | "ignore": [ 7 | "**/.*", 8 | "build", 9 | "speed", 10 | "test", 11 | "*.md", 12 | "AUTHORS.txt", 13 | "Gruntfile.js", 14 | "package.json" 15 | ], 16 | "devDependencies": { 17 | "sizzle": "1.10.16", 18 | "requirejs": "~2.1.8", 19 | "qunit": "~1.12.0", 20 | "sinon": "~1.7.3" 21 | }, 22 | "keywords": [ 23 | "jquery", 24 | "javascript", 25 | "library" 26 | ], 27 | "homepage": "https://github.com/jquery/jquery", 28 | "_release": "2.1.0", 29 | "_resolution": { 30 | "type": "version", 31 | "tag": "2.1.0", 32 | "commit": "9434e03193c45d51bbd063a0edd1a07a6178d33f" 33 | }, 34 | "_source": "git://github.com/jquery/jquery.git", 35 | "_target": "~2.1.0", 36 | "_originalSource": "jquery", 37 | "_direct": true 38 | } -------------------------------------------------------------------------------- /bower_components/bootstrap/less/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(all .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | &:extend(.img-responsive); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {% if page.title %}{{ page.title }} · {{ site.name }} {% else %}{{ site.name }} by @qrohlf{% endif %} 10 | 11 | 12 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /bower_components/trianglify/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "trianglify", 3 | "main": "trianglify.js", 4 | "version": "0.1.3", 5 | "homepage": "https://github.com/qrohlf/trianglify", 6 | "authors": [ 7 | "Quinn Rohlf " 8 | ], 9 | "description": "Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.", 10 | "keywords": [ 11 | "svg", 12 | "d3.js", 13 | "visualization" 14 | ], 15 | "license": "GPLv3", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "test", 21 | "tests" 22 | ], 23 | "_release": "0.1.3", 24 | "_resolution": { 25 | "type": "version", 26 | "tag": "v0.1.3", 27 | "commit": "ed992acc9bcfe7cacbaed38146498fa90e01fbbd" 28 | }, 29 | "_source": "git://github.com/qrohlf/trianglify.git", 30 | "_target": "~0.1.3", 31 | "_originalSource": "trianglify", 32 | "_direct": true 33 | } -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_close.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: ($font-size-base * 1.5); 9 | font-weight: $close-font-weight; 10 | line-height: 1; 11 | color: $close-color; 12 | text-shadow: $close-text-shadow; 13 | @include opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: $close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | @include opacity(.5); 21 | } 22 | 23 | // [converter] extracted button& to button.close 24 | } 25 | 26 | // Additional properties for button version 27 | // iOS requires the button element instead of an anchor tag. 28 | // If you want the anchor version, it requires `href="#"`. 29 | button.close { 30 | padding: 0; 31 | cursor: pointer; 32 | background: transparent; 33 | border: 0; 34 | -webkit-appearance: none; 35 | } 36 | -------------------------------------------------------------------------------- /_chapters/3/1-additional-help.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Additional Help 3 | summary: Places to go to learn more 4 | layout: default 5 | index: 3.1 6 | --- 7 | 8 | # Help! I don't quite understand... 9 | 10 | 11 | ## ...Ruby 12 | 13 | If you're having trouble with Ruby, you might find the official Ruby [quickstart](https://www.ruby-lang.org/en/documentation/quickstart/) tutorial helpful. It walks you through basic syntax, methods, string interpolation, classes, looping, blocks, and duck typing. 14 | 15 | You can also try going through the [Try Ruby](http://tryruby.org) interactive tutorial again, this time making sure you understand everything that you're doing before moving on. 16 | 17 | ## ...Git 18 | 19 | If the [Try Git](http://try.github.io) tutorial didn't make sense to you, the Git Basics [Video Series](http://git-scm.com/videos) might be a good place to go for some additional help. 20 | 21 | ## ...Sinatra 22 | 23 | Read the [Readme](http://www.sinatrarb.com/intro.html). 24 | -------------------------------------------------------------------------------- /bower_components/bootstrap/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "version": "3.1.1", 4 | "main": [ 5 | "./dist/css/bootstrap.css", 6 | "./dist/js/bootstrap.js", 7 | "./dist/fonts/glyphicons-halflings-regular.eot", 8 | "./dist/fonts/glyphicons-halflings-regular.svg", 9 | "./dist/fonts/glyphicons-halflings-regular.ttf", 10 | "./dist/fonts/glyphicons-halflings-regular.woff" 11 | ], 12 | "ignore": [ 13 | "**/.*", 14 | "_config.yml", 15 | "CNAME", 16 | "composer.json", 17 | "CONTRIBUTING.md", 18 | "docs", 19 | "js/tests" 20 | ], 21 | "dependencies": { 22 | "jquery": ">= 1.9.0" 23 | }, 24 | "homepage": "https://github.com/twbs/bootstrap", 25 | "_release": "3.1.1", 26 | "_resolution": { 27 | "type": "version", 28 | "tag": "v3.1.1", 29 | "commit": "a365d8689c3f3cee7f1acf86b61270ecca8e106d" 30 | }, 31 | "_source": "git://github.com/twbs/bootstrap.git", 32 | "_target": "~3.1.1", 33 | "_originalSource": "bootstrap", 34 | "_direct": true 35 | } -------------------------------------------------------------------------------- /bower_components/trianglify/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var uglify = require('gulp-uglify'); 3 | var jshint = require('gulp-jshint'); 4 | var rename = require('gulp-rename'); 5 | var stylish = require('jshint-stylish'); 6 | var del = require('del'); 7 | 8 | gulp.task('clean', function(callback) { 9 | del('trianglify.min.js', callback) 10 | }); 11 | 12 | gulp.task('jshint', function() { 13 | // Minify and copy all JavaScript (except vendor scripts) 14 | // with sourcemaps all the way down 15 | return gulp.src('trianglify.js') 16 | .pipe(jshint()) 17 | .pipe(jshint.reporter('jshint-stylish')) 18 | .pipe(jshint.reporter('fail')); 19 | }); 20 | 21 | gulp.task('minify', ['clean', 'jshint'], function() { 22 | // Minify and copy all JavaScript (except vendor scripts) 23 | // with sourcemaps all the way down 24 | return gulp.src('trianglify.js') 25 | .pipe(uglify()) 26 | .pipe(rename('trianglify.min.js')) 27 | .pipe(gulp.dest('.')); 28 | }); 29 | 30 | gulp.task('default', ['minify']); 31 | -------------------------------------------------------------------------------- /_chapters/12/1-example-repo.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Example Repo 3 | summary: working reference code for when you get stuck 4 | layout: default 5 | index: 12.1 6 | --- 7 | 8 | One of the resources available to you for this course is a GitHub repo containing working solutions to all the labs. It should be helpful for when you get stuck or can't quite remember how to do something. Just keep in mind that you'll probably get a lot more out of the labs if you try to come up with your own solutions first before looking at the reference code. 9 | 10 | The repo is located at https://github.com/qrohlf/webdev-examples. 11 | 12 | To check it out, simply clone it: 13 | 14 | ```bash 15 | git clone https://github.com/qrohlf/webdev-examples.git 16 | ``` 17 | 18 | And then to view the solution for a particular lab, just check out the relevant release using git tags. (You can view a list of the releases on [GitHub](https://github.com/qrohlf/webdev-examples/releases)) 19 | 20 | ```bash 21 | git checkout v0.1.0 # check out the example for lab 1 22 | ``` 23 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twbs/bootstrap-sass", 3 | "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.", 4 | "keywords": ["bootstrap", "css", "sass"], 5 | "homepage": "http://github.com/twbs/bootstrap-sass", 6 | "authors": [ 7 | { 8 | "name": "Thomas McDonald" 9 | }, 10 | { 11 | "name": "Tristan Harward" 12 | }, 13 | { 14 | "name": "Peter Gumeson" 15 | }, 16 | { 17 | "name": "Gleb Mazovetskiy" 18 | }, 19 | { 20 | "name": "Mark Otto" 21 | }, 22 | { 23 | "name": "Jacob Thornton" 24 | } 25 | ], 26 | "support": { 27 | "issues": "https://github.com/twbs/bootstrap-sass/issues" 28 | }, 29 | "license": "MIT", 30 | "extra": { 31 | "branch-alias": { 32 | "dev-master": "3.1.x-dev" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | } 57 | -------------------------------------------------------------------------------- /bower_components/trianglify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "trianglify", 3 | "version": "0.1.3", 4 | "description": "Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.", 5 | "main": "trianglify.js", 6 | "dependencies": { 7 | "d3": "3", 8 | "jsdom": "0.10", 9 | "xmldom": "0.1", 10 | "btoa": "1" 11 | }, 12 | "directories": { 13 | "example": "examples" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/qrohlf/trianglify.git" 18 | }, 19 | "keywords": [ 20 | "svg", 21 | "d3.js", 22 | "visualization" 23 | ], 24 | "author": "Quinn Rohlf ", 25 | "license": "GPLv3", 26 | "bugs": { 27 | "url": "https://github.com/qrohlf/trianglify/issues" 28 | }, 29 | "homepage": "https://github.com/qrohlf/trianglify", 30 | "devDependencies": { 31 | "gulp": "^3.8.6", 32 | "jshint-stylish": "^0.4.0", 33 | "gulp-uglify": "^0.3.1", 34 | "gulp-jshint": "^1.7.1", 35 | "del": "^0.1.1", 36 | "gulp-rename": "^1.2.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /_chapters/2/3-debugging-css.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Debugging CSS 3 | summary: An introduction to web debugging 4 | layout: default 5 | index: 2.3 6 | --- 7 | # In-Browser Debugging 8 | 9 | One of the most useful features of modern browsers is that they all come with an extensive set of tools for inspecting how your CSS styles are interacting with your webpage's HTML. My preferred browser for debugging web sites is Google Chrome - here's a tutorial on how to use Chrome's developer tools: 10 | 11 | [Chrome DevTools Overview](https://developer.chrome.com/devtools#dom-and-styles) 12 | 13 | The section on "Inspecting the DOM and Styles" should be most helpful for this chapter. 14 | 15 | # Other Browsers 16 | While I like Chrome's dev tools best, it's definitely a personal preference. Here are links to developer tools documentation for other major browsers: 17 | 18 | - [Firefox](https://developer.mozilla.org/en-US/docs/Tools) 19 | 20 | - [Safari](https://developer.apple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Introduction/Introduction.html) 21 | 22 | - [IE](http://i.imgur.com/EmeXvye.jpg) 23 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding; 8 | margin-bottom: @jumbotron-padding; 9 | color: @jumbotron-color; 10 | background-color: @jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: @jumbotron-heading-color; 15 | } 16 | p { 17 | margin-bottom: (@jumbotron-padding / 2); 18 | font-size: @jumbotron-font-size; 19 | font-weight: 200; 20 | } 21 | 22 | .container & { 23 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 24 | } 25 | 26 | .container { 27 | max-width: 100%; 28 | } 29 | 30 | @media screen and (min-width: @screen-sm-min) { 31 | padding-top: (@jumbotron-padding * 1.6); 32 | padding-bottom: (@jumbotron-padding * 1.6); 33 | 34 | .container & { 35 | padding-left: (@jumbotron-padding * 2); 36 | padding-right: (@jumbotron-padding * 2); 37 | } 38 | 39 | h1, 40 | .h1 { 41 | font-size: (@font-size-base * 4.5); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/media.less: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_thumbnails.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: $thumbnail-padding; 10 | margin-bottom: $line-height-computed; 11 | line-height: $line-height-base; 12 | background-color: $thumbnail-bg; 13 | border: 1px solid $thumbnail-border; 14 | border-radius: $thumbnail-border-radius; 15 | @include transition(all .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | @include img-responsive(); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // [converter] extracted a&:hover, a&:focus, a&.active to a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active 25 | 26 | // Image captions 27 | .caption { 28 | padding: $thumbnail-caption-padding; 29 | color: $thumbnail-caption-color; 30 | } 31 | } 32 | 33 | // Add a hover state for linked versions only 34 | a.thumbnail:hover, 35 | a.thumbnail:focus, 36 | a.thumbnail.active { 37 | border-color: $link-color; 38 | } 39 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_utilities.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | @include clearfix(); 11 | } 12 | .center-block { 13 | @include center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | @include text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | } 57 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /bower_components/jquery/src/core/parseHTML.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "./var/rsingleTag", 4 | "../manipulation" // buildFragment 5 | ], function( jQuery, rsingleTag ) { 6 | 7 | // data: string of html 8 | // context (optional): If specified, the fragment will be created in this context, defaults to document 9 | // keepScripts (optional): If true, will include scripts passed in the html string 10 | jQuery.parseHTML = function( data, context, keepScripts ) { 11 | if ( !data || typeof data !== "string" ) { 12 | return null; 13 | } 14 | if ( typeof context === "boolean" ) { 15 | keepScripts = context; 16 | context = false; 17 | } 18 | context = context || document; 19 | 20 | var parsed = rsingleTag.exec( data ), 21 | scripts = !keepScripts && []; 22 | 23 | // Single tag 24 | if ( parsed ) { 25 | return [ context.createElement( parsed[1] ) ]; 26 | } 27 | 28 | parsed = jQuery.buildFragment( [ data ], context, scripts ); 29 | 30 | if ( scripts && scripts.length ) { 31 | jQuery( scripts ).remove(); 32 | } 33 | 34 | return jQuery.merge( [], parsed.childNodes ); 35 | }; 36 | 37 | return jQuery.parseHTML; 38 | 39 | }); 40 | -------------------------------------------------------------------------------- /bower_components/jquery/src/attributes/support.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../var/support" 3 | ], function( support ) { 4 | 5 | (function() { 6 | var input = document.createElement( "input" ), 7 | select = document.createElement( "select" ), 8 | opt = select.appendChild( document.createElement( "option" ) ); 9 | 10 | input.type = "checkbox"; 11 | 12 | // Support: iOS 5.1, Android 4.x, Android 2.3 13 | // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere) 14 | support.checkOn = input.value !== ""; 15 | 16 | // Must access the parent to make an option select properly 17 | // Support: IE9, IE10 18 | support.optSelected = opt.selected; 19 | 20 | // Make sure that the options inside disabled selects aren't marked as disabled 21 | // (WebKit marks them as disabled) 22 | select.disabled = true; 23 | support.optDisabled = !opt.disabled; 24 | 25 | // Check if an input maintains its value after becoming a radio 26 | // Support: IE9, IE10 27 | input = document.createElement( "input" ); 28 | input.value = "t"; 29 | input.type = "radio"; 30 | support.radioValue = input.value === "t"; 31 | })(); 32 | 33 | return support; 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /_chapters/2/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: "CSS" 3 | summary: Unleashing your inner artist 4 | layout: intro 5 | index: 2 6 | 7 | date: 8 | September 18 9 | 10 | overview: 11 | This week focuses on some of the visual aspects of web development, and should give you a good idea of how to customize the look and feel of your app. The lab is intentionally very open ended - while I'd love to see everyone's artistic chops, if you are behind on the previous lab, this is the week to get caught up. 12 | 13 | reading: 14 | "Optional reading: [James Mickens - To Wash It All Away](https://www.usenix.org/system/files/1403_02-08_mickens.pdf)" 15 | 16 | due: 17 | You should have [Lab 1](/chapters/1/0-up-and-running.html#assignment) completed before class. 18 | 19 | workshop: 20 | HTML, Git, and Ruby review, plus a short tutorial on basic CSS. 21 | 22 | assignment: 23 | title: "Lab 2: CSS Artistry" 24 | summary: Add some CSS to your todo list 25 | requirements: 26 | - Write at least one CSS rule that styles your todo list 27 | - Your CSS should be in a separate .css file. 28 | due: before next week's class 29 | tag: v0.2.0 30 | --- 31 | -------------------------------------------------------------------------------- /bower_components/bootstrap/grunt/bs-raw-files-generator.js: -------------------------------------------------------------------------------- 1 | /* global btoa: true */ 2 | /*! 3 | * Bootstrap Grunt task for generating raw-files.min.js for the Customizer 4 | * http://getbootstrap.com 5 | * Copyright 2014 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | */ 8 | 'use strict'; 9 | var btoa = require('btoa'); 10 | var fs = require('fs'); 11 | 12 | function getFiles(type) { 13 | var files = {}; 14 | fs.readdirSync(type) 15 | .filter(function (path) { 16 | return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path); 17 | }) 18 | .forEach(function (path) { 19 | var fullPath = type + '/' + path; 20 | files[path] = (type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8')); 21 | }); 22 | return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'; 23 | } 24 | 25 | module.exports = function generateRawFilesJs(banner) { 26 | if (!banner) { 27 | banner = ''; 28 | } 29 | var files = banner + getFiles('js') + getFiles('less') + getFiles('fonts'); 30 | fs.writeFileSync('docs/assets/js/raw-files.min.js', files); 31 | }; 32 | -------------------------------------------------------------------------------- /_chapters/12/2-git-cheatsheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Git Cheatsheet 3 | summary: A quick reference for common Git-related tasks 4 | layout: default 5 | index: 12.2 6 | --- 7 | 8 | # Git Cheatsheet 9 | 10 | This page is a quick reference of common Git tasks. 11 | 12 | ## Initialize a repository 13 | 14 | ```sh 15 | mkdir my-repo 16 | cd my-repo 17 | git init 18 | ``` 19 | 20 | ## Add all modified and new files to a commit 21 | 22 | ```sh 23 | git add -A 24 | ``` 25 | 26 | ## Shortcut to specify a commit message on the command line 27 | 28 | ```sh 29 | git commit -m "my commit message" 30 | ``` 31 | 32 | ## Shortcut to commit all modified files with one command 33 | 34 | ```sh 35 | git commit -am "my commit message" 36 | ``` 37 | 38 | ## My commit messages are opening in emacs/vim/nano 39 | 40 | See https://help.github.com/articles/associating-text-editors-with-git to change your default text editor to use with git. 41 | 42 | ## Should I commit my changes? 43 | 44 | Yes. 45 | 46 | ## Tag a finished lab or resubmission and push it to GitHub 47 | 48 | ```sh 49 | git tag v0.X.X # replace X.X with the appropriate version numbers 50 | git push 51 | git push v0.X.X 52 | ``` 53 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: $jumbotron-padding; 8 | margin-bottom: $jumbotron-padding; 9 | color: $jumbotron-color; 10 | background-color: $jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: $jumbotron-heading-color; 15 | } 16 | p { 17 | margin-bottom: ($jumbotron-padding / 2); 18 | font-size: $jumbotron-font-size; 19 | font-weight: 200; 20 | } 21 | 22 | .container & { 23 | border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container 24 | } 25 | 26 | .container { 27 | max-width: 100%; 28 | } 29 | 30 | @media screen and (min-width: $screen-sm-min) { 31 | padding-top: ($jumbotron-padding * 1.6); 32 | padding-bottom: ($jumbotron-padding * 1.6); 33 | 34 | .container & { 35 | padding-left: ($jumbotron-padding * 2); 36 | padding-right: ($jumbotron-padding * 2); 37 | } 38 | 39 | h1, 40 | .h1 { 41 | font-size: ($font-size-base * 4.5); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_media.scss: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_pager.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: $line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | @include clearfix(); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: $pager-bg; 19 | border: 1px solid $pager-border; 20 | border-radius: $pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: $pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: $pager-disabled-color; 50 | background-color: $pager-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/bootstrap.scss: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "variables"; 3 | @import "mixins"; 4 | 5 | // Reset 6 | @import "normalize"; 7 | @import "print"; 8 | 9 | // Core CSS 10 | @import "scaffolding"; 11 | @import "type"; 12 | @import "code"; 13 | @import "grid"; 14 | @import "tables"; 15 | @import "forms"; 16 | @import "buttons"; 17 | 18 | // Components 19 | @import "component-animations"; 20 | @import "glyphicons"; 21 | @import "dropdowns"; 22 | @import "button-groups"; 23 | @import "input-groups"; 24 | @import "navs"; 25 | @import "navbar"; 26 | @import "breadcrumbs"; 27 | @import "pagination"; 28 | @import "pager"; 29 | @import "labels"; 30 | @import "badges"; 31 | @import "jumbotron"; 32 | @import "thumbnails"; 33 | @import "alerts"; 34 | @import "progress-bars"; 35 | @import "media"; 36 | @import "list-group"; 37 | @import "panels"; 38 | @import "wells"; 39 | @import "close"; 40 | 41 | // Components w/ JavaScript 42 | @import "modals"; 43 | @import "tooltip"; 44 | @import "popovers"; 45 | @import "carousel"; 46 | 47 | // Utility classes 48 | @import "utilities"; 49 | @import "responsive-utilities"; 50 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-sass", 3 | "version": "3.1.1", 4 | "homepage": "https://github.com/twbs/bootstrap-sass", 5 | "authors": [ 6 | "Thomas McDonald", 7 | "Tristan Harward", 8 | "Peter Gumeson", 9 | "Gleb Mazovetskiy" 10 | ], 11 | "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.", 12 | "main": [ 13 | "vendor/assets/stylesheets/bootstrap.scss", 14 | "vendor/assets/javascripts/bootstrap.js" 15 | ], 16 | "keywords": [ 17 | "twbs", 18 | "bootstrap", 19 | "sass" 20 | ], 21 | "license": "MIT", 22 | "ignore": [ 23 | "**/.*", 24 | "lib", 25 | "tasks", 26 | "templates", 27 | "test", 28 | "*.gemspec", 29 | "Rakefile", 30 | "Gemfile" 31 | ], 32 | "_release": "3.1.1", 33 | "_resolution": { 34 | "type": "version", 35 | "tag": "v3.1.1", 36 | "commit": "cd4062f43dcb5293da8b10ee455a5c6d0aab0b91" 37 | }, 38 | "_source": "git://github.com/twbs/bootstrap-sass.git", 39 | "_target": "~3.1.1", 40 | "_originalSource": "bootstrap-sass-official", 41 | "_direct": true 42 | } -------------------------------------------------------------------------------- /bower_components/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2014 Twitter, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Twitter, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /_chapters/5/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Deployment 3 | layout: intro 4 | index: 5 5 | 6 | date: 7 | October 16 8 | 9 | overview: 10 | So far, all of your apps have been running *locally*, only accessible on your own machine. This week, we'll be *deploying* our applications to a server that's accessible from anywhere on the internet. 11 | 12 | reading: 13 | None. 14 | 15 | due: 16 | You will need to have Lab 4 finished before you can deploy your application. 17 | 18 | workshop: 19 | Deploying your application to Heroku 20 | 21 | assignment: 22 | title: "Lab 5: Deployment" 23 | summary: This week, you will deploy your application to Heroku. 24 | requirements: 25 | - Your application should be deployed on Heroku. 26 | - You should add a Readme file to your repository which includes a link to your deployed application. 27 | - Users of your app should be able to view the todo list over the web. 28 | - Users of your app should be able to add items to the todo list over the web. 29 | - Users of your app should be able to remove items from the todo list over the web. 30 | due: before next week's class 31 | tag: v0.5.0 32 | --- 33 | -------------------------------------------------------------------------------- /bower_components/jquery/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 jQuery Foundation and other contributors 2 | http://jquery.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /_layouts/intro.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |

Week {{page.index}}: {{page.subtitle}}

6 |

Class date: {{page.date}}

7 | 8 | {% if page.overview %} 9 |

Overview

10 | {{page.overview | markdownify}} 11 | {% endif %} 12 | 13 | {% if page.due %} 14 |

Due

15 | {{page.due | markdownify}} 16 | {% endif %} 17 | 18 | {% if page.reading %} 19 |

Reading

20 | {{page.reading | markdownify}} 21 | {% endif %} 22 | 23 | {{ content }} 24 | 25 | {% if page.assignment %} 26 |

This Week's Assignment

27 |
28 |
29 |

{{page.assignment.title}}

30 |
31 |
32 |

{{page.assignment.summary | markdownify}}

33 |

Requirements:

34 |
    35 | {% for req in page.assignment.requirements %} 36 |
  • {{req | markdownify}}
  • 37 | {% endfor %} 38 |
39 |

Due Date:

40 |

{{page.assignment.due | markdownify}}

41 |
42 | 45 |
46 |

47 | {% endif %} 48 | -------------------------------------------------------------------------------- /_chapters/5/5-readmes-and-deleting.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Deleting Items 3 | summary: Some tips to help you finish Lab 5 4 | layout: default 5 | index: 5.5 6 | --- 7 | 8 | # On The Subject of Deleting... 9 | 10 | Basically, to delete you need a way to tell the server to delete an item from the browser. You already have all the knowledge you need in order to do this. Here's a quick recap: 11 | 12 | ### Sending data between the browser and server 13 | 14 | To send data between the browser and server, we can use an html form: 15 | 16 | ```html 17 |
18 | 19 | 20 | 21 |
22 | ``` 23 | 24 | And then process it in a callback in `app.rb`: 25 | 26 | ```ruby 27 | post '/some_endpoint' do 28 | some_user_data = params[:some_user_data] 29 | some_constant_data = params[:some_constant_data] 30 | # do some action with that data 31 | end 32 | ``` 33 | 34 | ### Deleting an item on the server: 35 | 36 | ActiveRecord makes this easy 37 | 38 | ```ruby 39 | some_id = 7 #the id of the item you want to delete 40 | TodoItem.find(some_id).destroy 41 | ``` -------------------------------------------------------------------------------- /_plugins/schedule.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | class ScheduleTag < Liquid::Tag 3 | 4 | def initialize(tag_name, text, tokens) 5 | super 6 | @text = text 7 | end 8 | 9 | def render(context) 10 | toc = [] 11 | @site = context.registers[:site] 12 | 13 | output = [] 14 | @site.config['chapter_groups'].each do |i, c| 15 | intro = c[0].data 16 | next if intro['layout'] != 'intro' 17 | output << "

Week #{intro['index']}: #{intro['subtitle']}#{intro['date']}

" 18 | output << "

Assignments Due

#{md(intro['due'])}" unless intro['due'].nil? 19 | output << "

Reading Due

#{md(intro['reading'])}" unless intro['reading'].nil? 20 | output << "

Workshop Topic

#{md(intro['workshop'])}" unless intro['workshop'].nil? 21 | output << "

Lab Assigned

#{md(intro['assignment']['title'])}" unless intro['assignment'].nil? 22 | end 23 | output.join(''); 24 | end 25 | 26 | def md(string) 27 | converter = @site.getConverterImpl(::Jekyll::Converters::Markdown) 28 | converter.convert(string) 29 | end 30 | end 31 | end 32 | 33 | Liquid::Template.register_tag('schedule', Jekyll::ScheduleTag) 34 | 35 | -------------------------------------------------------------------------------- /bower_components/jquery/src/event/alias.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../event" 4 | ], function( jQuery ) { 5 | 6 | jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + 7 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 8 | "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { 9 | 10 | // Handle event binding 11 | jQuery.fn[ name ] = function( data, fn ) { 12 | return arguments.length > 0 ? 13 | this.on( name, null, data, fn ) : 14 | this.trigger( name ); 15 | }; 16 | }); 17 | 18 | jQuery.fn.extend({ 19 | hover: function( fnOver, fnOut ) { 20 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 21 | }, 22 | 23 | bind: function( types, data, fn ) { 24 | return this.on( types, null, data, fn ); 25 | }, 26 | unbind: function( types, fn ) { 27 | return this.off( types, null, fn ); 28 | }, 29 | 30 | delegate: function( selector, types, data, fn ) { 31 | return this.on( types, selector, data, fn ); 32 | }, 33 | undelegate: function( selector, types, fn ) { 34 | // ( namespace ) or ( selector, types [, fn] ) 35 | return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); 36 | } 37 | }); 38 | 39 | }); 40 | -------------------------------------------------------------------------------- /bower_components/bootstrap/grunt/shrinkwrap.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for generating npm-shrinkwrap.canonical.json 3 | * http://getbootstrap.com 4 | * Copyright 2014 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | /* 8 | This Grunt task updates the npm-shrinkwrap.canonical.json file that's used as the key for Bootstrap's npm packages cache. 9 | This task should be run and the updated file should be committed whenever Bootstrap's dependencies change. 10 | */ 11 | 'use strict'; 12 | var canonicallyJsonStringify = require('canonical-json'); 13 | var NON_CANONICAL_FILE = 'npm-shrinkwrap.json'; 14 | var DEST_FILE = 'test-infra/npm-shrinkwrap.canonical.json'; 15 | 16 | 17 | function updateShrinkwrap(grunt) { 18 | // Assumption: Non-canonical shrinkwrap already generated by prerequisite Grunt task 19 | var shrinkwrapData = grunt.file.readJSON(NON_CANONICAL_FILE); 20 | grunt.log.writeln('Deleting ' + NON_CANONICAL_FILE.cyan + '...'); 21 | grunt.file.delete(NON_CANONICAL_FILE); 22 | // Output as Canonical JSON in correct location 23 | grunt.file.write(DEST_FILE, canonicallyJsonStringify(shrinkwrapData)); 24 | grunt.log.writeln('File ' + DEST_FILE.cyan + ' updated.'); 25 | } 26 | 27 | 28 | module.exports = updateShrinkwrap; 29 | -------------------------------------------------------------------------------- /_chapters/12/0-resources.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Appendix 3 | layout: default 4 | index: 12 5 | --- 6 | 7 | # Quick Links 8 | 9 | ## Recommended Text Editors 10 | - [Atom](https://atom.io) 11 | - [Sublime Text](http://www.sublimetext.com) 12 | 13 | ## Ruby Documentation 14 | 15 | - [Official Ruby Docs](http://www.ruby-doc.org) 16 | - [Omniref](https://www.omniref.com) 17 | - [Sinatra Readme](http://www.sinatrarb.com/intro.html) 18 | 19 | ## HTML 20 | - [MDN HTML Tutorial](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Introduction) 21 | - [MDN HTML Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) 22 | - [Code School HTML 101](http://www.codecademy.com/courses/html-one-o-one/0/1) 23 | 24 | ## Browser Developer Tools Documentation 25 | 26 | - [Chrome](https://developer.chrome.com/devtools/index) 27 | - [Firefox](https://developer.mozilla.org/en-US/docs/Tools) 28 | - [Safari](https://developer.apple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Introduction/Introduction.html) 29 | - [IE](http://i.imgur.com/EmeXvye.jpg) 30 | 31 | ## CSS Frameworks 32 | 33 | - [Bootstrap](http://getbootstrap.com) 34 | - [Foundation](http://foundation.zurb.com) 35 | 36 | 37 | ## More 38 | 39 | - [My personal list of useful tools](https://github.com/qrohlf/tools) 40 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/bootstrap.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "variables.less"; 3 | @import "mixins.less"; 4 | 5 | // Reset 6 | @import "normalize.less"; 7 | @import "print.less"; 8 | 9 | // Core CSS 10 | @import "scaffolding.less"; 11 | @import "type.less"; 12 | @import "code.less"; 13 | @import "grid.less"; 14 | @import "tables.less"; 15 | @import "forms.less"; 16 | @import "buttons.less"; 17 | 18 | // Components 19 | @import "component-animations.less"; 20 | @import "glyphicons.less"; 21 | @import "dropdowns.less"; 22 | @import "button-groups.less"; 23 | @import "input-groups.less"; 24 | @import "navs.less"; 25 | @import "navbar.less"; 26 | @import "breadcrumbs.less"; 27 | @import "pagination.less"; 28 | @import "pager.less"; 29 | @import "labels.less"; 30 | @import "badges.less"; 31 | @import "jumbotron.less"; 32 | @import "thumbnails.less"; 33 | @import "alerts.less"; 34 | @import "progress-bars.less"; 35 | @import "media.less"; 36 | @import "list-group.less"; 37 | @import "panels.less"; 38 | @import "wells.less"; 39 | @import "close.less"; 40 | 41 | // Components w/ JavaScript 42 | @import "modals.less"; 43 | @import "tooltip.less"; 44 | @import "popovers.less"; 45 | @import "carousel.less"; 46 | 47 | // Utility classes 48 | @import "utilities.less"; 49 | @import "responsive-utilities.less"; 50 | -------------------------------------------------------------------------------- /_chapters/6/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Databases II 3 | layout: intro 4 | index: 6 5 | 6 | date: 7 | October 23 8 | 9 | overview: 10 | "This week, we'll be covering some more advanced database functionality - validations and relations. This will be the last lab of the class; we'll be moving into projects next week." 11 | 12 | reading: 13 | None this week. 14 | 15 | due: 16 | You should have Lab 5 completed prior to class. 17 | 18 | workshop: 19 | Advanced ActiveRecord - validations and relations. 20 | 21 | assignment: 22 | title: "Lab 6: Multi-user app" 23 | summary: Turn your app into a multi-user todo list using ActiveRecord relations 24 | requirements: 25 | - "while this spec has users in mind, it is also acceptable to do something else using a relation in your database. For example, instead of adding 'users', you could modify your app to handle multiple 'lists' of items" 26 | - write a migration to add a `users` table to your application. 27 | - "write a migration to add a `user_id` column to your `todo_items` table" 28 | - "each user should get their own todo list that they can add and delete items on" 29 | - the root route or index should now show a list of links to users' todo lists. 30 | due: before next week's class 31 | tag: v0.6.0 32 | --- 33 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | .btn-xs & { 32 | top: 0; 33 | padding: 1px 5px; 34 | } 35 | } 36 | 37 | // Hover state, but only for links 38 | a.badge { 39 | &:hover, 40 | &:focus { 41 | color: @badge-link-hover-color; 42 | text-decoration: none; 43 | cursor: pointer; 44 | } 45 | } 46 | 47 | // Account for counters in navs 48 | a.list-group-item.active > .badge, 49 | .nav-pills > .active > a > .badge { 50 | color: @badge-active-color; 51 | background-color: @badge-active-bg; 52 | } 53 | .nav-pills > li > a > .badge { 54 | margin-left: 3px; 55 | } 56 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_badges.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: $font-size-small; 12 | font-weight: $badge-font-weight; 13 | color: $badge-color; 14 | line-height: $badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: $badge-bg; 19 | border-radius: $badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | .btn-xs & { 32 | top: 0; 33 | padding: 1px 5px; 34 | } 35 | } 36 | 37 | // Hover state, but only for links 38 | a.badge { 39 | &:hover, 40 | &:focus { 41 | color: $badge-link-hover-color; 42 | text-decoration: none; 43 | cursor: pointer; 44 | } 45 | } 46 | 47 | // Account for counters in navs 48 | a.list-group-item.active > .badge, 49 | .nav-pills > .active > a > .badge { 50 | color: $badge-active-color; 51 | background-color: $badge-active-bg; 52 | } 53 | .nav-pills > li > a > .badge { 54 | margin-left: 3px; 55 | } 56 | -------------------------------------------------------------------------------- /bower_components/bootstrap/less/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | &[href] { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /_chapters/4/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Databases 3 | layout: intro 4 | index: 4 5 | 6 | date: 7 | October 2 8 | 9 | overview: 10 | This week touches on some basic concepts related to databases on the web, then introduces the ActiveRecord database abstration layer. 11 | 12 | reading: 13 | Please familiarize yourself with [basic database terminology](http://homepages.ius.edu/DSCHWEI2/handouts/access/terms.htm) and [ActiveRecord basics](http://guides.rubyonrails.org/active_record_basics.html). Don't worry too much if you don't understand the code examples or migrations, just try to get a sense for what ActiveRecord's role is in a ruby web app. 14 | 15 | due: 16 | You should be caught up with the class, with your Lab 3 pushed to GitHub and tagged properly with a `v0.3.x` tag. 17 | 18 | workshop: 19 | Introduction to relational databases and ActiveRecord. 20 | 21 | assignment: 22 | title: "Lab 4: ActiveRecord" 23 | summary: Modify your todo list to use a database! 24 | requirements: 25 | - You should write an ActiveRecord migration to create your database 26 | - All dynamic data in your app should be loaded from a SQLite database using an ActiveRecord model 27 | - Your todo items should be displayed sorted by due date 28 | - Your form should now save data to the database instead of a file 29 | due: before next week's class 30 | tag: v0.4.0 31 | --- 32 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 | 8 | {% include header.html %} 9 | 10 |
11 |
12 |
13 |
14 | 20 | {% toc %} 21 |
22 |
23 | {{ content }} 24 | {% for chapter in site.sorted_chapters %} 25 | {% if chapter.url == page.url %} 26 | {% assign next = site.sorted_chapters[forloop.index] %} 27 | {% endif %} 28 | {% endfor %} 29 | {% if next.url %} 30 |
31 | 34 |
35 | {% endif %} 36 |
37 |
38 |
39 |
40 | 41 | {% include footer.html %} 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for Glyphicons data generation 3 | * http://getbootstrap.com 4 | * Copyright 2014 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 'use strict'; 8 | var fs = require('fs'); 9 | 10 | module.exports = function generateGlyphiconsData() { 11 | // Pass encoding, utf8, so `readFileSync` will return a string instead of a 12 | // buffer 13 | var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8'); 14 | var glpyhiconsLines = glyphiconsFile.split('\n'); 15 | 16 | // Use any line that starts with ".glyphicon-" and capture the class name 17 | var iconClassName = /^\.(glyphicon-[^\s]+)/; 18 | var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' + 19 | '# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n'; 20 | for (var i = 0, len = glpyhiconsLines.length; i < len; i++) { 21 | var match = glpyhiconsLines[i].match(iconClassName); 22 | 23 | if (match !== null) { 24 | glyphiconsData += '- ' + match[1] + '\n'; 25 | } 26 | } 27 | 28 | // Create the `_data` directory if it doesn't already exist 29 | if (!fs.existsSync('docs/_data')) { 30 | fs.mkdirSync('docs/_data'); 31 | } 32 | 33 | fs.writeFileSync('docs/_data/glyphicons.yml', glyphiconsData); 34 | }; 35 | -------------------------------------------------------------------------------- /_chapters/0/0-setup.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: Setup 3 | summary: Getting your system ready for this class 4 | layout: intro 5 | index: 0 6 | 7 | date: 8 | September 4 9 | 10 | overview: 11 | This week, we'll be getting our environments set up with Ruby and some other tools that are necessary for this class, as well as going over some basic HTML syntax and the GitHub turn-in system. 12 | 13 | reading: 14 | Please read the short MDN Introduction to HTML and complete the [Try Git](http://try.github.io) exercises before class. 15 | 16 | due: 17 | Development environment set up (instructions in sections 0.1-0.3 in this chapter) and GitHub account created 18 | 19 | workshop: 20 | HTTP and HTML basics, and how to turn in assignments via GitHub. 21 | 22 | assignment: 23 | title: "Lab 0: HTML Todo" 24 | summary: For next week, write a todo list in HTML. 25 | requirements: 26 | - You should use an appropriate list element (ul or li for your list) 27 | - Your list should include at least 3 items with due dates and 3 items without due dates. 28 | - Your list should pass the w3c validator with no errors. 29 | - "Optional: use CSS to style your list" 30 | due: before next week's class 31 | tag: v0.0.0 32 | --- 33 | -------------------------------------------------------------------------------- /_chapters/12/3-about-this-site.md: -------------------------------------------------------------------------------- 1 | --- 2 | subtitle: About This Site 3 | summary: How this site is built. 4 | layout: default 5 | index: 12.2 6 | --- 7 | 8 | If you're curious about the technology behind this website, here's what makes it tick: 9 | 10 | ## Page Generation & Styling 11 | 12 | The site content is built from a collection of [markdown](http://daringfireball.net/projects/markdown/) files into static HTML with a tool called [Jekyll](http://jekyllrb.com). I'm using [Twitter Bootstrap](http://getbootstrap.com) and [SASS](http://sass-lang.com) for styling. The header background images are generated client-side with a JavaScript library that I wrote called [Trianglify](http://qrohlf.com/trianglify/). 13 | 14 | ## Deployment 15 | 16 | This page is deployed Amazon's cloud using [Heroku](https://www.heroku.com). Jekyll generates the site's static files during asset compilation and then I use [Puma](http://puma.io) and Rack::TryStatic to serve the compiled site. I trigger the deployments through a script I wrote called [booyah](https://github.com/qrohlf/dotfiles/blob/master/functions/booyah.sh) to make sure that the Github repo and the depoyed site are both updated at the same time. 17 | 18 | ## Source 19 | 20 | All of the source for this site is available on [GitHub](https://github.com/qrohlf/sensible-web-development), and you can submit corrections and suggestions using the [Issue Tracker](https://github.com/qrohlf/sensible-web-development). 21 | -------------------------------------------------------------------------------- /_plugins/toc.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | class TocTag < Liquid::Tag 3 | 4 | def initialize(tag_name, text, tokens) 5 | super 6 | @text = text 7 | end 8 | 9 | def render(context) 10 | toc = [] 11 | @page = context.environments.first["page"] 12 | current_chapter = @page['relative_path'].split('/')[1] unless @page['relative_path'].nil? 13 | current_chapter = '-1' unless current_chapter =~ /^\d+$/ #default to chapter 0 14 | site = context.registers[:site] 15 | @baseurl = site.config['baseurl'] 16 | 17 | site.config['chapter_groups'].each do |i, c| 18 | toc << list_group_item(c[0]) 19 | if i == current_chapter 20 | c.drop(1).each do |section| 21 | toc << list_group_item(section, ['section']) 22 | end 23 | end 24 | end 25 | "
#{toc.join('')}
" 26 | end 27 | 28 | def list_group_item(section, classes=[]) 29 | subtitle = section.data['subtitle'] 30 | index = section.data['index'] 31 | unless index.nil? 32 | label = "#{index} · #{subtitle}" 33 | else 34 | label = subtitle 35 | end 36 | classes << 'list-group-item' 37 | classes << 'active' if @page['url'] == section.url 38 | "#{label}" 39 | end 40 | end 41 | end 42 | 43 | Liquid::Template.register_tag('toc', Jekyll::TocTag) 44 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap/_labels.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: $label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | &[href] { 19 | &:hover, 20 | &:focus { 21 | color: $label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | @include label-variant($label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | @include label-variant($label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | @include label-variant($label-success-bg); 52 | } 53 | 54 | .label-info { 55 | @include label-variant($label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | @include label-variant($label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | @include label-variant($label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /bower_components/jquery/src/core/access.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | // Multifunctional method to get and set values of a collection 6 | // The value/s can optionally be executed if it's a function 7 | var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 8 | var i = 0, 9 | len = elems.length, 10 | bulk = key == null; 11 | 12 | // Sets many values 13 | if ( jQuery.type( key ) === "object" ) { 14 | chainable = true; 15 | for ( i in key ) { 16 | jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); 17 | } 18 | 19 | // Sets one value 20 | } else if ( value !== undefined ) { 21 | chainable = true; 22 | 23 | if ( !jQuery.isFunction( value ) ) { 24 | raw = true; 25 | } 26 | 27 | if ( bulk ) { 28 | // Bulk operations run against the entire set 29 | if ( raw ) { 30 | fn.call( elems, value ); 31 | fn = null; 32 | 33 | // ...except when executing function values 34 | } else { 35 | bulk = fn; 36 | fn = function( elem, key, value ) { 37 | return bulk.call( jQuery( elem ), value ); 38 | }; 39 | } 40 | } 41 | 42 | if ( fn ) { 43 | for ( ; i < len; i++ ) { 44 | fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); 45 | } 46 | } 47 | } 48 | 49 | return chainable ? 50 | elems : 51 | 52 | // Gets 53 | bulk ? 54 | fn.call( elems ) : 55 | len ? fn( elems[0], key ) : emptyGet; 56 | }; 57 | 58 | return access; 59 | 60 | }); 61 | -------------------------------------------------------------------------------- /bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap.scss: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "bootstrap/variables"; 3 | @import "bootstrap/mixins"; 4 | 5 | // Reset 6 | @import "bootstrap/normalize"; 7 | @import "bootstrap/print"; 8 | 9 | // Core CSS 10 | @import "bootstrap/scaffolding"; 11 | @import "bootstrap/type"; 12 | @import "bootstrap/code"; 13 | @import "bootstrap/grid"; 14 | @import "bootstrap/tables"; 15 | @import "bootstrap/forms"; 16 | @import "bootstrap/buttons"; 17 | 18 | // Components 19 | @import "bootstrap/component-animations"; 20 | @import "bootstrap/glyphicons"; 21 | @import "bootstrap/dropdowns"; 22 | @import "bootstrap/button-groups"; 23 | @import "bootstrap/input-groups"; 24 | @import "bootstrap/navs"; 25 | @import "bootstrap/navbar"; 26 | @import "bootstrap/breadcrumbs"; 27 | @import "bootstrap/pagination"; 28 | @import "bootstrap/pager"; 29 | @import "bootstrap/labels"; 30 | @import "bootstrap/badges"; 31 | @import "bootstrap/jumbotron"; 32 | @import "bootstrap/thumbnails"; 33 | @import "bootstrap/alerts"; 34 | @import "bootstrap/progress-bars"; 35 | @import "bootstrap/media"; 36 | @import "bootstrap/list-group"; 37 | @import "bootstrap/panels"; 38 | @import "bootstrap/wells"; 39 | @import "bootstrap/close"; 40 | 41 | // Components w/ JavaScript 42 | @import "bootstrap/modals"; 43 | @import "bootstrap/tooltip"; 44 | @import "bootstrap/popovers"; 45 | @import "bootstrap/carousel"; 46 | 47 | // Utility classes 48 | @import "bootstrap/utilities"; 49 | @import "bootstrap/responsive-utilities"; 50 | -------------------------------------------------------------------------------- /bower_components/d3/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014, Michael Bostock 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * The name Michael Bostock may not be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, 21 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 24 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /bower_components/jquery/src/ajax/script.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "../core", 3 | "../ajax" 4 | ], function( jQuery ) { 5 | 6 | // Install script dataType 7 | jQuery.ajaxSetup({ 8 | accepts: { 9 | script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" 10 | }, 11 | contents: { 12 | script: /(?:java|ecma)script/ 13 | }, 14 | converters: { 15 | "text script": function( text ) { 16 | jQuery.globalEval( text ); 17 | return text; 18 | } 19 | } 20 | }); 21 | 22 | // Handle cache's special case and crossDomain 23 | jQuery.ajaxPrefilter( "script", function( s ) { 24 | if ( s.cache === undefined ) { 25 | s.cache = false; 26 | } 27 | if ( s.crossDomain ) { 28 | s.type = "GET"; 29 | } 30 | }); 31 | 32 | // Bind script tag hack transport 33 | jQuery.ajaxTransport( "script", function( s ) { 34 | // This transport only deals with cross domain requests 35 | if ( s.crossDomain ) { 36 | var script, callback; 37 | return { 38 | send: function( _, complete ) { 39 | script = jQuery("