├── .gitignore ├── Gemfile ├── Gemfile.lock ├── README.md ├── Rakefile ├── app ├── assets │ ├── images │ │ ├── .keep │ │ ├── clarendonltstd-webfont.eot │ │ ├── clarendonltstd-webfont.svg │ │ ├── clarendonltstd-webfont.ttf │ │ ├── clarendonltstd-webfont.woff │ │ ├── contacts │ │ │ ├── adam.png │ │ │ ├── martin.png │ │ │ └── patty.png │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ ├── logo.png │ │ └── products │ │ │ ├── birch.png │ │ │ ├── bow-drill.png │ │ │ ├── flint.png │ │ │ ├── kindling.png │ │ │ ├── matches.png │ │ │ └── tinder.png │ ├── javascripts │ │ └── application.js │ └── stylesheets │ │ ├── application.css │ │ └── bootstrap.css ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ ├── examples_controller.rb │ ├── products_controller.rb │ └── reviews_controller.rb ├── helpers │ └── application_helper.rb ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── concerns │ │ └── .keep │ └── example.rb └── views │ ├── example │ ├── _example_1_10.html.erb │ ├── _example_1_20.html.erb │ ├── _example_1_30.html.erb │ ├── _example_2_10.html.erb │ ├── _example_2_20.html.erb │ ├── _example_2_50.html.erb │ ├── _example_2_60.html.erb │ ├── _example_2_70.html.erb │ ├── _example_3_10.html.erb │ ├── _example_3_15.html.erb │ ├── _example_3_20.html.erb │ ├── _example_3_30.html.erb │ ├── _example_3_40.html.erb │ ├── _example_3_50.html.erb │ ├── _example_3_60.html.erb │ ├── _example_4_10.html.erb │ ├── _example_4_20.html.erb │ ├── _example_4_30.html.erb │ ├── _example_4_40.html.erb │ ├── _example_4_50.html.erb │ ├── _example_5_10.html.erb │ ├── _example_5_20.html.erb │ ├── _example_5_30.html.erb │ ├── _example_5_40.html.erb │ ├── _example_5_5.html.erb │ ├── _example_5_7.html.erb │ ├── _example_6_10.html.erb │ ├── _example_6_15.html.erb │ ├── _example_6_20.html.erb │ ├── _example_6_30.html.erb │ ├── _example_6_40.html.erb │ ├── _example_6_50.html.erb │ ├── _example_7_10.html.erb │ ├── _example_7_15.html.erb │ ├── _example_7_20.html.erb │ ├── _example_7_20x.html.erb │ ├── _example_7_30.html.erb │ ├── _example_7_40.html.erb │ └── _example_7_5.html.erb │ ├── examples │ ├── index.html.erb │ └── show.html.erb │ ├── layouts │ └── application.html.erb │ ├── products │ └── index.json │ ├── reviews │ └── create.json │ └── templates │ ├── _about.html.erb │ ├── _footer.html.erb │ ├── _index.html.erb │ ├── _index2.html.erb │ ├── _index3.html.erb │ ├── _navigation.html.erb │ └── _navigation2.html.erb ├── bin ├── bundle ├── rails └── rake ├── config.ru ├── config ├── application.rb ├── boot.rb ├── database.yml ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── initializers │ ├── backtrace_silencers.rb │ ├── filter_parameter_logging.rb │ ├── inflections.rb │ ├── mime_types.rb │ ├── secret_token.rb │ ├── session_store.rb │ └── wrap_parameters.rb ├── locales │ └── en.yml └── routes.rb ├── db ├── migrate │ ├── 20131007184412_create_examples.rb │ └── 20131007194224_add_description_to_examples.rb ├── schema.rb └── seeds.rb ├── lib ├── assets │ └── .keep └── tasks │ └── .keep ├── log └── .keep ├── output.log ├── public ├── 404.html ├── 422.html ├── 500.html ├── demo │ ├── accounting.js │ ├── app.js │ ├── application.css │ ├── bootstrap.js │ ├── css │ │ ├── application.css │ │ └── bootstrap.css │ ├── ember-1.0.0.js │ ├── ember-data.js │ ├── fonts │ │ ├── clarendonltstd-webfont.eot │ │ ├── clarendonltstd-webfont.svg │ │ ├── clarendonltstd-webfont.ttf │ │ ├── clarendonltstd-webfont.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── handlebars-1.0.0.js │ ├── images │ │ ├── contacts │ │ │ ├── adam.png │ │ │ ├── martin.png │ │ │ └── patty.png │ │ ├── logo.png │ │ └── products │ │ │ ├── birch.png │ │ │ ├── bow-drill.png │ │ │ ├── flint.png │ │ │ ├── kindling.png │ │ │ ├── matches.png │ │ │ └── tinder.png │ ├── index.html │ ├── jquery.js │ ├── less │ │ ├── alerts.less │ │ ├── badges.less │ │ ├── bootstrap.less │ │ ├── breadcrumbs.less │ │ ├── button-groups.less │ │ ├── buttons.less │ │ ├── carousel.less │ │ ├── close.less │ │ ├── code.less │ │ ├── component-animations.less │ │ ├── dropdowns.less │ │ ├── forms.less │ │ ├── glyphicons.less │ │ ├── grid.less │ │ ├── input-groups.less │ │ ├── jumbotron.less │ │ ├── labels.less │ │ ├── list-group.less │ │ ├── media.less │ │ ├── mixins.less │ │ ├── modals.less │ │ ├── navbar.less │ │ ├── navs.less │ │ ├── normalize.less │ │ ├── pager.less │ │ ├── pagination.less │ │ ├── panels.less │ │ ├── popovers.less │ │ ├── print.less │ │ ├── progress-bars.less │ │ ├── responsive-utilities.less │ │ ├── scaffolding.less │ │ ├── settings.less │ │ ├── tables.less │ │ ├── theme.less │ │ ├── thumbnails.less │ │ ├── tooltip.less │ │ ├── type.less │ │ ├── utilities.less │ │ ├── variables.less │ │ └── wells.less │ └── todo.md ├── favicon.ico ├── products └── robots.txt ├── test ├── controllers │ └── .keep ├── fixtures │ └── .keep ├── helpers │ └── .keep ├── integration │ └── .keep ├── mailers │ └── .keep ├── models │ └── .keep └── test_helper.rb └── vendor └── assets ├── javascripts ├── .keep ├── bootstrap.js ├── ember-data.js ├── ember.js ├── handlebars.js └── markdown.js └── stylesheets └── .keep /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/*.log 16 | /tmp 17 | 18 | .DS_Store 19 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 4 | gem 'rails', '4.0.0' 5 | gem 'sqlite3' 6 | 7 | gem 'sass-rails', '~> 4.0.0' 8 | gem 'uglifier', '>= 1.3.0' 9 | gem 'coffee-rails', '~> 4.0.0' 10 | gem 'jquery-rails' 11 | gem 'kramdown' 12 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | actionmailer (4.0.0) 5 | actionpack (= 4.0.0) 6 | mail (~> 2.5.3) 7 | actionpack (4.0.0) 8 | activesupport (= 4.0.0) 9 | builder (~> 3.1.0) 10 | erubis (~> 2.7.0) 11 | rack (~> 1.5.2) 12 | rack-test (~> 0.6.2) 13 | activemodel (4.0.0) 14 | activesupport (= 4.0.0) 15 | builder (~> 3.1.0) 16 | activerecord (4.0.0) 17 | activemodel (= 4.0.0) 18 | activerecord-deprecated_finders (~> 1.0.2) 19 | activesupport (= 4.0.0) 20 | arel (~> 4.0.0) 21 | activerecord-deprecated_finders (1.0.3) 22 | activesupport (4.0.0) 23 | i18n (~> 0.6, >= 0.6.4) 24 | minitest (~> 4.2) 25 | multi_json (~> 1.3) 26 | thread_safe (~> 0.1) 27 | tzinfo (~> 0.3.37) 28 | arel (4.0.0) 29 | atomic (1.1.14) 30 | builder (3.1.4) 31 | coffee-rails (4.0.0) 32 | coffee-script (>= 2.2.0) 33 | railties (>= 4.0.0.beta, < 5.0) 34 | coffee-script (2.2.0) 35 | coffee-script-source 36 | execjs 37 | coffee-script-source (1.6.3) 38 | erubis (2.7.0) 39 | execjs (2.0.2) 40 | hike (1.2.3) 41 | i18n (0.6.5) 42 | jquery-rails (3.0.4) 43 | railties (>= 3.0, < 5.0) 44 | thor (>= 0.14, < 2.0) 45 | kramdown (1.2.0) 46 | mail (2.5.4) 47 | mime-types (~> 1.16) 48 | treetop (~> 1.4.8) 49 | mime-types (1.25) 50 | minitest (4.7.5) 51 | multi_json (1.8.1) 52 | polyglot (0.3.3) 53 | rack (1.5.2) 54 | rack-test (0.6.2) 55 | rack (>= 1.0) 56 | rails (4.0.0) 57 | actionmailer (= 4.0.0) 58 | actionpack (= 4.0.0) 59 | activerecord (= 4.0.0) 60 | activesupport (= 4.0.0) 61 | bundler (>= 1.3.0, < 2.0) 62 | railties (= 4.0.0) 63 | sprockets-rails (~> 2.0.0) 64 | railties (4.0.0) 65 | actionpack (= 4.0.0) 66 | activesupport (= 4.0.0) 67 | rake (>= 0.8.7) 68 | thor (>= 0.18.1, < 2.0) 69 | rake (10.1.0) 70 | sass (3.2.12) 71 | sass-rails (4.0.0) 72 | railties (>= 4.0.0.beta, < 5.0) 73 | sass (>= 3.1.10) 74 | sprockets-rails (~> 2.0.0) 75 | sprockets (2.10.0) 76 | hike (~> 1.2) 77 | multi_json (~> 1.0) 78 | rack (~> 1.0) 79 | tilt (~> 1.1, != 1.3.0) 80 | sprockets-rails (2.0.0) 81 | actionpack (>= 3.0) 82 | activesupport (>= 3.0) 83 | sprockets (~> 2.8) 84 | sqlite3 (1.3.8) 85 | thor (0.18.1) 86 | thread_safe (0.1.3) 87 | atomic 88 | tilt (1.4.1) 89 | treetop (1.4.15) 90 | polyglot 91 | polyglot (>= 0.3.1) 92 | tzinfo (0.3.37) 93 | uglifier (2.2.1) 94 | execjs (>= 0.3.0) 95 | multi_json (~> 1.0, >= 1.0.2) 96 | 97 | PLATFORMS 98 | ruby 99 | 100 | DEPENDENCIES 101 | coffee-rails (~> 4.0.0) 102 | jquery-rails 103 | kramdown 104 | rails (= 4.0.0) 105 | sass-rails (~> 4.0.0) 106 | sqlite3 107 | uglifier (>= 1.3.0) 108 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | This is the companion code for the Code Schools Ember course. This showcases the code used in the slides. 4 | 5 | ## Complete Example 6 | 7 | The finished application can be found at `demo/index.html`. Open that up in your browser and you're good to go! 8 | 9 | If you want to see what the application looked like at a specific state during the course, you can go the more elaborate route and set up the Rails application which allows for serving the ember app at each point we show it during the slides. 10 | 11 | ## Setup 12 | 13 | This is a Ruby on Rails application, so in order to run it you'll need to have Ruby 1.9.3. Here's the setup you'll need to do to in order to see the examples. 14 | 15 | First off, you'll need to have Ruby installed. We recommend using either [rbenv](https://github.com/sstephenson/rbenv) or [RVM](https://rvm.io/), but your system Ruby will suffice as well. Code School has a [Code TV](https://www.codeschool.com/code_tv/rvm) on using RVM as well. 16 | 17 | With Ruby installed, make sure to install the bundler gem. 18 | 19 | ``` 20 | $ gem install bundler 21 | ``` 22 | 23 | Next, download or clone this repository, change directory into it, and `bundle`. 24 | 25 | ``` 26 | $ git clone https://github.com/codeschool/EmberCourseDemo.git 27 | $ cd EmberCourseDemo 28 | EmberCourseDemo $ bundle install 29 | ``` 30 | 31 | Next, setup the database -- which contains information on the code samples used in the course. 32 | 33 | ``` 34 | EmberCourseDemo $ bundle exec rake db:setup 35 | ``` 36 | 37 | ## Running 38 | 39 | After that, you should be all set to run the application: 40 | 41 | ``` 42 | EmberCourseDemo $ bundle exec rails s 43 | ``` 44 | 45 | This will start the application on port 3000. Open up [http://localhost:3000/examples](http://localhost:3000/examples) in a browser and head to any code sample. 46 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | EmberDemo::Application.load_tasks 7 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/.keep -------------------------------------------------------------------------------- /app/assets/images/clarendonltstd-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/clarendonltstd-webfont.eot -------------------------------------------------------------------------------- /app/assets/images/clarendonltstd-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/clarendonltstd-webfont.ttf -------------------------------------------------------------------------------- /app/assets/images/clarendonltstd-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/clarendonltstd-webfont.woff -------------------------------------------------------------------------------- /app/assets/images/contacts/adam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/contacts/adam.png -------------------------------------------------------------------------------- /app/assets/images/contacts/martin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/contacts/martin.png -------------------------------------------------------------------------------- /app/assets/images/contacts/patty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/contacts/patty.png -------------------------------------------------------------------------------- /app/assets/images/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /app/assets/images/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /app/assets/images/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /app/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/logo.png -------------------------------------------------------------------------------- /app/assets/images/products/birch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/products/birch.png -------------------------------------------------------------------------------- /app/assets/images/products/bow-drill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/products/bow-drill.png -------------------------------------------------------------------------------- /app/assets/images/products/flint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/products/flint.png -------------------------------------------------------------------------------- /app/assets/images/products/kindling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/products/kindling.png -------------------------------------------------------------------------------- /app/assets/images/products/matches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/products/matches.png -------------------------------------------------------------------------------- /app/assets/images/products/tinder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/assets/images/products/tinder.png -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery 14 | //= require bootstrap 15 | //= require handlebars 16 | //= require markdown 17 | //= require ember 18 | //= require ember-data 19 | //= require_tree . 20 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require bootstrap 12 | *= require_self 13 | *= require_tree . 14 | */ 15 | 16 | .tagline { 17 | margin-bottom: 20px; 18 | } 19 | 20 | .label a { 21 | color: #fff; 22 | text-decoration: none; 23 | } 24 | 25 | .product-detail.row { 26 | margin: 1em 0; 27 | border-bottom: 1px solid #eee; 28 | } 29 | .product-detail img { 30 | max-height: 150px; 31 | max-width: 150px; 32 | } 33 | .product-detail h2 { 34 | margin-top: 0; 35 | margin-bottom: 0px; 36 | } 37 | .product-description { 38 | margin-top: 10px; 39 | } 40 | 41 | .list-rating { 42 | margin: 0; 43 | padding: 0; 44 | } 45 | .list-rating li { 46 | display: inline; 47 | list-style-type: none; 48 | } 49 | 50 | 51 | 52 | .navbar-default .navbar-nav > li { 53 | cursor: pointer; 54 | background-color: #824d3d; 55 | padding: 12px 12px; 56 | margin-top: -7px; 57 | color: #f0eee1; 58 | font-weight: bold; 59 | } 60 | .navbar-default .navbar-nav > li a { 61 | padding: 0; 62 | color: #f0eee1; 63 | } 64 | .navbar-default .navbar-nav > li:hover { 65 | background-color: #e87714; 66 | } 67 | .navbar-default .navbar-nav > li.active { 68 | color: #fff; 69 | background-color: #b65a31; 70 | } 71 | 72 | textarea { 73 | width: 100%; 74 | margin-bottom: 10px; 75 | } 76 | 77 | h2 { 78 | margin-top: 5px; 79 | } 80 | 81 | .reviews { 82 | padding: 0; 83 | } 84 | .reviews li { 85 | padding: 4px; 86 | border-bottom: 1px solid rgba(130, 98, 88, 0.40); 87 | } 88 | .reviews li:last-of-type { 89 | border: none; 90 | } 91 | .reviews li.read-more { 92 | position: relative; 93 | cursor: pointer; 94 | padding-bottom: 30px; 95 | } 96 | .reviews li .content { 97 | margin-top: 10px; 98 | } 99 | .reviews li.read-more .content { 100 | height: 40px; 101 | overflow: hidden; 102 | } 103 | .reviews li.read-more .expand { 104 | width:100%; 105 | position: absolute; 106 | bottom: 0px; 107 | height: 25px; 108 | text-align: center; 109 | } 110 | .reviews li.read-more:not(.is-expanded) .expand { 111 | height: 75px; 112 | padding-top: 50px; 113 | background: -webkit-linear-gradient(rgba(240, 238, 225, 0),rgba(240, 238, 225, 1)); 114 | background-image: -moz-linear-gradient(rgba(240, 238, 225, 0),rgba(240, 238, 225, 1)); 115 | background-image: -o-linear-gradient(rgba(240, 238, 225, 0),rgba(240, 238, 225, 1)); 116 | background-image: linear-gradient(rgba(240, 238, 225, 0),rgba(240, 238, 225, 1)); 117 | background-image: -ms-linear-gradient(rgba(240, 238, 225, 0),rgba(240, 238, 225, 1)); 118 | } 119 | 120 | .reviews li.read-more.is-expanded .content { 121 | height: auto; 122 | } 123 | 124 | .reviews li.read-more span.label { 125 | display: absolute; 126 | } -------------------------------------------------------------------------------- /app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/examples_controller.rb: -------------------------------------------------------------------------------- 1 | class ExamplesController < ApplicationController 2 | respond_to :html 3 | 4 | #layout choose_layout 5 | 6 | def index 7 | respond_with @examples = Example.order(:level, :number) 8 | end 9 | 10 | def show 11 | level = params[:id].split("-").first 12 | number = params[:id].split("-").last 13 | @example = Example.find_by number: number, level: level 14 | end 15 | 16 | private 17 | 18 | def choose_layout 19 | if params[:action] == 'show' 20 | return 'ember' 21 | else 22 | return 'application' 23 | end 24 | end 25 | end -------------------------------------------------------------------------------- /app/controllers/products_controller.rb: -------------------------------------------------------------------------------- 1 | class ProductsController < ApplicationController 2 | 3 | 4 | layout false 5 | 6 | def index 7 | render 8 | end 9 | end -------------------------------------------------------------------------------- /app/controllers/reviews_controller.rb: -------------------------------------------------------------------------------- 1 | class ReviewsController < ApplicationController 2 | 3 | skip_before_filter :verify_authenticity_token 4 | 5 | layout false 6 | 7 | def create 8 | review = params[:review] 9 | end 10 | end -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/mailers/.keep -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/models/.keep -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/models/example.rb: -------------------------------------------------------------------------------- 1 | class Example < ActiveRecord::Base 2 | 3 | def details 4 | description ? Kramdown::Document.new(description).to_html : "" 5 | end 6 | 7 | def to_param 8 | "#{level}-#{number}" 9 | end 10 | end -------------------------------------------------------------------------------- /app/views/example/_example_1_10.html.erb: -------------------------------------------------------------------------------- 1 | 22 | 23 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /app/views/example/_example_1_20.html.erb: -------------------------------------------------------------------------------- 1 | 22 | 23 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /app/views/example/_example_1_30.html.erb: -------------------------------------------------------------------------------- 1 | 22 | 23 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /app/views/example/_example_2_10.html.erb: -------------------------------------------------------------------------------- 1 | 22 | 23 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /app/views/example/_example_2_20.html.erb: -------------------------------------------------------------------------------- 1 | 22 | 23 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /app/views/example/_example_2_50.html.erb: -------------------------------------------------------------------------------- 1 | 22 | 23 | 28 | 29 | 32 | 33 | -------------------------------------------------------------------------------- /app/views/example/_example_2_60.html.erb: -------------------------------------------------------------------------------- 1 | 22 | 23 | 28 | 29 | 32 | 33 | -------------------------------------------------------------------------------- /app/views/example/_example_2_70.html.erb: -------------------------------------------------------------------------------- 1 | 22 | 23 | 29 | 30 | 33 | 34 | -------------------------------------------------------------------------------- /app/views/example/_example_3_10.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 38 | 39 | -------------------------------------------------------------------------------- /app/views/example/_example_3_15.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 40 | 55 | 56 | -------------------------------------------------------------------------------- /app/views/example/_example_3_20.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 40 | 46 | 47 | -------------------------------------------------------------------------------- /app/views/example/_example_3_30.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 40 | 55 | 56 | 57 | 62 | 63 | -------------------------------------------------------------------------------- /app/views/example/_example_3_40.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 40 | 55 | 56 | 68 | 69 | -------------------------------------------------------------------------------- /app/views/example/_example_3_50.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 40 | 56 | 57 | 69 | 70 | -------------------------------------------------------------------------------- /app/views/example/_example_3_60.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 40 | 56 | 57 | 69 | 70 | 73 | 74 | -------------------------------------------------------------------------------- /app/views/example/_example_4_10.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 40 | 56 | 57 | 69 | 70 | 73 | 74 | -------------------------------------------------------------------------------- /app/views/example/_example_4_20.html.erb: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | 31 | 34 | 35 | 40 | 56 | 57 | 69 | 70 | 73 | 74 | -------------------------------------------------------------------------------- /app/views/example/_example_4_30.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 31 | 32 | 35 | 36 | 41 | 57 | 58 | 80 | 81 | 84 | 85 | -------------------------------------------------------------------------------- /app/views/example/_example_4_40.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 31 | 32 | 35 | 36 | 41 | 57 | 58 | 80 | 81 | 84 | 85 | -------------------------------------------------------------------------------- /app/views/example/_example_4_50.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 31 | 32 | 35 | 36 | 41 | 57 | 58 | 80 | 81 | 84 | 85 | -------------------------------------------------------------------------------- /app/views/example/_example_5_10.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 31 | 32 | 35 | 36 | 41 | 57 | 58 | 80 | 81 | 84 | 85 | -------------------------------------------------------------------------------- /app/views/example/_example_5_20.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 26 | 33 | 34 | 37 | 38 | 43 | 59 | 60 | 82 | 83 | 86 | 87 | -------------------------------------------------------------------------------- /app/views/example/_example_5_5.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 31 | 32 | 35 | 36 | 41 | 57 | 58 | 80 | 81 | 84 | 85 | -------------------------------------------------------------------------------- /app/views/example/_example_5_7.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 31 | 32 | 35 | 36 | 41 | 57 | 58 | 80 | 81 | 84 | 85 | -------------------------------------------------------------------------------- /app/views/examples/index.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

Examples

3 | 4 | 12 |
-------------------------------------------------------------------------------- /app/views/examples/show.html.erb: -------------------------------------------------------------------------------- 1 | <%= render partial: "example/example_#{@example.level}_#{@example.number}" %> -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | The Flint & Flame 6 | <%= stylesheet_link_tag :application %> 7 | <%= javascript_include_tag :application %> 8 | 9 | 10 | <%= yield %> 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/views/products/index.json: -------------------------------------------------------------------------------- 1 | { "products": [ 2 | { 3 | "id": 1, 4 | "title": "Flint", 5 | "price": 99, 6 | "description": "Flint is a hard, sedimentary cryptocrystalline form of the mineral quartz, categorized as a variety of chert.", 7 | "isOnSale": true, 8 | "image": "/assets/products/flint.png", 9 | "reviews": [100,101] 10 | }, 11 | { 12 | "id": 2, 13 | "title": "Kindling", 14 | "price": 249, 15 | "description": "Easily combustible small sticks or twigs used for starting a fire.", 16 | "isOnSale": false, 17 | "image": "/assets/products/kindling.png", 18 | "reviews": [] 19 | } 20 | ], 21 | "reviews": [ 22 | { "id": 100, "product": 1, "text": "Started a fire in no time!" }, 23 | { "id": 101, "product": 1, "text": "Not the brightest flame, but warm!" } 24 | ] 25 | } -------------------------------------------------------------------------------- /app/views/reviews/create.json: -------------------------------------------------------------------------------- 1 | { "reviews": [{ "id": 102, "product": 1, "text": "Even though there was snow everywhere, this did the trick!", "reviewedAt": "2013-12-13 08:00:00" }] } -------------------------------------------------------------------------------- /app/views/templates/_about.html.erb: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /app/views/templates/_footer.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/templates/_index.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/templates/_index2.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/templates/_index3.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/templates/_navigation.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/templates/_navigation2.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../../config/application', __FILE__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('../boot', __FILE__) 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(:default, Rails.env) 8 | 9 | module EmberDemo 10 | class Application < Rails::Application 11 | # Settings in config/environments/* take precedence over those specified here. 12 | # Application configuration should go into files in config/initializers 13 | # -- all .rb files in that directory are automatically loaded. 14 | 15 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 16 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 17 | # config.time_zone = 'Central Time (US & Canada)' 18 | 19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 21 | # config.i18n.default_locale = :de 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | # Set up gems listed in the Gemfile. 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | 4 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) 5 | -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite version 3.x 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem 'sqlite3' 6 | development: 7 | adapter: sqlite3 8 | database: db/development.sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | # Warning: The database defined as "test" will be erased and 13 | # re-generated from your development database when you run "rake". 14 | # Do not set this db to the same as development or production. 15 | test: 16 | adapter: sqlite3 17 | database: db/test.sqlite3 18 | pool: 5 19 | timeout: 5000 20 | 21 | production: 22 | adapter: sqlite3 23 | database: db/production.sqlite3 24 | pool: 5 25 | timeout: 5000 26 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | EmberDemo::Application.initialize! 6 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | EmberDemo::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports and disable caching. 13 | config.consider_all_requests_local = true 14 | config.action_controller.perform_caching = false 15 | 16 | # Don't care if the mailer can't send. 17 | config.action_mailer.raise_delivery_errors = false 18 | 19 | # Print deprecation notices to the Rails logger. 20 | config.active_support.deprecation = :log 21 | 22 | # Raise an error on page load if there are pending migrations 23 | config.active_record.migration_error = :page_load 24 | 25 | # Debug mode disables concatenation and preprocessing of assets. 26 | # This option may cause significant delays in view rendering with a large 27 | # number of complex assets. 28 | config.assets.debug = true 29 | end 30 | -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | EmberDemo::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both thread web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application 18 | # Add `rack-cache` to your Gemfile before enabling this. 19 | # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. 20 | # config.action_dispatch.rack_cache = true 21 | 22 | # Disable Rails's static asset server (Apache or nginx will already do this). 23 | config.serve_static_assets = false 24 | 25 | # Compress JavaScripts and CSS. 26 | config.assets.js_compressor = :uglifier 27 | # config.assets.css_compressor = :sass 28 | 29 | # Do not fallback to assets pipeline if a precompiled asset is missed. 30 | config.assets.compile = false 31 | 32 | # Generate digests for assets URLs. 33 | config.assets.digest = true 34 | 35 | # Version of your assets, change this if you want to expire all your assets. 36 | config.assets.version = '1.0' 37 | 38 | # Specifies the header that your server uses for sending files. 39 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache 40 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 41 | 42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 43 | # config.force_ssl = true 44 | 45 | # Set to :debug to see everything in the log. 46 | config.log_level = :info 47 | 48 | # Prepend all log lines with the following tags. 49 | # config.log_tags = [ :subdomain, :uuid ] 50 | 51 | # Use a different logger for distributed setups. 52 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 53 | 54 | # Use a different cache store in production. 55 | # config.cache_store = :mem_cache_store 56 | 57 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 58 | # config.action_controller.asset_host = "http://assets.example.com" 59 | 60 | # Precompile additional assets. 61 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 62 | # config.assets.precompile += %w( search.js ) 63 | 64 | # Ignore bad email addresses and do not raise email delivery errors. 65 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 66 | # config.action_mailer.raise_delivery_errors = false 67 | 68 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 69 | # the I18n.default_locale when a translation can not be found). 70 | config.i18n.fallbacks = true 71 | 72 | # Send deprecation notices to registered listeners. 73 | config.active_support.deprecation = :notify 74 | 75 | # Disable automatic flushing of the log to improve performance. 76 | # config.autoflush_log = false 77 | 78 | # Use default logging formatter so that PID and timestamp are not suppressed. 79 | config.log_formatter = ::Logger::Formatter.new 80 | end 81 | -------------------------------------------------------------------------------- /config/environments/test.rb: -------------------------------------------------------------------------------- 1 | EmberDemo::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure static asset server for tests with Cache-Control for performance. 16 | config.serve_static_assets = true 17 | config.static_cache_control = "public, max-age=3600" 18 | 19 | # Show full error reports and disable caching. 20 | config.consider_all_requests_local = true 21 | config.action_controller.perform_caching = false 22 | 23 | # Raise exceptions instead of rendering exception templates. 24 | config.action_dispatch.show_exceptions = false 25 | 26 | # Disable request forgery protection in test environment. 27 | config.action_controller.allow_forgery_protection = false 28 | 29 | # Tell Action Mailer not to deliver emails to the real world. 30 | # The :test delivery method accumulates sent emails in the 31 | # ActionMailer::Base.deliveries array. 32 | config.action_mailer.delivery_method = :test 33 | 34 | # Print deprecation notices to the stderr. 35 | config.active_support.deprecation = :stderr 36 | end 37 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | -------------------------------------------------------------------------------- /config/initializers/secret_token.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key is used for verifying the integrity of signed cookies. 4 | # If you change this key, all old signed cookies will become invalid! 5 | 6 | # Make sure the secret is at least 30 characters and all random, 7 | # no regular words or you'll be exposed to dictionary attacks. 8 | # You can use `rake secret` to generate a secure secret key. 9 | 10 | # Make sure your secret_key_base is kept private 11 | # if you're sharing your code publicly. 12 | EmberDemo::Application.config.secret_key_base = '41718ed75ed1b9e405f2ef23c4fbf03e2b45c2f1f9658f088076dd9049d2e036a634971d374349668c33476a1da5de8f2c7b4f3463de055f7b50e4f3497ff685' 13 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | EmberDemo::Application.config.session_store :cookie_store, key: '_EmberDemo_session' 4 | -------------------------------------------------------------------------------- /config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | EmberDemo::Application.routes.draw do 2 | #root 'examples#index' 3 | 4 | root :to => "examples#show", id: "3-50" 5 | resources :examples, only: [:show, :index] 6 | # resources :products, only: [:index] 7 | resources :reviews, only: [:create] 8 | end -------------------------------------------------------------------------------- /db/migrate/20131007184412_create_examples.rb: -------------------------------------------------------------------------------- 1 | class CreateExamples < ActiveRecord::Migration 2 | def change 3 | create_table :examples do |t| 4 | t.string :title 5 | t.integer :level 6 | t.integer :number 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20131007194224_add_description_to_examples.rb: -------------------------------------------------------------------------------- 1 | class AddDescriptionToExamples < ActiveRecord::Migration 2 | def change 3 | add_column :examples, :description, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/schema.rb: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | # This file is auto-generated from the current state of the database. Instead 3 | # of editing this file, please use the migrations feature of Active Record to 4 | # incrementally modify your database, and then regenerate this schema definition. 5 | # 6 | # Note that this schema.rb definition is the authoritative source for your 7 | # database schema. If you need to create the application database on another 8 | # system, you should be using db:schema:load, not running all the migrations 9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations 10 | # you'll amass, the slower it'll run and the greater likelihood for issues). 11 | # 12 | # It's strongly recommended that you check this file into your version control system. 13 | 14 | ActiveRecord::Schema.define(version: 20131007194224) do 15 | 16 | create_table "examples", force: true do |t| 17 | t.string "title" 18 | t.integer "level" 19 | t.integer "number" 20 | t.text "description" 21 | end 22 | 23 | end 24 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/lib/assets/.keep -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/lib/tasks/.keep -------------------------------------------------------------------------------- /log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/log/.keep -------------------------------------------------------------------------------- /output.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/output.log -------------------------------------------------------------------------------- /public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

The page you were looking for doesn't exist.

54 |

You may have mistyped the address or the page may have moved.

55 |
56 |

If you are the application owner check the logs for more information.

57 | 58 | 59 | -------------------------------------------------------------------------------- /public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

The change you wanted was rejected.

54 |

Maybe you tried to change something you didn't have access to.

55 |
56 |

If you are the application owner check the logs for more information.

57 | 58 | 59 | -------------------------------------------------------------------------------- /public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 48 | 49 | 50 | 51 | 52 |
53 |

We're sorry, but something went wrong.

54 |
55 |

If you are the application owner check the logs for more information.

56 | 57 | 58 | -------------------------------------------------------------------------------- /public/demo/application.css: -------------------------------------------------------------------------------- 1 | .label a { color: #fff; text-decoration: underline; } 2 | 3 | .product-detail.row { 4 | margin: 1em 0; 5 | border-bottom: 1px solid #eee; 6 | } 7 | .product-detail img { 8 | max-height: 150px; 9 | max-width: 150px; 10 | } 11 | .product-detail h2 { 12 | margin-top: 0; 13 | margin-bottom: 10px; 14 | } 15 | 16 | .nav > li { cursor: pointer; } -------------------------------------------------------------------------------- /public/demo/css/application.css: -------------------------------------------------------------------------------- 1 | .tagline { 2 | margin-bottom: 20px; 3 | } 4 | 5 | .label a { 6 | color: #fff; 7 | text-decoration: none; 8 | } 9 | 10 | .product-detail.row { 11 | margin: 1em 0; 12 | border-bottom: 1px solid #eee; 13 | } 14 | .product-detail img { 15 | max-height: 150px; 16 | max-width: 150px; 17 | } 18 | .product-detail h2 { 19 | margin-top: 0; 20 | margin-bottom: 0px; 21 | } 22 | .product-description { 23 | margin-top: 10px; 24 | } 25 | 26 | .list-rating { 27 | margin: 0; 28 | padding: 0; 29 | } 30 | .list-rating li { 31 | display: inline; 32 | list-style-type: none; 33 | } 34 | 35 | 36 | 37 | .navbar-default .navbar-nav > li { 38 | cursor: pointer; 39 | background-color: #824d3d; 40 | padding: 12px 12px; 41 | margin-top: -7px; 42 | color: #f0eee1; 43 | font-weight: bold; 44 | } 45 | .navbar-default .navbar-nav > li:hover { 46 | background-color: #e87714; 47 | } 48 | .navbar-default .navbar-nav > li.active { 49 | color: #fff; 50 | background-color: #b65a31; 51 | } 52 | 53 | textarea { 54 | width: 100%; 55 | margin-bottom: 10px; 56 | } -------------------------------------------------------------------------------- /public/demo/fonts/clarendonltstd-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/fonts/clarendonltstd-webfont.eot -------------------------------------------------------------------------------- /public/demo/fonts/clarendonltstd-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/fonts/clarendonltstd-webfont.ttf -------------------------------------------------------------------------------- /public/demo/fonts/clarendonltstd-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/fonts/clarendonltstd-webfont.woff -------------------------------------------------------------------------------- /public/demo/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/demo/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/demo/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/demo/images/contacts/adam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/contacts/adam.png -------------------------------------------------------------------------------- /public/demo/images/contacts/martin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/contacts/martin.png -------------------------------------------------------------------------------- /public/demo/images/contacts/patty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/contacts/patty.png -------------------------------------------------------------------------------- /public/demo/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/logo.png -------------------------------------------------------------------------------- /public/demo/images/products/birch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/products/birch.png -------------------------------------------------------------------------------- /public/demo/images/products/bow-drill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/products/bow-drill.png -------------------------------------------------------------------------------- /public/demo/images/products/flint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/products/flint.png -------------------------------------------------------------------------------- /public/demo/images/products/kindling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/products/kindling.png -------------------------------------------------------------------------------- /public/demo/images/products/matches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/products/matches.png -------------------------------------------------------------------------------- /public/demo/images/products/tinder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/EmberCourseDemo/f48aa40545aae3794e69e814a136a4ccbf940c98/public/demo/images/products/tinder.png -------------------------------------------------------------------------------- /public/demo/less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: @alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissable alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable { 41 | padding-right: (@alert-padding + 20); 42 | 43 | // Adjust close link position 44 | .close { 45 | position: relative; 46 | top: -2px; 47 | right: -21px; 48 | color: inherit; 49 | } 50 | } 51 | 52 | // Alternate styles 53 | // 54 | // Generate contextual modifier classes for colorizing the alert. 55 | 56 | .alert-success { 57 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 58 | } 59 | .alert-info { 60 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 61 | } 62 | .alert-warning { 63 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 64 | } 65 | .alert-danger { 66 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 67 | } 68 | -------------------------------------------------------------------------------- /public/demo/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 | 27 | // Hover state, but only for links 28 | a.badge { 29 | &:hover, 30 | &:focus { 31 | color: @badge-link-hover-color; 32 | text-decoration: none; 33 | cursor: pointer; 34 | } 35 | } 36 | 37 | // Quick fix for labels/badges in buttons 38 | .btn .badge { 39 | position: relative; 40 | top: -1px; 41 | } 42 | 43 | // Account for counters in navs 44 | a.list-group-item.active > .badge, 45 | .nav-pills > .active > a > .badge { 46 | color: @badge-active-color; 47 | background-color: @badge-active-bg; 48 | } 49 | .nav-pills > li > a > .badge { 50 | margin-left: 3px; 51 | } 52 | -------------------------------------------------------------------------------- /public/demo/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 "settings.less"; 11 | @import "scaffolding.less"; 12 | @import "type.less"; 13 | @import "code.less"; 14 | @import "grid.less"; 15 | @import "tables.less"; 16 | @import "forms.less"; 17 | @import "buttons.less"; 18 | 19 | // Components 20 | @import "component-animations.less"; 21 | @import "glyphicons.less"; 22 | @import "dropdowns.less"; 23 | @import "button-groups.less"; 24 | @import "input-groups.less"; 25 | @import "navs.less"; 26 | @import "navbar.less"; 27 | @import "breadcrumbs.less"; 28 | @import "pagination.less"; 29 | @import "pager.less"; 30 | @import "labels.less"; 31 | @import "badges.less"; 32 | @import "jumbotron.less"; 33 | @import "thumbnails.less"; 34 | @import "alerts.less"; 35 | @import "progress-bars.less"; 36 | @import "media.less"; 37 | @import "list-group.less"; 38 | @import "panels.less"; 39 | @import "wells.less"; 40 | @import "close.less"; 41 | 42 | // Components w/ JavaScript 43 | @import "modals.less"; 44 | @import "tooltip.less"; 45 | @import "popovers.less"; 46 | @import "carousel.less"; 47 | 48 | // Utility classes 49 | @import "utilities.less"; 50 | @import "responsive-utilities.less"; 51 | -------------------------------------------------------------------------------- /public/demo/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: 8px 15px; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1); 13 | > li { 14 | display: inline-block; 15 | + li:before { 16 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 17 | padding: 0 5px; 18 | color: @breadcrumb-color; 19 | } 20 | } 21 | > .active { 22 | color: @breadcrumb-active-color; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /public/demo/less/buttons.less: -------------------------------------------------------------------------------- 1 | // 2 | // Buttons 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // -------------------------------------------------- 8 | 9 | // Core styles 10 | .btn { 11 | display: inline-block; 12 | margin-bottom: 0; // For input.btn 13 | font-weight: @btn-font-weight; 14 | text-align: center; 15 | vertical-align: middle; 16 | cursor: pointer; 17 | background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 18 | border: 1px solid transparent; 19 | white-space: nowrap; 20 | .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base); 21 | .user-select(none); 22 | 23 | &:focus { 24 | .tab-focus(); 25 | } 26 | 27 | &:hover, 28 | &:focus { 29 | color: @btn-default-color; 30 | text-decoration: none; 31 | } 32 | 33 | &:active, 34 | &.active { 35 | outline: 0; 36 | background-image: none; 37 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 38 | } 39 | 40 | &.disabled, 41 | &[disabled], 42 | fieldset[disabled] & { 43 | cursor: not-allowed; 44 | pointer-events: none; // Future-proof disabling of clicks 45 | .opacity(.65); 46 | .box-shadow(none); 47 | } 48 | 49 | } 50 | 51 | 52 | // Alternate buttons 53 | // -------------------------------------------------- 54 | 55 | .btn-default { 56 | .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); 57 | } 58 | .btn-primary { 59 | .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); 60 | } 61 | // Warning appears as orange 62 | .btn-warning { 63 | .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); 64 | } 65 | // Danger and error appear as red 66 | .btn-danger { 67 | .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); 68 | } 69 | // Success appears as green 70 | .btn-success { 71 | .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); 72 | } 73 | // Info appears as blue-green 74 | .btn-info { 75 | .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); 76 | } 77 | 78 | 79 | // Link buttons 80 | // ------------------------- 81 | 82 | // Make a button look and behave like a link 83 | .btn-link { 84 | color: @link-color; 85 | font-weight: normal; 86 | cursor: pointer; 87 | border-radius: 0; 88 | 89 | &, 90 | &:active, 91 | &[disabled], 92 | fieldset[disabled] & { 93 | background-color: transparent; 94 | .box-shadow(none); 95 | } 96 | &, 97 | &:hover, 98 | &:focus, 99 | &:active { 100 | border-color: transparent; 101 | } 102 | &:hover, 103 | &:focus { 104 | color: @link-hover-color; 105 | text-decoration: underline; 106 | background-color: transparent; 107 | } 108 | &[disabled], 109 | fieldset[disabled] & { 110 | &:hover, 111 | &:focus { 112 | color: @btn-link-disabled-color; 113 | text-decoration: none; 114 | } 115 | } 116 | } 117 | 118 | 119 | // Button Sizes 120 | // -------------------------------------------------- 121 | 122 | .btn-lg { 123 | // line-height: ensure even-numbered height of button next to large input 124 | .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); 125 | } 126 | .btn-sm, 127 | .btn-xs { 128 | // line-height: ensure proper height of button next to small input 129 | .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); 130 | } 131 | .btn-xs { 132 | padding: 1px 5px; 133 | } 134 | 135 | 136 | // Block button 137 | // -------------------------------------------------- 138 | 139 | .btn-block { 140 | display: block; 141 | width: 100%; 142 | padding-left: 0; 143 | padding-right: 0; 144 | } 145 | 146 | // Vertically space out multiple block buttons 147 | .btn-block + .btn-block { 148 | margin-top: 5px; 149 | } 150 | 151 | // Specificity overrides 152 | input[type="submit"], 153 | input[type="reset"], 154 | input[type="button"] { 155 | &.btn-block { 156 | width: 100%; 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /public/demo/less/carousel.less: -------------------------------------------------------------------------------- 1 | // 2 | // Carousel 3 | // -------------------------------------------------- 4 | 5 | 6 | // Wrapper for the slide container and indicators 7 | .carousel { 8 | position: relative; 9 | } 10 | 11 | .carousel-inner { 12 | position: relative; 13 | overflow: hidden; 14 | width: 100%; 15 | 16 | > .item { 17 | display: none; 18 | position: relative; 19 | .transition(.6s ease-in-out left); 20 | 21 | // Account for jankitude on images 22 | > img, 23 | > a > img { 24 | .img-responsive(); 25 | line-height: 1; 26 | } 27 | } 28 | 29 | > .active, 30 | > .next, 31 | > .prev { display: block; } 32 | 33 | > .active { 34 | left: 0; 35 | } 36 | 37 | > .next, 38 | > .prev { 39 | position: absolute; 40 | top: 0; 41 | width: 100%; 42 | } 43 | 44 | > .next { 45 | left: 100%; 46 | } 47 | > .prev { 48 | left: -100%; 49 | } 50 | > .next.left, 51 | > .prev.right { 52 | left: 0; 53 | } 54 | 55 | > .active.left { 56 | left: -100%; 57 | } 58 | > .active.right { 59 | left: 100%; 60 | } 61 | 62 | } 63 | 64 | // Left/right controls for nav 65 | // --------------------------- 66 | 67 | .carousel-control { 68 | position: absolute; 69 | top: 0; 70 | left: 0; 71 | bottom: 0; 72 | width: @carousel-control-width; 73 | .opacity(@carousel-control-opacity); 74 | font-size: @carousel-control-font-size; 75 | color: @carousel-control-color; 76 | text-align: center; 77 | text-shadow: @carousel-text-shadow; 78 | // We can't have this transition here because WebKit cancels the carousel 79 | // animation if you trip this while in the middle of another animation. 80 | 81 | // Set gradients for backgrounds 82 | &.left { 83 | #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); 84 | } 85 | &.right { 86 | left: auto; 87 | right: 0; 88 | #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); 89 | } 90 | 91 | // Hover/focus state 92 | &:hover, 93 | &:focus { 94 | color: @carousel-control-color; 95 | text-decoration: none; 96 | .opacity(.9); 97 | } 98 | 99 | // Toggles 100 | .icon-prev, 101 | .icon-next, 102 | .glyphicon-chevron-left, 103 | .glyphicon-chevron-right { 104 | position: absolute; 105 | top: 50%; 106 | z-index: 5; 107 | display: inline-block; 108 | } 109 | .icon-prev, 110 | .glyphicon-chevron-left { 111 | left: 50%; 112 | } 113 | .icon-next, 114 | .glyphicon-chevron-right { 115 | right: 50%; 116 | } 117 | .icon-prev, 118 | .icon-next { 119 | width: 20px; 120 | height: 20px; 121 | margin-top: -10px; 122 | margin-left: -10px; 123 | font-family: serif; 124 | } 125 | 126 | .icon-prev { 127 | &:before { 128 | content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) 129 | } 130 | } 131 | .icon-next { 132 | &:before { 133 | content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) 134 | } 135 | } 136 | } 137 | 138 | // Optional indicator pips 139 | // 140 | // Add an unordered list with the following class and add a list item for each 141 | // slide your carousel holds. 142 | 143 | .carousel-indicators { 144 | position: absolute; 145 | bottom: 10px; 146 | left: 50%; 147 | z-index: 15; 148 | width: 60%; 149 | margin-left: -30%; 150 | padding-left: 0; 151 | list-style: none; 152 | text-align: center; 153 | 154 | li { 155 | display: inline-block; 156 | width: 10px; 157 | height: 10px; 158 | margin: 1px; 159 | text-indent: -999px; 160 | border: 1px solid @carousel-indicator-border-color; 161 | border-radius: 10px; 162 | cursor: pointer; 163 | 164 | // IE8-9 hack for event handling 165 | // 166 | // Internet Explorer 8-9 does not support clicks on elements without a set 167 | // `background-color`. We cannot use `filter` since that's not viewed as a 168 | // background color by the browser. Thus, a hack is needed. 169 | // 170 | // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we 171 | // set alpha transparency for the best results possible. 172 | background-color: #000 \9; // IE8 173 | background-color: rgba(0,0,0,0); // IE9 174 | } 175 | .active { 176 | margin: 0; 177 | width: 12px; 178 | height: 12px; 179 | background-color: @carousel-indicator-active-bg; 180 | } 181 | } 182 | 183 | // Optional captions 184 | // ----------------------------- 185 | // Hidden by default for smaller viewports 186 | .carousel-caption { 187 | position: absolute; 188 | left: 15%; 189 | right: 15%; 190 | bottom: 20px; 191 | z-index: 10; 192 | padding-top: 20px; 193 | padding-bottom: 20px; 194 | color: @carousel-caption-color; 195 | text-align: center; 196 | text-shadow: @carousel-text-shadow; 197 | & .btn { 198 | text-shadow: none; // No shadow for button elements in carousel-caption 199 | } 200 | } 201 | 202 | 203 | // Scale up controls for tablets and up 204 | @media screen and (min-width: @screen-sm-min) { 205 | 206 | // Scale up the controls a smidge 207 | .carousel-control { 208 | .glyphicons-chevron-left, 209 | .glyphicons-chevron-right, 210 | .icon-prev, 211 | .icon-next { 212 | width: 30px; 213 | height: 30px; 214 | margin-top: -15px; 215 | margin-left: -15px; 216 | font-size: 30px; 217 | } 218 | } 219 | 220 | // Show and left align the captions 221 | .carousel-caption { 222 | left: 20%; 223 | right: 20%; 224 | padding-bottom: 30px; 225 | } 226 | 227 | // Move up the indicators 228 | .carousel-indicators { 229 | bottom: 20px; 230 | } 231 | } 232 | -------------------------------------------------------------------------------- /public/demo/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 | -------------------------------------------------------------------------------- /public/demo/less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | white-space: nowrap; 21 | border-radius: @border-radius-base; 22 | } 23 | 24 | // Blocks of code 25 | pre { 26 | display: block; 27 | padding: ((@line-height-computed - 1) / 2); 28 | margin: 0 0 (@line-height-computed / 2); 29 | font-size: (@font-size-base - 1); // 14px to 13px 30 | line-height: @line-height-base; 31 | word-break: break-all; 32 | word-wrap: break-word; 33 | color: @pre-color; 34 | background-color: @pre-bg; 35 | border: 1px solid @pre-border-color; 36 | border-radius: @border-radius-base; 37 | 38 | // Account for some code outputs that place code tags in pre tags 39 | code { 40 | padding: 0; 41 | font-size: inherit; 42 | color: inherit; 43 | white-space: pre-wrap; 44 | background-color: transparent; 45 | border-radius: 0; 46 | } 47 | } 48 | 49 | // Enable scrollable blocks of code 50 | .pre-scrollable { 51 | max-height: @pre-scrollable-max-height; 52 | overflow-y: scroll; 53 | } 54 | -------------------------------------------------------------------------------- /public/demo/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 | -------------------------------------------------------------------------------- /public/demo/less/dropdowns.less: -------------------------------------------------------------------------------- 1 | // 2 | // Dropdown menus 3 | // -------------------------------------------------- 4 | 5 | 6 | // Dropdown arrow/caret 7 | .caret { 8 | display: inline-block; 9 | width: 0; 10 | height: 0; 11 | margin-left: 2px; 12 | vertical-align: middle; 13 | border-top: @caret-width-base solid @dropdown-caret-color; 14 | border-right: @caret-width-base solid transparent; 15 | border-left: @caret-width-base solid transparent; 16 | // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once fixed, 17 | // we can just straight up remove this. 18 | border-bottom: 0 dotted; 19 | } 20 | 21 | // The dropdown wrapper (div) 22 | .dropdown { 23 | position: relative; 24 | } 25 | 26 | // Prevent the focus on the dropdown toggle when closing dropdowns 27 | .dropdown-toggle:focus { 28 | outline: 0; 29 | } 30 | 31 | // The dropdown menu (ul) 32 | .dropdown-menu { 33 | position: absolute; 34 | top: 100%; 35 | left: 0; 36 | z-index: @zindex-dropdown; 37 | display: none; // none by default, but block on "open" of the menu 38 | float: left; 39 | min-width: 160px; 40 | padding: 5px 0; 41 | margin: 2px 0 0; // override default ul 42 | list-style: none; 43 | font-size: @font-size-base; 44 | background-color: @dropdown-bg; 45 | border: 1px solid @dropdown-fallback-border; // IE8 fallback 46 | border: 1px solid @dropdown-border; 47 | border-radius: @border-radius-base; 48 | .box-shadow(0 6px 12px rgba(0,0,0,.175)); 49 | background-clip: padding-box; 50 | 51 | // Aligns the dropdown menu to right 52 | &.pull-right { 53 | right: 0; 54 | left: auto; 55 | } 56 | 57 | // Dividers (basically an hr) within the dropdown 58 | .divider { 59 | .nav-divider(@dropdown-divider-bg); 60 | } 61 | 62 | // Links within the dropdown menu 63 | > li > a { 64 | display: block; 65 | padding: 3px 20px; 66 | clear: both; 67 | font-weight: normal; 68 | line-height: @line-height-base; 69 | color: @dropdown-link-color; 70 | white-space: nowrap; // prevent links from randomly breaking onto new lines 71 | } 72 | } 73 | 74 | // Hover/Focus state 75 | .dropdown-menu > li > a { 76 | &:hover, 77 | &:focus { 78 | text-decoration: none; 79 | color: @dropdown-link-hover-color; 80 | background-color: @dropdown-link-hover-bg; 81 | } 82 | } 83 | 84 | // Active state 85 | .dropdown-menu > .active > a { 86 | &, 87 | &:hover, 88 | &:focus { 89 | color: @dropdown-link-active-color; 90 | text-decoration: none; 91 | outline: 0; 92 | background-color: @dropdown-link-active-bg; 93 | } 94 | } 95 | 96 | // Disabled state 97 | // 98 | // Gray out text and ensure the hover/focus state remains gray 99 | 100 | .dropdown-menu > .disabled > a { 101 | &, 102 | &:hover, 103 | &:focus { 104 | color: @dropdown-link-disabled-color; 105 | } 106 | } 107 | // Nuke hover/focus effects 108 | .dropdown-menu > .disabled > a { 109 | &:hover, 110 | &:focus { 111 | text-decoration: none; 112 | background-color: transparent; 113 | background-image: none; // Remove CSS gradient 114 | .reset-filter(); 115 | cursor: not-allowed; 116 | } 117 | } 118 | 119 | // Open state for the dropdown 120 | .open { 121 | // Show the menu 122 | > .dropdown-menu { 123 | display: block; 124 | } 125 | 126 | // Remove the outline when :focus is triggered 127 | > a { 128 | outline: 0; 129 | } 130 | } 131 | 132 | // Dropdown section headers 133 | .dropdown-header { 134 | display: block; 135 | padding: 3px 20px; 136 | font-size: @font-size-small; 137 | line-height: @line-height-base; 138 | color: @dropdown-header-color; 139 | } 140 | 141 | // Backdrop to catch body clicks on mobile, etc. 142 | .dropdown-backdrop { 143 | position: fixed; 144 | left: 0; 145 | right: 0; 146 | bottom: 0; 147 | top: 0; 148 | z-index: @zindex-dropdown - 10; 149 | } 150 | 151 | // Right aligned dropdowns 152 | .pull-right > .dropdown-menu { 153 | right: 0; 154 | left: auto; 155 | } 156 | 157 | // Allow for dropdowns to go bottom up (aka, dropup-menu) 158 | // 159 | // Just add .dropup after the standard .dropdown class and you're set, bro. 160 | // TODO: abstract this so that the navbar fixed styles are not placed here? 161 | 162 | .dropup, 163 | .navbar-fixed-bottom .dropdown { 164 | // Reverse the caret 165 | .caret { 166 | // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this 167 | // gets fixed, restore `border-top: 0;`. 168 | border-top: 0 dotted; 169 | border-bottom: @caret-width-base solid @dropdown-caret-color; 170 | content: ""; 171 | } 172 | // Different positioning for bottom up menu 173 | .dropdown-menu { 174 | top: auto; 175 | bottom: 100%; 176 | margin-bottom: 1px; 177 | } 178 | } 179 | 180 | 181 | // Component alignment 182 | // 183 | // Reiterate per navbar.less and the modified component alignment there. 184 | 185 | @media (min-width: @grid-float-breakpoint) { 186 | .navbar-right { 187 | .dropdown-menu { 188 | .pull-right > .dropdown-menu(); 189 | } 190 | } 191 | } 192 | 193 | -------------------------------------------------------------------------------- /public/demo/less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | // Set the container width, and override it for fixed navbars in media queries 6 | .container { 7 | .container-fixed(); 8 | } 9 | 10 | // mobile first defaults 11 | .row { 12 | .make-row(); 13 | } 14 | 15 | // Common styles for small and large grid columns 16 | .make-grid-columns(); 17 | 18 | 19 | // Extra small grid 20 | // 21 | // Grid classes for extra small devices like smartphones. No offset, push, or 22 | // pull classes are present here due to the size of the target. 23 | // 24 | // Note that `.col-xs-12` doesn't get floated on purpose--there's no need since 25 | // it's full-width. 26 | 27 | .make-grid-columns-float(xs); 28 | .make-grid(@grid-columns, xs, width); 29 | .make-grid(@grid-columns, xs, pull); 30 | .make-grid(@grid-columns, xs, push); 31 | .make-grid(@grid-columns, xs, offset); 32 | 33 | 34 | // Small grid 35 | // 36 | // Columns, offsets, pushes, and pulls for the small device range, from phones 37 | // to tablets. 38 | // 39 | // Note that `.col-sm-12` doesn't get floated on purpose--there's no need since 40 | // it's full-width. 41 | 42 | @media (min-width: @screen-sm-min) { 43 | .container { 44 | width: @container-sm; 45 | } 46 | 47 | .make-grid-columns-float(sm); 48 | .make-grid(@grid-columns, sm, width); 49 | .make-grid(@grid-columns, sm, pull); 50 | .make-grid(@grid-columns, sm, push); 51 | .make-grid(@grid-columns, sm, offset); 52 | } 53 | 54 | 55 | // Medium grid 56 | // 57 | // Columns, offsets, pushes, and pulls for the desktop device range. 58 | // 59 | // Note that `.col-md-12` doesn't get floated on purpose--there's no need since 60 | // it's full-width. 61 | 62 | @media (min-width: @screen-md-min) { 63 | .container { 64 | width: @container-md; 65 | } 66 | 67 | .make-grid-columns-float(md); 68 | .make-grid(@grid-columns, md, width); 69 | .make-grid(@grid-columns, md, pull); 70 | .make-grid(@grid-columns, md, push); 71 | .make-grid(@grid-columns, md, offset); 72 | } 73 | 74 | 75 | // Large grid 76 | // 77 | // Columns, offsets, pushes, and pulls for the large desktop device range. 78 | // 79 | // Note that `.col-lg-12` doesn't get floated on purpose--there's no need since 80 | // it's full-width. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .container { 84 | width: @container-lg; 85 | } 86 | 87 | .make-grid-columns-float(lg); 88 | .make-grid(@grid-columns, lg, width); 89 | .make-grid(@grid-columns, lg, pull); 90 | .make-grid(@grid-columns, lg, push); 91 | .make-grid(@grid-columns, lg, offset); 92 | } 93 | 94 | -------------------------------------------------------------------------------- /public/demo/less/input-groups.less: -------------------------------------------------------------------------------- 1 | // 2 | // Input groups 3 | // -------------------------------------------------- 4 | 5 | // Base styles 6 | // ------------------------- 7 | .input-group { 8 | position: relative; // For dropdowns 9 | display: table; 10 | border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table 11 | 12 | // Undo padding and float of grid classes 13 | &.col { 14 | float: none; 15 | padding-left: 0; 16 | padding-right: 0; 17 | } 18 | 19 | .form-control { 20 | width: 100%; 21 | margin-bottom: 0; 22 | } 23 | } 24 | 25 | // Sizing options 26 | // 27 | // Remix the default form control sizing classes into new ones for easier 28 | // manipulation. 29 | 30 | .input-group-lg > .form-control, 31 | .input-group-lg > .input-group-addon, 32 | .input-group-lg > .input-group-btn > .btn { .input-lg(); } 33 | .input-group-sm > .form-control, 34 | .input-group-sm > .input-group-addon, 35 | .input-group-sm > .input-group-btn > .btn { .input-sm(); } 36 | 37 | 38 | // Display as table-cell 39 | // ------------------------- 40 | .input-group-addon, 41 | .input-group-btn, 42 | .input-group .form-control { 43 | display: table-cell; 44 | 45 | &:not(:first-child):not(:last-child) { 46 | border-radius: 0; 47 | } 48 | } 49 | // Addon and addon wrapper for buttons 50 | .input-group-addon, 51 | .input-group-btn { 52 | width: 1%; 53 | white-space: nowrap; 54 | vertical-align: middle; // Match the inputs 55 | } 56 | 57 | // Text input groups 58 | // ------------------------- 59 | .input-group-addon { 60 | padding: @padding-base-vertical @padding-base-horizontal; 61 | font-size: @font-size-base; 62 | font-weight: normal; 63 | line-height: 1; 64 | color: @input-color; 65 | text-align: center; 66 | background-color: @input-group-addon-bg; 67 | border: 1px solid @input-group-addon-border-color; 68 | border-radius: @border-radius-base; 69 | 70 | // Sizing 71 | &.input-sm { 72 | padding: @padding-small-vertical @padding-small-horizontal; 73 | font-size: @font-size-small; 74 | border-radius: @border-radius-small; 75 | } 76 | &.input-lg { 77 | padding: @padding-large-vertical @padding-large-horizontal; 78 | font-size: @font-size-large; 79 | border-radius: @border-radius-large; 80 | } 81 | 82 | // Nuke default margins from checkboxes and radios to vertically center within. 83 | input[type="radio"], 84 | input[type="checkbox"] { 85 | margin-top: 0; 86 | } 87 | } 88 | 89 | // Reset rounded corners 90 | .input-group .form-control:first-child, 91 | .input-group-addon:first-child, 92 | .input-group-btn:first-child > .btn, 93 | .input-group-btn:first-child > .dropdown-toggle, 94 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { 95 | .border-right-radius(0); 96 | } 97 | .input-group-addon:first-child { 98 | border-right: 0; 99 | } 100 | .input-group .form-control:last-child, 101 | .input-group-addon:last-child, 102 | .input-group-btn:last-child > .btn, 103 | .input-group-btn:last-child > .dropdown-toggle, 104 | .input-group-btn:first-child > .btn:not(:first-child) { 105 | .border-left-radius(0); 106 | } 107 | .input-group-addon:last-child { 108 | border-left: 0; 109 | } 110 | 111 | // Button input groups 112 | // ------------------------- 113 | .input-group-btn { 114 | position: relative; 115 | white-space: nowrap; 116 | 117 | // Negative margin to only have a 1px border between the two 118 | &:first-child > .btn { 119 | margin-right: -1px; 120 | } 121 | &:last-child > .btn { 122 | margin-left: -1px; 123 | } 124 | } 125 | .input-group-btn > .btn { 126 | position: relative; 127 | // Jankily prevent input button groups from wrapping 128 | + .btn { 129 | margin-left: -4px; 130 | } 131 | // Bring the "active" button to the front 132 | &:hover, 133 | &:active { 134 | z-index: 2; 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /public/demo/less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding; 8 | margin-bottom: @jumbotron-padding; 9 | font-size: @jumbotron-font-size; 10 | font-weight: 200; 11 | box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.15); 12 | line-height: (@line-height-base * 1.5); 13 | color: @jumbotron-color; 14 | background-color: @jumbotron-bg; 15 | 16 | h1 { 17 | line-height: 1; 18 | color: @jumbotron-heading-color; 19 | } 20 | p { 21 | line-height: 1.4; 22 | } 23 | 24 | .container & { 25 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 26 | } 27 | 28 | @media screen and (min-width: @screen-sm-min) { 29 | padding-top: (@jumbotron-padding * 1.6); 30 | padding-bottom: (@jumbotron-padding * 1); 31 | 32 | .container & { 33 | padding-left: (@jumbotron-padding * 2); 34 | padding-right: (@jumbotron-padding * 2); 35 | } 36 | 37 | h1 { 38 | font-size: (@font-size-base * 3.8); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /public/demo/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 | 33 | // Colors 34 | // Contextual variations (linked labels get darker on :hover) 35 | 36 | .label-default { 37 | .label-variant(@label-default-bg); 38 | } 39 | 40 | .label-primary { 41 | .label-variant(@label-primary-bg); 42 | } 43 | 44 | .label-success { 45 | .label-variant(@label-success-bg); 46 | } 47 | 48 | .label-info { 49 | .label-variant(@label-info-bg); 50 | } 51 | 52 | .label-warning { 53 | .label-variant(@label-warning-bg); 54 | } 55 | 56 | .label-danger { 57 | .label-variant(@label-danger-bg); 58 | } 59 | -------------------------------------------------------------------------------- /public/demo/less/list-group.less: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | // Base class 6 | // 7 | // Easily usable on