├── log └── .keep ├── app ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── concerns │ │ └── .keep │ ├── user.rb │ └── authentication.rb ├── assets │ ├── images │ │ └── .keep │ ├── javascripts │ │ ├── ember-app │ │ │ ├── mixins │ │ │ │ └── .gitkeep │ │ │ ├── models │ │ │ │ ├── .gitkeep │ │ │ │ ├── user.js.coffee │ │ │ │ └── profile.js.coffee │ │ │ ├── routes │ │ │ │ ├── .gitkeep │ │ │ │ ├── application_route.js.coffee │ │ │ │ └── user_routes.js.coffee │ │ │ ├── views │ │ │ │ └── .gitkeep │ │ │ ├── components │ │ │ │ └── .gitkeep │ │ │ ├── controllers │ │ │ │ ├── .gitkeep │ │ │ │ ├── user_controllers.js.coffee │ │ │ │ ├── application_controller.js.coffee │ │ │ │ └── sign_in_controller.js.coffee │ │ │ ├── helpers │ │ │ │ └── .gitkeep │ │ │ ├── templates │ │ │ │ ├── .gitkeep │ │ │ │ ├── components │ │ │ │ │ └── .gitkeep │ │ │ │ ├── error.hbs │ │ │ │ ├── missing.hbs │ │ │ │ ├── user.hbs │ │ │ │ ├── loading.hbs │ │ │ │ ├── application.hbs │ │ │ │ ├── sign-in.hbs │ │ │ │ ├── users.hbs │ │ │ │ └── partials │ │ │ │ │ └── _header.hbs │ │ │ ├── store.js.coffee │ │ │ ├── app.js.coffee │ │ │ └── router.js.coffee │ │ └── application.js.coffee │ └── stylesheets │ │ ├── _variables.scss │ │ ├── layouts │ │ └── general.css.scss │ │ ├── modules │ │ └── _social-icons.scss │ │ ├── bootstrap-generators.scss │ │ ├── application.css.scss │ │ ├── framework_and_overrides.css.scss │ │ └── bootstrap-variables.scss ├── controllers │ ├── concerns │ │ └── .keep │ ├── static_pages_controller.rb │ ├── application_controller.rb │ ├── sessions_controller.rb │ ├── api │ │ ├── users_controller.rb │ │ └── dream_symbols_controller.rb │ ├── authentications_controller.rb │ └── users_controller.rb ├── views │ ├── static_pages │ │ └── index.html.haml │ ├── sessions │ │ └── create.html.erb │ └── layouts │ │ └── application.html.haml ├── helpers │ └── application_helper.rb └── serializers │ └── user_serializer.rb ├── lib ├── assets │ └── .keep └── tasks │ └── .keep ├── public ├── favicon.ico ├── robots.txt ├── 500.html ├── 422.html └── 404.html ├── test ├── helpers │ └── .keep ├── mailers │ └── .keep ├── models │ └── .keep ├── controllers │ └── .keep ├── fixtures │ └── .keep ├── integration │ └── .keep └── test_helper.rb ├── .rbenv-gemsets ├── vendor └── assets │ ├── javascripts │ └── .keep │ └── stylesheets │ └── .keep ├── bin ├── rake ├── bundle └── rails ├── config.ru ├── config ├── boot.rb ├── environment.rb ├── initializers │ ├── session_store.rb │ ├── filter_parameter_logging.rb │ ├── mime_types.rb │ ├── omniauth.rb │ ├── backtrace_silencers.rb │ ├── wrap_parameters.rb │ ├── inflections.rb │ └── secret_token.rb ├── routes.rb ├── database.yml ├── locales │ └── en.yml ├── application.rb └── environments │ ├── development.rb │ ├── test.rb │ └── production.rb ├── Rakefile ├── db ├── migrate │ ├── 20140401165723_create_users.rb │ ├── 20140401165735_create_profile.rb │ └── 20140401165707_create_authentications.rb └── seeds.rb ├── .gitignore ├── README.rdoc ├── Gemfile └── Gemfile.lock /log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.rbenv-gemsets: -------------------------------------------------------------------------------- 1 | ./gems 2 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/static_pages/index.html.haml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/mixins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/views/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/error.hbs: -------------------------------------------------------------------------------- 1 |

Error. Big error...

2 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/routes/application_route.js.coffee: -------------------------------------------------------------------------------- 1 | App.ApplicationRoute = Ember.Route.extend() -------------------------------------------------------------------------------- /app/assets/stylesheets/_variables.scss: -------------------------------------------------------------------------------- 1 | $facebook: #45619D; 2 | $google-plus: #DD4B39; 3 | $twitter: #55ACEE; 4 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/missing.hbs: -------------------------------------------------------------------------------- 1 |

404

2 |

Looks like you took a wrong turn somewhere!

3 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/user.hbs: -------------------------------------------------------------------------------- 1 |

{{screen_name}}

2 | {{email}} 3 | 4 |
5 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/loading.hbs: -------------------------------------------------------------------------------- 1 |

2 | Loading 3 | 4 |

5 | -------------------------------------------------------------------------------- /app/serializers/user_serializer.rb: -------------------------------------------------------------------------------- 1 | class UserSerializer < ActiveModel::Serializer 2 | attributes :id, :screen_name, :email 3 | end -------------------------------------------------------------------------------- /app/controllers/static_pages_controller.rb: -------------------------------------------------------------------------------- 1 | class StaticPagesController < ApplicationController 2 | def index 3 | 4 | end 5 | end -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/store.js.coffee: -------------------------------------------------------------------------------- 1 | # http://emberjs.com/guides/models/using-the-store/ 2 | 3 | App.Store = DS.Store.extend() 4 | 5 | DS.RESTAdapter.reopen 6 | namespace: 'api' 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/application.hbs: -------------------------------------------------------------------------------- 1 |
2 | {{partial "partials/header"}} 3 |
4 |
5 |
6 | {{outlet}} 7 |
9 | -------------------------------------------------------------------------------- /app/assets/stylesheets/layouts/general.css.scss: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | body > .ember-view, 4 | main { 5 | height: 100%; 6 | } 7 | 8 | main { 9 | margin-top: 0px; 10 | padding-top: 51px; 11 | } -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | EmberRailsOauthExample::Application.initialize! 6 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/controllers/user_controllers.js.coffee: -------------------------------------------------------------------------------- 1 | App.UsersController = Ember.ArrayController.extend 2 | itemController: 'user' 3 | 4 | App.UserController = Ember.ObjectController.extend() 5 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | EmberRailsOauthExample::Application.config.session_store :cookie_store, key: '_ember-rails-oauth-example_session' 4 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /app/views/sessions/create.html.erb: -------------------------------------------------------------------------------- 1 | <%= javascript_tag do %> 2 | localStorage['currentUser'] = "<%= @user.id %>"; 3 | App.set("currentUser", <%= @user.id %>); 4 | // window.history.pushState( "Redirecting to Root URL", "Title", "/" ); 5 | <% end %> 6 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/routes/user_routes.js.coffee: -------------------------------------------------------------------------------- 1 | App.UsersRoute = Ember.Route.extend 2 | model: -> 3 | @store.find 'user' 4 | 5 | App.UserRoute = Ember.Route.extend 6 | setUpController: (controller, user)-> 7 | controller.set('model', user) -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | EmberRailsOauthExample::Application.load_tasks 7 | -------------------------------------------------------------------------------- /db/migrate/20140401165723_create_users.rb: -------------------------------------------------------------------------------- 1 | class CreateUsers < ActiveRecord::Migration 2 | def change 3 | create_table :users do |t| 4 | t.string :screen_name 5 | t.string :email 6 | 7 | t.timestamps 8 | end 9 | 10 | add_column :users, :slug, :string 11 | add_index :users, :slug, unique: true 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/app.js.coffee: -------------------------------------------------------------------------------- 1 | #= require_self 2 | #= require ./store 3 | #= require_tree ./models 4 | #= require_tree ./controllers 5 | #= require_tree ./views 6 | #= require_tree ./helpers 7 | #= require_tree ./components 8 | #= require_tree ./templates/partials 9 | #= require_tree ./templates 10 | #= require_tree ./routes 11 | #= require ./router -------------------------------------------------------------------------------- /db/migrate/20140401165735_create_profile.rb: -------------------------------------------------------------------------------- 1 | class CreateProfile < ActiveRecord::Migration 2 | def change 3 | create_table :profiles do |t| 4 | t.string :first_name 5 | t.string :last_name 6 | t.string :full_name 7 | t.string :gender 8 | t.string :image 9 | t.integer :user_id 10 | 11 | t.timestamps 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/assets/javascripts/application.js.coffee: -------------------------------------------------------------------------------- 1 | #= require bootstrap 2 | #= require handlebars 3 | #= require ember 4 | #= require ember-data 5 | # 6 | #= require_self 7 | #= require ember-app/app 8 | 9 | window.App = Ember.Application.create 10 | LOG_TRANSITIONS: true 11 | LOG_TRANSITIONS_INTERNAL: true 12 | LOG_VIEW_LOOKUPS: true 13 | 14 | currentUser: localStorage['currentUser'] 15 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/models/user.js.coffee: -------------------------------------------------------------------------------- 1 | attr = DS.attr 2 | App.User = DS.Model.extend 3 | email: attr 'string' 4 | screen_name: attr 'string' 5 | 6 | profile: DS.belongsTo 'profile' 7 | 8 | serialize: -> 9 | @getProperties [ 'guid', 'id', 'email', 'screen_name' ] 10 | # dream_symbols: DS.hasMany 'dream_symbol' 11 | # interpretations: DS.hasMany 'interpretation' 12 | -------------------------------------------------------------------------------- /config/initializers/omniauth.rb: -------------------------------------------------------------------------------- 1 | Rails.application.config.middleware.use OmniAuth::Builder do 2 | provider :twitter, ENV['TWITTER_KEY'], ENV['TWITTER_SECRET'] 3 | provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'] 4 | provider :facebook, ENV['FACEBOOK_ID'], ENV['FACEBOOK_SECRET'] 5 | provider :identity, on_failed_registration: lambda { |env| 6 | IdentitiesController.action(:new).call(env) 7 | } 8 | end -------------------------------------------------------------------------------- /app/assets/stylesheets/modules/_social-icons.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | 3 | .fa-facebook-square, 4 | .fa.fa-facebook-square:hover { 5 | color: $facebook; 6 | } 7 | 8 | .fa-google-plus-square, 9 | .fa.fa-google-plus-square:hover { 10 | color: $google-plus; 11 | } 12 | 13 | .fa-twitter-square, 14 | .fa.fa-twitter-square:hover { 15 | color: $twitter; 16 | } 17 | 18 | .fa.is-authenticated { 19 | color: hsl(0, 0%, 70%); 20 | } -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/sign-in.hbs: -------------------------------------------------------------------------------- 1 |

User sign in

2 | {{#if auth.signedIn}} 3 |

You're already signed in.

4 | 5 | {{else}} 6 | 7 |
8 | Twitter 9 | Facebook 10 | Google + 11 |
12 | {{/if}} 13 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/models/profile.js.coffee: -------------------------------------------------------------------------------- 1 | attr = DS.attr 2 | App.Profile = DS.Model.extend( 3 | gender: attr 'string' 4 | first_name: attr 'string' 5 | last_name: attr 'string' 6 | full_name: attr 'string' 7 | image: attr 'string' 8 | 9 | user: DS.belongsTo 'user' 10 | 11 | serialize: -> 12 | @getProperties [ 'guid', 'gender', 'first_name', 'last_name', 'full_name', 'image' ] 13 | ) -------------------------------------------------------------------------------- /app/assets/stylesheets/bootstrap-generators.scss: -------------------------------------------------------------------------------- 1 | @import "bootstrap-variables"; 2 | @import "bootstrap.scss"; 3 | 4 | body { 5 | padding-top: $navbar-height + 10px; 6 | } 7 | 8 | .page-header { 9 | a.btn { 10 | float: right; 11 | } 12 | 13 | a.btn + a.btn { 14 | margin-right: 8px; 15 | } 16 | } 17 | 18 | input[type="radio"], input[type="checkbox"] { 19 | width: initial; 20 | height: initial; 21 | margin-top: 7px; 22 | } 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/controllers/application_controller.js.coffee: -------------------------------------------------------------------------------- 1 | App.ApplicationController = Ember.Controller.extend 2 | signedInUser: (-> 3 | @store.find 'user', localStorage['currentUser'] 4 | ).property('App.currentUser') 5 | 6 | userSignedIn: (-> 7 | localStorage['currentUser']? 8 | ).property('App.currentUser') 9 | 10 | actions: 11 | signOut: -> 12 | console.log "Sign Out" 13 | delete localStorage['currentUser'] 14 | App.set 'currentUser', `undefined` -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | EmberRailsOauthExample::Application.routes.draw do 2 | get "/auth/:provider/callback", to: "sessions#create" 3 | 4 | namespace :api, defaults: { format: 'json' } do 5 | get "/auth/:provider/callback", to: "sessions#create" 6 | resources :authentications 7 | 8 | resources :users do 9 | resources :authentications 10 | resource :profile 11 | end 12 | end 13 | 14 | root to: 'static_pages#index' 15 | get '*path', to: 'static_pages#index' 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20140401165707_create_authentications.rb: -------------------------------------------------------------------------------- 1 | class CreateAuthentications < ActiveRecord::Migration 2 | def change 3 | create_table :authentications do |t| 4 | t.integer :user_id 5 | t.string :email 6 | t.string :gender 7 | t.string :image 8 | t.string :full_name 9 | t.string :first_name 10 | t.string :last_name 11 | t.string :provider 12 | t.string :screen_name 13 | t.string :uid 14 | 15 | t.timestamps 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/controllers/sign_in_controller.js.coffee: -------------------------------------------------------------------------------- 1 | App.SignInController = Ember.Controller.extend 2 | needs: [ 'application' ] 3 | 4 | actions: 5 | signIn: -> 6 | console.log "Sign In" 7 | 8 | email = @get("email") 9 | console.log email 10 | @store.find( 'user', { email: email } ).then (user)-> 11 | console.log user 12 | console.log "'#{user}'" 13 | console.log user.email 14 | localStorage["currentUser"] = user.id 15 | App.set "currentUser", user.id 16 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/users.hbs: -------------------------------------------------------------------------------- 1 |

Users

2 | 3 |
4 | {{#each user in model}} 5 |
6 |

7 | {{#link-to "user" user}} 8 | {{user.screen_name}} 9 | 10 | {{#link-to "user.edit" user class="btn btn-default btn-xs"}} 11 | 12 | {{/link-to}} 13 | 14 | {{/link-to}} 15 |

16 |
17 | {{else}} 18 | No Users yet. 19 | {{/each}} 20 |
21 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | ActiveRecord::Migration.check_pending! 7 | 8 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 9 | # 10 | # Note: You'll currently still have to declare fixtures explicitly in integration tests 11 | # -- they do not yet inherit this setting 12 | fixtures :all 13 | 14 | # Add more helper methods to be used by all tests here... 15 | end 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-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 rbenv gemsets 11 | gems 12 | gems/* 13 | 14 | # Ignore the default SQLite database. 15 | /db/*.sqlite3 16 | /db/*.sqlite3-journal 17 | 18 | # Ignore all logfiles and tempfiles. 19 | /log/*.log 20 | /tmp 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/router.js.coffee: -------------------------------------------------------------------------------- 1 | # For more information see: http://emberjs.com/guides/routing/ 2 | App.Router.reopen 3 | location: 'history' 4 | 5 | App.Router.map -> 6 | @resource 'users', path: '/users', -> 7 | @route 'edit', path: 'edit' 8 | @route 'user', path: '/users/:user_id' 9 | 10 | @route 'sign-in' 11 | @route 'oauth_callbacks', path: '/auth/:provider/callback' 12 | @route 'missing', path: '*:' 13 | 14 | 15 | App.OauthCallbacksRoute = Ember.Route.extend 16 | redirect: -> 17 | @transitionTo 'application' 18 | 19 | App.MissingRoute = Ember.Route.extend 20 | redirect: -> 21 | @transitionTo 'missing' -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.css.scss: -------------------------------------------------------------------------------- 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_self 12 | *= require framework_and_overrides 13 | *= require font-awesome 14 | *= require_tree ./modules 15 | *= require_tree ./layouts 16 | */ 17 | -------------------------------------------------------------------------------- /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 | EmberRailsOauthExample::Application.config.secret_key_base = '12c92134d7e1ad9f473bc553c28570a1cf6abe53b7bff784a63dd11ac5e2269da11d4dbb36da07caa98d9cf8c639d9bdfa9b8309e787c533ee10f9551daa1eda' 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/controllers/sessions_controller.rb: -------------------------------------------------------------------------------- 1 | class SessionsController < ApplicationController 2 | def new 3 | end 4 | 5 | def create 6 | auth = env["omniauth.auth"] 7 | notice = "" 8 | 9 | if current_user 10 | @user = current_user 11 | User.add_omniauth_to_user(auth, @user) 12 | notice << "Authentication added successfully." 13 | else 14 | @user = User.from_omniauth( auth ) 15 | params[:omni] = env["omniauth.auth"] 16 | session[:user_id] = @user.id 17 | notice << " been signed in!" 18 | end 19 | end 20 | 21 | def destroy 22 | session[:user_id] = nil 23 | # session[:omni] = nil 24 | redirect_to root_url, notice: "Signed out!" 25 | end 26 | 27 | def failure 28 | redirect_to root_url, alert: "Authentication failed, please try again." 29 | end 30 | end -------------------------------------------------------------------------------- /app/controllers/api/users_controller.rb: -------------------------------------------------------------------------------- 1 | class Api::UsersController < ApplicationController 2 | respond_to :json 3 | 4 | def index 5 | @users = User.all 6 | 7 | @users = User.where(email: params[:email]) if params[:email] 8 | render json: @users 9 | end 10 | 11 | def show 12 | @user = User.find( params[:id] ) 13 | render json: @user 14 | end 15 | 16 | def create 17 | @user = User.create( user_params ) 18 | render json: @user 19 | end 20 | 21 | def update 22 | @user = User.update( params[:id], user_params ) 23 | render json: @user 24 | end 25 | 26 | def destroy 27 | render json: User.destroy( params[:id] ) 28 | end 29 | 30 | private 31 | # Never trust parameters from the scary internet, only allow the white list through. 32 | def user_params 33 | params.require(:user).permit( :screen_name, :email ) 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.haml: -------------------------------------------------------------------------------- 1 | !!! 2 | %html 3 | %head 4 | %title= content_for?(:title) ? yield(:title) : 'Mystics' 5 | %meta{ :name => "description", :content => "#{ content_for?(:description) ? yield(:description) : 'Mystics' }" } 6 | %meta{:charset => "utf-8"} 7 | %meta{:content => "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no", :name => "viewport"} 8 | %meta{:content => "", :name => "author"} 9 | 10 | / Le HTML5 shim, for IE6-8 support of HTML5 elements 11 | /[if lt IE 9] 12 | = javascript_include_tag "https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js", "https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js" 13 | 14 | = stylesheet_link_tag "application", :media => "all", "data-turbolinks-track" => true 15 | = jquery_include_tag :google 16 | = jquery_ui_include_tag :google 17 | = javascript_include_tag "application", "data-turbolinks-track" => true 18 | = csrf_meta_tags 19 | %body 20 | = yield 21 | -------------------------------------------------------------------------------- /app/assets/stylesheets/framework_and_overrides.css.scss: -------------------------------------------------------------------------------- 1 | // import the CSS framework 2 | @import "bootstrap"; 3 | 4 | // make all images responsive by default 5 | img { 6 | @extend .img-responsive; 7 | margin: 0 auto; 8 | } 9 | // override for the 'Home' navigation link 10 | .navbar-brand { 11 | font-size: inherit; 12 | } 13 | 14 | // THESE ARE EXAMPLES YOU CAN MODIFY 15 | // create your own classes 16 | // to make views framework-neutral 17 | .column { 18 | @extend .col-md-6; 19 | @extend .text-center; 20 | } 21 | .form { 22 | @extend .col-md-6; 23 | } 24 | .form-centered { 25 | @extend .col-md-6; 26 | @extend .text-center; 27 | } 28 | .submit { 29 | @extend .btn; 30 | @extend .btn-primary; 31 | @extend .btn-lg; 32 | } 33 | // apply styles to HTML elements 34 | // to make views framework-neutral 35 | main { 36 | @extend .container; 37 | background-color: #eee; 38 | padding-bottom: 80px; 39 | width: 100%; 40 | margin-top: 51px; // accommodate the navbar 41 | } 42 | section { 43 | @extend .row; 44 | margin-top: 20px; 45 | } 46 | -------------------------------------------------------------------------------- /app/controllers/api/dream_symbols_controller.rb: -------------------------------------------------------------------------------- 1 | class Api::DreamSymbolsController < ApplicationController 2 | respond_to :json 3 | 4 | def index 5 | @dream_symbols = DreamSymbol.all 6 | render json: @dream_symbols 7 | end 8 | 9 | def show 10 | @dream_symbol = DreamSymbol.find( params[:id] ) 11 | ap params 12 | respond_with @dream_symbol 13 | end 14 | 15 | def create 16 | @dream_symbol = DreamSymbol.new( dream_symbol_params ) 17 | if @dream_symbol.save 18 | render json: @dream_symbol, status: created 19 | else 20 | render json: @dream_symbol.errors, status: :unprocessable_entity 21 | end 22 | end 23 | 24 | def update 25 | @dream_symbol = DreamSymbol.update( params[:id], dream_symbol_params ) 26 | respond_with @dream_symbol 27 | end 28 | 29 | def destroy 30 | DreamSymbol.destroy( params[:id] ) 31 | head :no_content 32 | end 33 | 34 | private 35 | # Never trust parameters from the scary internet, only allow the white list through. 36 | def dream_symbol_params 37 | params.require(:dream_symbol).permit(:name, :ancestry, :description, :image) 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /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 EmberRailsOauthExample 10 | class Application < Rails::Application 11 | config.assets.precompile += ['jquery.js', 'jquery-ui.js'] 12 | config.handlebars.templates_root = 'ember-app/templates' 13 | # Settings in config/environments/* take precedence over those specified here. 14 | # Application configuration should go into files in config/initializers 15 | # -- all .rb files in that directory are automatically loaded. 16 | 17 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 18 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 19 | # config.time_zone = 'Central Time (US & Canada)' 20 | 21 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 22 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 23 | # config.i18n.default_locale = :de 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | EmberRailsOauthExample::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 | config.ember.variant = :development 13 | 14 | # Show full error reports and disable caching. 15 | config.consider_all_requests_local = true 16 | config.action_controller.perform_caching = false 17 | 18 | # Don't care if the mailer can't send. 19 | config.action_mailer.raise_delivery_errors = false 20 | 21 | # Print deprecation notices to the Rails logger. 22 | config.active_support.deprecation = :log 23 | 24 | # Raise an error on page load if there are pending migrations 25 | config.active_record.migration_error = :page_load 26 | 27 | # Debug mode disables concatenation and preprocessing of assets. 28 | # This option may cause significant delays in view rendering with a large 29 | # number of complex assets. 30 | config.assets.debug = true 31 | end 32 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /app/controllers/authentications_controller.rb: -------------------------------------------------------------------------------- 1 | class AuthenticationsController < ApplicationController 2 | before_action :set_authentication, only: [:show, :destroy] 3 | before_action :set_user, only: [:create, :destroy] 4 | 5 | def show 6 | end 7 | 8 | def new 9 | @authentication = Authentication.new 10 | end 11 | 12 | def edit 13 | end 14 | 15 | def create 16 | @authentication = Authentication.new(authentication_params) 17 | 18 | respond_to do |format| 19 | if @authentication.save 20 | format.html { redirect_to @user, notice: 'Authentication was successfully created.' } 21 | format.json { render action: 'show', status: :created, location: @user } 22 | else 23 | format.html { render action: 'new' } 24 | format.json { render json: @authentication.errors, status: :unprocessable_entity } 25 | end 26 | end 27 | end 28 | 29 | def destroy 30 | @authentication.destroy 31 | respond_to do |format| 32 | format.html { redirect_to user_url(@user) } 33 | format.json { head :no_content } 34 | end 35 | end 36 | 37 | private 38 | # Use callbacks to share common setup or constraints between actions. 39 | def set_authentication 40 | @authentication = Authentication.find(params[:id]) 41 | end 42 | 43 | def set_user 44 | @user = User.find(params[:user_id]) 45 | end 46 | 47 | # Never trust parameters from the scary internet, only allow the white list through. 48 | def authentication_params 49 | params.require(:authentication).permit(:user_id, :provider, :uid, :name, :email) 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /app/controllers/users_controller.rb: -------------------------------------------------------------------------------- 1 | class UsersController < ApplicationController 2 | before_action :set_user, only: [:show, :edit, :update, :destroy] 3 | 4 | def index 5 | @users = User.friendly.all 6 | @users = User.where(email: params[:email]) if params[:email] 7 | @users = User.where(screen_name: params[:screen_name]) if params[:screen_name] 8 | end 9 | 10 | def show 11 | @authentications = @user.authentications 12 | @profile = Profile.where(user_id: @user.id).first 13 | end 14 | 15 | def new 16 | @user = User.new 17 | end 18 | 19 | def edit 20 | end 21 | 22 | def create 23 | @user = User.new(user_params) 24 | 25 | respond_to do |format| 26 | if @user.save 27 | format.html { redirect_to @user, notice: 'User was successfully created.' } 28 | else 29 | format.html { render action: 'new' } 30 | end 31 | end 32 | end 33 | 34 | def update 35 | respond_to do |format| 36 | if @user.update(user_params) 37 | format.html { redirect_to @user, notice: 'User was successfully updated.' } 38 | else 39 | format.html { render action: 'edit' } 40 | end 41 | end 42 | end 43 | 44 | def destroy 45 | @user.destroy 46 | respond_to do |format| 47 | format.html { redirect_to users_url } 48 | end 49 | end 50 | 51 | private 52 | # Use callbacks to share common setup or constraints between actions. 53 | def set_user 54 | @user = User.friendly.find(params[:id]) 55 | end 56 | 57 | # Never trust parameters from the scary internet, only allow the white list through. 58 | def user_params 59 | params.require(:user).permit(:name, :email) 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /config/environments/test.rb: -------------------------------------------------------------------------------- 1 | EmberRailsOauthExample::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 | config.ember.variant = :test 11 | 12 | # Do not eager load code on boot. This avoids loading your whole application 13 | # just for the purpose of running a single test. If you are using a tool that 14 | # preloads Rails for running tests, you may have to set it to true. 15 | config.eager_load = false 16 | 17 | # Configure static asset server for tests with Cache-Control for performance. 18 | config.serve_static_assets = true 19 | config.static_cache_control = "public, max-age=3600" 20 | 21 | # Show full error reports and disable caching. 22 | config.consider_all_requests_local = true 23 | config.action_controller.perform_caching = false 24 | 25 | # Raise exceptions instead of rendering exception templates. 26 | config.action_dispatch.show_exceptions = false 27 | 28 | # Disable request forgery protection in test environment. 29 | config.action_controller.allow_forgery_protection = false 30 | 31 | # Tell Action Mailer not to deliver emails to the real world. 32 | # The :test delivery method accumulates sent emails in the 33 | # ActionMailer::Base.deliveries array. 34 | config.action_mailer.delivery_method = :test 35 | 36 | # Print deprecation notices to the stderr. 37 | config.active_support.deprecation = :stderr 38 | end 39 | -------------------------------------------------------------------------------- /app/assets/javascripts/ember-app/templates/partials/_header.hbs: -------------------------------------------------------------------------------- 1 | 55 | -------------------------------------------------------------------------------- /app/models/user.rb: -------------------------------------------------------------------------------- 1 | class User < ActiveRecord::Base 2 | has_many :authentications 3 | has_one :identity 4 | has_one :profile 5 | has_many :dream_symbols 6 | has_many :interpretations 7 | 8 | validates :screen_name, uniqueness: true 9 | 10 | accepts_nested_attributes_for :profile 11 | 12 | class << self 13 | def add_omniauth_to_user(auth, user) 14 | user.authentications.create_from_omniauth(auth, user.id) 15 | end 16 | 17 | def create_from_omniauth(auth) 18 | user = User.create! 19 | profile = Profile.create! user_id: user.id 20 | authentication = user.authentications.create_from_omniauth(auth, user.id) 21 | set_user_fields(user, authentication) 22 | 23 | profile.set_fields( 24 | first_name: authentication.first_name, 25 | last_name: authentication.last_name, 26 | full_name: authentication.full_name, 27 | gender: authentication.gender, 28 | image: authentication.image ) 29 | 30 | user 31 | end 32 | 33 | def find_by_identity(auth) 34 | if auth['provider'] == 'identity' 35 | identity = Identity.find_by( screen_name: auth['name'] ) || Identity.find_by( email: auth['email'] ) 36 | end 37 | identity.user ? identity.user : nil 38 | end 39 | 40 | def find_by_omniauth(auth) 41 | authentication = Authentication.find_by_omniauth(auth) 42 | authentication ? authentication.user : nil 43 | end 44 | 45 | def from_omniauth(auth) 46 | find_by_omniauth(auth) || create_from_omniauth(auth) 47 | end 48 | 49 | def set_user_fields(user, authentication) 50 | user_gets_updated = user.screen_name.nil? || user.email.nil? 51 | user.screen_name = authentication.screen_name if user.screen_name.nil? && authentication.screen_name 52 | user.email = authentication.email if user.email.nil? && authentication.email 53 | user.save if user_gets_updated 54 | end 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /app/models/authentication.rb: -------------------------------------------------------------------------------- 1 | class Authentication < ActiveRecord::Base 2 | attr_accessor :omniauth_hash 3 | belongs_to :user 4 | 5 | validates :uid, uniqueness: true, presence: true 6 | 7 | PROVIDERS = [ :twitter, :google_oauth2, :facebook ] 8 | 9 | class << self 10 | def find_by_omniauth(auth) 11 | where( auth.slice(:provider, :uid) ).first 12 | end 13 | 14 | def create_from_omniauth(options, user_id) 15 | authentication = Authentication.new 16 | authentication.provider = options[:provider] 17 | authentication.uid = options[:uid] 18 | authentication.user_id = user_id 19 | 20 | set_extra_fields( options, authentication ) 21 | authentication.save 22 | authentication 23 | end 24 | 25 | def set_extra_fields(options, authentication) 26 | case options[:provider] 27 | when 'facebook' 28 | authentication.email = options[:extra][:raw_info][:email] 29 | authentication.gender = options[:extra][:raw_info][:gender] 30 | authentication.image = options[:info][:image] 31 | authentication.full_name = options[:extra][:raw_info][:name] 32 | authentication.screen_name = options[:extra][:raw_info][:username] 33 | 34 | when 'google_oauth2' 35 | authentication.email = options[:extra][:raw_info][:email] 36 | authentication.gender = options[:extra][:raw_info][:gender] 37 | authentication.image = options[:extra][:raw_info][:picture] 38 | authentication.full_name = options[:extra][:raw_info][:name] 39 | # Has no username 40 | 41 | when 'twitter' 42 | authentication.full_name = options[:extra][:raw_info][:name] 43 | authentication.image = options[:extra][:raw_info][:profile_image_url_https] 44 | authentication.screen_name = options[:extra][:raw_info][:screen_name] 45 | # Has no gender 46 | # Has no email 47 | 48 | end 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | ruby '2.0.0' 3 | gem 'rails', '4.0.3' 4 | gem 'settingslogic', '~> 2.0.9' # For app-wide settings 5 | gem 'uglifier', '>= 1.3.0' 6 | gem 'turbolinks' 7 | gem 'sqlite3' 8 | gem 'jbuilder', '~> 1.2' 9 | gem 'haml-rails' 10 | 11 | # Assets 12 | gem 'bootstrap-sass', '>= 3.0.0.0' 13 | gem 'coffee-rails', '~> 4.0.0' 14 | gem 'compass-rails', '~> 1.0.3' 15 | gem 'ember-rails' 16 | gem 'ember-source', '~>1.5.0' 17 | gem 'ember-data-source', '1.0.0.beta.7' 18 | gem 'hamlbars' # Hamlbars allows Haml support for Handlebars 19 | gem 'ember_script-rails' # Coffeescript support for Ember 20 | gem 'font-awesome-rails', '~> 4.0.3.1' 21 | gem 'jquery-rails', '3.0.3' # Ember needs jquery 1.10 or 2.0 22 | gem 'jquery-rails-cdn', '~> 1.0.1' # Uses CDN for jquery unless in development mode. 23 | gem 'jquery-ui-rails-cdn', '~> 0.1.2' # Uses CDN for jquery ui unless in development mode. 24 | gem 'oily_png', '~> 1.0.2', require: false # Faster sprite generation for Compass 25 | gem 'sass-rails', '~> 4.0.0' 26 | 27 | # Authentication 28 | gem 'bcrypt-ruby', '~> 3.1.2' 29 | gem 'cancan' 30 | gem 'omniauth' 31 | gem 'omniauth-facebook' 32 | gem 'omniauth-google-oauth2' 33 | gem 'omniauth-identity' 34 | gem 'omniauth-twitter' 35 | 36 | gem 'awesome_print', '~> 1.1.0' # much improved debugging output 37 | 38 | gem 'bootstrap-generators', '~> 3.1.1' # Provides rails generators styled for Bootstrap. 39 | 40 | gem 'unicorn', '~> 4.7.0', require: false # Use unicorn as the app server 41 | 42 | group :development do 43 | gem 'better_errors' 44 | gem 'binding_of_caller', :platforms=>[:mri_19, :mri_20, :rbx] 45 | gem 'foreman', '~> 0.63.0' 46 | gem 'html2haml' 47 | gem 'letter_opener', '~> 1.0.0' # Open delivered emails in browser 48 | gem 'quiet_assets' 49 | gem 'rails_layout' 50 | end 51 | 52 | group :development, :test do 53 | gem 'dotenv-rails' 54 | gem 'rspec-rails' 55 | end 56 | 57 | group :test do 58 | gem 'capybara' 59 | gem 'database_cleaner', '1.0.1' 60 | gem 'email_spec' 61 | gem 'factory_girl_rails', '~> 4.1.0' # Nicer way to generate fixtures 62 | gem 'timecop', '~> 0.5.9.1' # To make tests time independent 63 | gem 'webmock', '~> 1.13.0' # Prevent calls to external services during tests 64 | end -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | EmberRailsOauthExample::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 | config.ember.variant = :production 8 | 9 | # Eager load code on boot. This eager loads most of Rails and 10 | # your application in memory, allowing both thread web servers 11 | # and those relying on copy on write to perform better. 12 | # Rake tasks automatically ignore this option for performance. 13 | config.eager_load = true 14 | 15 | # Full error reports are disabled and caching is turned on. 16 | config.consider_all_requests_local = false 17 | config.action_controller.perform_caching = true 18 | 19 | # Enable Rack::Cache to put a simple HTTP cache in front of your application 20 | # Add `rack-cache` to your Gemfile before enabling this. 21 | # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. 22 | # config.action_dispatch.rack_cache = true 23 | 24 | # Disable Rails's static asset server (Apache or nginx will already do this). 25 | config.serve_static_assets = false 26 | 27 | # Compress JavaScripts and CSS. 28 | config.assets.js_compressor = :uglifier 29 | # config.assets.css_compressor = :sass 30 | 31 | # Do not fallback to assets pipeline if a precompiled asset is missed. 32 | config.assets.compile = false 33 | 34 | # Generate digests for assets URLs. 35 | config.assets.digest = true 36 | 37 | # Version of your assets, change this if you want to expire all your assets. 38 | config.assets.version = '1.0' 39 | 40 | # Specifies the header that your server uses for sending files. 41 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache 42 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 43 | 44 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 45 | # config.force_ssl = true 46 | 47 | # Set to :debug to see everything in the log. 48 | config.log_level = :info 49 | 50 | # Prepend all log lines with the following tags. 51 | # config.log_tags = [ :subdomain, :uuid ] 52 | 53 | # Use a different logger for distributed setups. 54 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 55 | 56 | # Use a different cache store in production. 57 | # config.cache_store = :mem_cache_store 58 | 59 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 60 | # config.action_controller.asset_host = "http://assets.example.com" 61 | 62 | # Precompile additional assets. 63 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 64 | # config.assets.precompile += %w( search.js ) 65 | 66 | # Ignore bad email addresses and do not raise email delivery errors. 67 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 68 | # config.action_mailer.raise_delivery_errors = false 69 | 70 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 71 | # the I18n.default_locale when a translation can not be found). 72 | config.i18n.fallbacks = true 73 | 74 | # Send deprecation notices to registered listeners. 75 | config.active_support.deprecation = :notify 76 | 77 | # Disable automatic flushing of the log to improve performance. 78 | # config.autoflush_log = false 79 | 80 | # Use default logging formatter so that PID and timestamp are not suppressed. 81 | config.log_formatter = ::Logger::Formatter.new 82 | end 83 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | actionmailer (4.0.3) 5 | actionpack (= 4.0.3) 6 | mail (~> 2.5.4) 7 | actionpack (4.0.3) 8 | activesupport (= 4.0.3) 9 | builder (~> 3.1.0) 10 | erubis (~> 2.7.0) 11 | rack (~> 1.5.2) 12 | rack-test (~> 0.6.2) 13 | active_model_serializers (0.8.1) 14 | activemodel (>= 3.0) 15 | activemodel (4.0.3) 16 | activesupport (= 4.0.3) 17 | builder (~> 3.1.0) 18 | activerecord (4.0.3) 19 | activemodel (= 4.0.3) 20 | activerecord-deprecated_finders (~> 1.0.2) 21 | activesupport (= 4.0.3) 22 | arel (~> 4.0.0) 23 | activerecord-deprecated_finders (1.0.3) 24 | activesupport (4.0.3) 25 | i18n (~> 0.6, >= 0.6.4) 26 | minitest (~> 4.2) 27 | multi_json (~> 1.3) 28 | thread_safe (~> 0.1) 29 | tzinfo (~> 0.3.37) 30 | addressable (2.3.6) 31 | arel (4.0.2) 32 | atomic (1.1.16) 33 | awesome_print (1.1.0) 34 | barber (0.4.2) 35 | ember-source 36 | execjs 37 | handlebars-source 38 | bcrypt (3.1.7) 39 | bcrypt-ruby (3.1.5) 40 | bcrypt (>= 3.1.3) 41 | better_errors (1.1.0) 42 | coderay (>= 1.0.0) 43 | erubis (>= 2.6.6) 44 | binding_of_caller (0.7.2) 45 | debug_inspector (>= 0.0.1) 46 | bootstrap-generators (3.1.1.2) 47 | railties (>= 3.1.0) 48 | bootstrap-sass (3.1.1.0) 49 | sass (~> 3.2) 50 | builder (3.1.4) 51 | cancan (1.6.10) 52 | capybara (2.2.1) 53 | mime-types (>= 1.16) 54 | nokogiri (>= 1.3.3) 55 | rack (>= 1.0.0) 56 | rack-test (>= 0.5.4) 57 | xpath (~> 2.0) 58 | chunky_png (1.2.9) 59 | coderay (1.1.0) 60 | coffee-rails (4.0.1) 61 | coffee-script (>= 2.2.0) 62 | railties (>= 4.0.0, < 5.0) 63 | coffee-script (2.2.0) 64 | coffee-script-source 65 | execjs 66 | coffee-script-source (1.7.0) 67 | compass (0.12.4) 68 | chunky_png (~> 1.2) 69 | fssm (>= 0.2.7) 70 | sass (~> 3.2.17) 71 | compass-rails (1.0.3) 72 | compass (>= 0.12.2, < 0.14) 73 | crack (0.4.2) 74 | safe_yaml (~> 1.0.0) 75 | database_cleaner (1.0.1) 76 | debug_inspector (0.0.2) 77 | diff-lcs (1.2.5) 78 | dotenv (0.10.0) 79 | dotenv-rails (0.10.0) 80 | dotenv (= 0.10.0) 81 | email_spec (1.5.0) 82 | launchy (~> 2.1) 83 | mail (~> 2.2) 84 | ember-data-source (1.0.0.beta.7) 85 | ember-source 86 | ember-rails (0.14.1) 87 | active_model_serializers 88 | barber (>= 0.4.1) 89 | ember-data-source 90 | ember-source 91 | execjs (>= 1.2) 92 | handlebars-source 93 | jquery-rails (>= 1.0.17) 94 | railties (>= 3.1) 95 | ember-source (1.5.0) 96 | handlebars-source (~> 1.0) 97 | ember_script (0.0.5) 98 | ember_script-source (>= 0.0.2) 99 | execjs 100 | tilt 101 | ember_script-rails (0.0.4) 102 | ember_script (>= 0.0.4) 103 | rails 104 | ember_script-source (0.0.14) 105 | erubis (2.7.0) 106 | execjs (2.0.2) 107 | factory_girl (4.1.0) 108 | activesupport (>= 3.0.0) 109 | factory_girl_rails (4.1.0) 110 | factory_girl (~> 4.1.0) 111 | railties (>= 3.0.0) 112 | faraday (0.9.0) 113 | multipart-post (>= 1.2, < 3) 114 | font-awesome-rails (4.0.3.1) 115 | railties (>= 3.2, < 5.0) 116 | foreman (0.63.0) 117 | dotenv (>= 0.7) 118 | thor (>= 0.13.6) 119 | fssm (0.2.10) 120 | haml (4.1.0.beta.1) 121 | tilt 122 | haml-rails (0.5.3) 123 | actionpack (>= 4.0.1) 124 | activesupport (>= 4.0.1) 125 | haml (>= 3.1, < 5.0) 126 | railties (>= 4.0.1) 127 | hamlbars (2.1.1) 128 | execjs (>= 1.2) 129 | haml 130 | sprockets (>= 2.0) 131 | tilt 132 | handlebars-source (1.3.0) 133 | hashie (2.0.5) 134 | hike (1.2.3) 135 | hpricot (0.8.6) 136 | html2haml (1.0.1) 137 | erubis (~> 2.7.0) 138 | haml (>= 4.0.0.rc.1) 139 | hpricot (~> 0.8.6) 140 | ruby_parser (~> 3.1.1) 141 | i18n (0.6.9) 142 | jbuilder (1.5.3) 143 | activesupport (>= 3.0.0) 144 | multi_json (>= 1.2.0) 145 | jquery-rails (3.0.3) 146 | railties (>= 3.0, < 5.0) 147 | thor (>= 0.14, < 2.0) 148 | jquery-rails-cdn (1.0.1) 149 | jquery-rails 150 | jquery-ui-rails (4.2.0) 151 | railties (>= 3.2.16) 152 | jquery-ui-rails-cdn (0.1.2) 153 | jquery-ui-rails (>= 4.1.0) 154 | json (1.8.1) 155 | jwt (0.1.11) 156 | multi_json (>= 1.5) 157 | kgio (2.9.2) 158 | launchy (2.4.2) 159 | addressable (~> 2.3) 160 | letter_opener (1.0.0) 161 | launchy (>= 2.0.4) 162 | mail (2.5.4) 163 | mime-types (~> 1.16) 164 | treetop (~> 1.4.8) 165 | mime-types (1.25.1) 166 | mini_portile (0.5.3) 167 | minitest (4.7.5) 168 | multi_json (1.9.2) 169 | multi_xml (0.5.5) 170 | multipart-post (2.0.0) 171 | nokogiri (1.6.1) 172 | mini_portile (~> 0.5.0) 173 | oauth (0.4.7) 174 | oauth2 (0.9.3) 175 | faraday (>= 0.8, < 0.10) 176 | jwt (~> 0.1.8) 177 | multi_json (~> 1.3) 178 | multi_xml (~> 0.5) 179 | rack (~> 1.2) 180 | oily_png (1.0.3) 181 | chunky_png (~> 1.2.1) 182 | omniauth (1.2.1) 183 | hashie (>= 1.2, < 3) 184 | rack (~> 1.0) 185 | omniauth-facebook (1.6.0) 186 | omniauth-oauth2 (~> 1.1) 187 | omniauth-google-oauth2 (0.2.2) 188 | omniauth (~> 1.0) 189 | omniauth-oauth2 190 | omniauth-identity (1.1.1) 191 | bcrypt-ruby (~> 3.0) 192 | omniauth (~> 1.0) 193 | omniauth-oauth (1.0.1) 194 | oauth 195 | omniauth (~> 1.0) 196 | omniauth-oauth2 (1.1.2) 197 | faraday (>= 0.8, < 0.10) 198 | multi_json (~> 1.3) 199 | oauth2 (~> 0.9.3) 200 | omniauth (~> 1.2) 201 | omniauth-twitter (1.0.1) 202 | multi_json (~> 1.3) 203 | omniauth-oauth (~> 1.0) 204 | polyglot (0.3.4) 205 | quiet_assets (1.0.2) 206 | railties (>= 3.1, < 5.0) 207 | rack (1.5.2) 208 | rack-test (0.6.2) 209 | rack (>= 1.0) 210 | rails (4.0.3) 211 | actionmailer (= 4.0.3) 212 | actionpack (= 4.0.3) 213 | activerecord (= 4.0.3) 214 | activesupport (= 4.0.3) 215 | bundler (>= 1.3.0, < 2.0) 216 | railties (= 4.0.3) 217 | sprockets-rails (~> 2.0.0) 218 | rails_layout (1.0.13) 219 | railties (4.0.3) 220 | actionpack (= 4.0.3) 221 | activesupport (= 4.0.3) 222 | rake (>= 0.8.7) 223 | thor (>= 0.18.1, < 2.0) 224 | raindrops (0.13.0) 225 | rake (10.2.2) 226 | rspec-core (2.14.8) 227 | rspec-expectations (2.14.5) 228 | diff-lcs (>= 1.1.3, < 2.0) 229 | rspec-mocks (2.14.6) 230 | rspec-rails (2.14.2) 231 | actionpack (>= 3.0) 232 | activemodel (>= 3.0) 233 | activesupport (>= 3.0) 234 | railties (>= 3.0) 235 | rspec-core (~> 2.14.0) 236 | rspec-expectations (~> 2.14.0) 237 | rspec-mocks (~> 2.14.0) 238 | ruby_parser (3.1.3) 239 | sexp_processor (~> 4.1) 240 | safe_yaml (1.0.1) 241 | sass (3.2.18) 242 | sass-rails (4.0.2) 243 | railties (>= 4.0.0, < 5.0) 244 | sass (~> 3.2.0) 245 | sprockets (~> 2.8, <= 2.11.0) 246 | sprockets-rails (~> 2.0.0) 247 | settingslogic (2.0.9) 248 | sexp_processor (4.4.3) 249 | sprockets (2.11.0) 250 | hike (~> 1.2) 251 | multi_json (~> 1.0) 252 | rack (~> 1.0) 253 | tilt (~> 1.1, != 1.3.0) 254 | sprockets-rails (2.0.1) 255 | actionpack (>= 3.0) 256 | activesupport (>= 3.0) 257 | sprockets (~> 2.8) 258 | sqlite3 (1.3.9) 259 | thor (0.19.1) 260 | thread_safe (0.3.1) 261 | atomic (>= 1.1.7, < 2) 262 | tilt (1.4.1) 263 | timecop (0.5.9.2) 264 | treetop (1.4.15) 265 | polyglot 266 | polyglot (>= 0.3.1) 267 | turbolinks (2.2.1) 268 | coffee-rails 269 | tzinfo (0.3.39) 270 | uglifier (2.5.0) 271 | execjs (>= 0.3.0) 272 | json (>= 1.8.0) 273 | unicorn (4.7.0) 274 | kgio (~> 2.6) 275 | rack 276 | raindrops (~> 0.7) 277 | webmock (1.13.0) 278 | addressable (>= 2.2.7) 279 | crack (>= 0.3.2) 280 | xpath (2.0.0) 281 | nokogiri (~> 1.3) 282 | 283 | PLATFORMS 284 | ruby 285 | 286 | DEPENDENCIES 287 | awesome_print (~> 1.1.0) 288 | bcrypt-ruby (~> 3.1.2) 289 | better_errors 290 | binding_of_caller 291 | bootstrap-generators (~> 3.1.1) 292 | bootstrap-sass (>= 3.0.0.0) 293 | cancan 294 | capybara 295 | coffee-rails (~> 4.0.0) 296 | compass-rails (~> 1.0.3) 297 | database_cleaner (= 1.0.1) 298 | dotenv-rails 299 | email_spec 300 | ember-data-source (= 1.0.0.beta.7) 301 | ember-rails 302 | ember-source (~> 1.5.0) 303 | ember_script-rails 304 | factory_girl_rails (~> 4.1.0) 305 | font-awesome-rails (~> 4.0.3.1) 306 | foreman (~> 0.63.0) 307 | haml-rails 308 | hamlbars 309 | html2haml 310 | jbuilder (~> 1.2) 311 | jquery-rails (= 3.0.3) 312 | jquery-rails-cdn (~> 1.0.1) 313 | jquery-ui-rails-cdn (~> 0.1.2) 314 | letter_opener (~> 1.0.0) 315 | oily_png (~> 1.0.2) 316 | omniauth 317 | omniauth-facebook 318 | omniauth-google-oauth2 319 | omniauth-identity 320 | omniauth-twitter 321 | quiet_assets 322 | rails (= 4.0.3) 323 | rails_layout 324 | rspec-rails 325 | sass-rails (~> 4.0.0) 326 | settingslogic (~> 2.0.9) 327 | sqlite3 328 | timecop (~> 0.5.9.1) 329 | turbolinks 330 | uglifier (>= 1.3.0) 331 | unicorn (~> 4.7.0) 332 | webmock (~> 1.13.0) 333 | -------------------------------------------------------------------------------- /app/assets/stylesheets/bootstrap-variables.scss: -------------------------------------------------------------------------------- 1 | // a flag to toggle asset pipeline / compass integration 2 | // defaults to true if twbs-font-path function is present (no function => twbs-font-path('') parsed as string == right side) 3 | // in Sass 3.3 this can be improved with: function-exists(twbs-font-path) 4 | $bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default; 5 | // 6 | // Variables 7 | // -------------------------------------------------- 8 | 9 | 10 | //== Colors 11 | // 12 | //## Gray and brand colors for use across Bootstrap. 13 | 14 | $gray-darker: lighten(#000, 13.5%) !default; // #222 15 | $gray-dark: lighten(#000, 20%) !default; // #333 16 | $gray: lighten(#000, 33.5%) !default; // #555 17 | $gray-light: lighten(#000, 60%) !default; // #999 18 | $gray-lighter: lighten(#000, 93.5%) !default; // #eee 19 | 20 | $brand-primary: #428bca !default; 21 | $brand-success: #5cb85c !default; 22 | $brand-info: #5bc0de !default; 23 | $brand-warning: #f0ad4e !default; 24 | $brand-danger: #d9534f !default; 25 | 26 | 27 | //== Scaffolding 28 | // 29 | // ## Settings for some of the most global styles. 30 | 31 | //** Background color for ``. 32 | $body-bg: #fff !default; 33 | //** Global text color on ``. 34 | $text-color: $gray-dark !default; 35 | 36 | //** Global textual link color. 37 | $link-color: $brand-primary !default; 38 | //** Link hover color set via `darken()` function. 39 | $link-hover-color: darken($link-color, 15%) !default; 40 | 41 | 42 | //== Typography 43 | // 44 | //## Font, line-height, and color for body text, headings, and more. 45 | 46 | $font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default; 47 | $font-family-serif: Georgia, "Times New Roman", Times, serif !default; 48 | //** Default monospace fonts for ``, ``, and `
`.
 49 | $font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace !default;
 50 | $font-family-base:        $font-family-sans-serif !default;
 51 | 
 52 | $font-size-base:          14px !default;
 53 | $font-size-large:         ceil(($font-size-base * 1.25)) !default; // ~18px
 54 | $font-size-small:         ceil(($font-size-base * 0.85)) !default; // ~12px
 55 | 
 56 | $font-size-h1:            floor(($font-size-base * 2.6)) !default; // ~36px
 57 | $font-size-h2:            floor(($font-size-base * 2.15)) !default; // ~30px
 58 | $font-size-h3:            ceil(($font-size-base * 1.7)) !default; // ~24px
 59 | $font-size-h4:            ceil(($font-size-base * 1.25)) !default; // ~18px
 60 | $font-size-h5:            $font-size-base !default;
 61 | $font-size-h6:            ceil(($font-size-base * 0.85)) !default; // ~12px
 62 | 
 63 | //** Unit-less `line-height` for use in components like buttons.
 64 | $line-height-base:        1.428571429 !default; // 20/14
 65 | //** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
 66 | $line-height-computed:    floor(($font-size-base * $line-height-base)) !default; // ~20px
 67 | 
 68 | //** By default, this inherits from the ``.
 69 | $headings-font-family:    inherit !default;
 70 | $headings-font-weight:    500 !default;
 71 | $headings-line-height:    1.1 !default;
 72 | $headings-color:          inherit !default;
 73 | 
 74 | 
 75 | //-- Iconography
 76 | //
 77 | //## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower.
 78 | 
 79 | // $icon-font-path: "bootstrap/" !default;
 80 | // $icon-font-name:          "glyphicons-halflings-regular" !default;
 81 | // $icon-font-svg-id:        "glyphicons_halflingsregular" !default;
 82 | 
 83 | //== Components
 84 | //
 85 | //## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
 86 | 
 87 | $padding-base-vertical:     6px !default;
 88 | $padding-base-horizontal:   12px !default;
 89 | 
 90 | $padding-large-vertical:    10px !default;
 91 | $padding-large-horizontal:  16px !default;
 92 | 
 93 | $padding-small-vertical:    5px !default;
 94 | $padding-small-horizontal:  10px !default;
 95 | 
 96 | $padding-xs-vertical:       1px !default;
 97 | $padding-xs-horizontal:     5px !default;
 98 | 
 99 | $line-height-large:         1.33 !default;
100 | $line-height-small:         1.5 !default;
101 | 
102 | $border-radius-base:        4px !default;
103 | $border-radius-large:       6px !default;
104 | $border-radius-small:       3px !default;
105 | 
106 | //** Global color for active items (e.g., navs or dropdowns).
107 | $component-active-color:    #fff !default;
108 | //** Global background color for active items (e.g., navs or dropdowns).
109 | $component-active-bg:       $brand-primary !default;
110 | 
111 | //** Width of the `border` for generating carets that indicator dropdowns.
112 | $caret-width-base:          4px !default;
113 | //** Carets increase slightly in size for larger components.
114 | $caret-width-large:         5px !default;
115 | 
116 | 
117 | //== Tables
118 | //
119 | //## Customizes the `.table` component with basic values, each used across all table variations.
120 | 
121 | //** Padding for ``s and ``s.
122 | $table-cell-padding:            8px !default;
123 | //** Padding for cells in `.table-condensed`.
124 | $table-condensed-cell-padding:  5px !default;
125 | 
126 | //** Default background color used for all tables.
127 | $table-bg:                      transparent !default;
128 | //** Background color used for `.table-striped`.
129 | $table-bg-accent:               #f9f9f9 !default;
130 | //** Background color used for `.table-hover`.
131 | $table-bg-hover:                #f5f5f5 !default;
132 | $table-bg-active:               $table-bg-hover !default;
133 | 
134 | //** Border color for table and cell borders.
135 | $table-border-color:            #ddd !default;
136 | 
137 | 
138 | //== Buttons
139 | //
140 | //## For each of Bootstrap's buttons, define text, background and border color.
141 | 
142 | $btn-font-weight:                normal !default;
143 | 
144 | $btn-default-color:              #333 !default;
145 | $btn-default-bg:                 #fff !default;
146 | $btn-default-border:             #ccc !default;
147 | 
148 | $btn-primary-color:              #fff !default;
149 | $btn-primary-bg:                 $brand-primary !default;
150 | $btn-primary-border:             darken($btn-primary-bg, 5%) !default;
151 | 
152 | $btn-success-color:              #fff !default;
153 | $btn-success-bg:                 $brand-success !default;
154 | $btn-success-border:             darken($btn-success-bg, 5%) !default;
155 | 
156 | $btn-info-color:                 #fff !default;
157 | $btn-info-bg:                    $brand-info !default;
158 | $btn-info-border:                darken($btn-info-bg, 5%) !default;
159 | 
160 | $btn-warning-color:              #fff !default;
161 | $btn-warning-bg:                 $brand-warning !default;
162 | $btn-warning-border:             darken($btn-warning-bg, 5%) !default;
163 | 
164 | $btn-danger-color:               #fff !default;
165 | $btn-danger-bg:                  $brand-danger !default;
166 | $btn-danger-border:              darken($btn-danger-bg, 5%) !default;
167 | 
168 | $btn-link-disabled-color:        $gray-light !default;
169 | 
170 | 
171 | //== Forms
172 | //
173 | //##
174 | 
175 | //** `` background color
176 | $input-bg:                       #fff !default;
177 | //** `` background color
178 | $input-bg-disabled:              $gray-lighter !default;
179 | 
180 | //** Text color for ``s
181 | $input-color:                    $gray !default;
182 | //** `` border color
183 | $input-border:                   #ccc !default;
184 | //** `` border radius
185 | $input-border-radius:            $border-radius-base !default;
186 | //** Border color for inputs on focus
187 | $input-border-focus:             #66afe9 !default;
188 | 
189 | //** Placeholder text color
190 | $input-color-placeholder:        $gray-light !default;
191 | 
192 | //** Default `.form-control` height
193 | $input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
194 | //** Large `.form-control` height
195 | $input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
196 | //** Small `.form-control` height
197 | $input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
198 | 
199 | $legend-color:                   $gray-dark !default;
200 | $legend-border-color:            #e5e5e5 !default;
201 | 
202 | //** Background color for textual input addons
203 | $input-group-addon-bg:           $gray-lighter !default;
204 | //** Border color for textual input addons
205 | $input-group-addon-border-color: $input-border !default;
206 | 
207 | 
208 | //== Dropdowns
209 | //
210 | //## Dropdown menu container and contents.
211 | 
212 | //** Background for the dropdown menu.
213 | $dropdown-bg:                    #fff !default;
214 | //** Dropdown menu `border-color`.
215 | $dropdown-border:                rgba(0,0,0,.15) !default;
216 | //** Dropdown menu `border-color` **for IE8**.
217 | $dropdown-fallback-border:       #ccc !default;
218 | //** Divider color for between dropdown items.
219 | $dropdown-divider-bg:            #e5e5e5 !default;
220 | 
221 | //** Dropdown link text color.
222 | $dropdown-link-color:            $gray-dark !default;
223 | //** Hover color for dropdown links.
224 | $dropdown-link-hover-color:      darken($gray-dark, 5%) !default;
225 | //** Hover background for dropdown links.
226 | $dropdown-link-hover-bg:         #f5f5f5 !default;
227 | 
228 | //** Active dropdown menu item text color.
229 | $dropdown-link-active-color:     $component-active-color !default;
230 | //** Active dropdown menu item background color.
231 | $dropdown-link-active-bg:        $component-active-bg !default;
232 | 
233 | //** Disabled dropdown menu item background color.
234 | $dropdown-link-disabled-color:   $gray-light !default;
235 | 
236 | //** Text color for headers within dropdown menus.
237 | $dropdown-header-color:          $gray-light !default;
238 | 
239 | // Note: Deprecated $dropdown-caret-color as of v3.1.0
240 | $dropdown-caret-color:           #000 !default;
241 | 
242 | 
243 | //-- Z-index master list
244 | //
245 | // Warning: Avoid customizing these values. They're used for a bird's eye view
246 | // of components dependent on the z-axis and are designed to all work together.
247 | //
248 | // Note: These variables are not generated into the Customizer.
249 | 
250 | $zindex-navbar:            1000 !default;
251 | $zindex-dropdown:          1000 !default;
252 | $zindex-popover:           1010 !default;
253 | $zindex-tooltip:           1030 !default;
254 | $zindex-navbar-fixed:      1030 !default;
255 | $zindex-modal-background:  1040 !default;
256 | $zindex-modal:             1050 !default;
257 | 
258 | 
259 | //== Media queries breakpoints
260 | //
261 | //## Define the breakpoints at which your layout will change, adapting to different screen sizes.
262 | 
263 | // Extra small screen / phone
264 | // Note: Deprecated $screen-xs and $screen-phone as of v3.0.1
265 | $screen-xs:                  480px !default;
266 | $screen-xs-min:              $screen-xs !default;
267 | $screen-phone:               $screen-xs-min !default;
268 | 
269 | // Small screen / tablet
270 | // Note: Deprecated $screen-sm and $screen-tablet as of v3.0.1
271 | $screen-sm:                  768px !default;
272 | $screen-sm-min:              $screen-sm !default;
273 | $screen-tablet:              $screen-sm-min !default;
274 | 
275 | // Medium screen / desktop
276 | // Note: Deprecated $screen-md and $screen-desktop as of v3.0.1
277 | $screen-md:                  992px !default;
278 | $screen-md-min:              $screen-md !default;
279 | $screen-desktop:             $screen-md-min !default;
280 | 
281 | // Large screen / wide desktop
282 | // Note: Deprecated $screen-lg and $screen-lg-desktop as of v3.0.1
283 | $screen-lg:                  1200px !default;
284 | $screen-lg-min:              $screen-lg !default;
285 | $screen-lg-desktop:          $screen-lg-min !default;
286 | 
287 | // So media queries don't overlap when required, provide a maximum
288 | $screen-xs-max:              ($screen-sm-min - 1) !default;
289 | $screen-sm-max:              ($screen-md-min - 1) !default;
290 | $screen-md-max:              ($screen-lg-min - 1) !default;
291 | 
292 | 
293 | //== Grid system
294 | //
295 | //## Define your custom responsive grid.
296 | 
297 | //** Number of columns in the grid.
298 | $grid-columns:              12 !default;
299 | //** Padding between columns. Gets divided in half for the left and right.
300 | $grid-gutter-width:         30px !default;
301 | // Navbar collapse
302 | //** Point at which the navbar becomes uncollapsed.
303 | $grid-float-breakpoint:     $screen-sm-min !default;
304 | //** Point at which the navbar begins collapsing.
305 | $grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
306 | 
307 | 
308 | //== Container sizes
309 | //
310 | //## Define the maximum width of `.container` for different screen sizes.
311 | 
312 | // Small screen / tablet
313 | $container-tablet:             ((720px + $grid-gutter-width)) !default;
314 | //** For `$screen-sm-min` and up.
315 | $container-sm:                 $container-tablet !default;
316 | 
317 | // Medium screen / desktop
318 | $container-desktop:            ((940px + $grid-gutter-width)) !default;
319 | //** For `$screen-md-min` and up.
320 | $container-md:                 $container-desktop !default;
321 | 
322 | // Large screen / wide desktop
323 | $container-large-desktop:      ((1140px + $grid-gutter-width)) !default;
324 | //** For `$screen-lg-min` and up.
325 | $container-lg:                 $container-large-desktop !default;
326 | 
327 | 
328 | //== Navbar
329 | //
330 | //##
331 | 
332 | // Basics of a navbar
333 | $navbar-height:                    50px !default;
334 | $navbar-margin-bottom:             $line-height-computed !default;
335 | $navbar-border-radius:             $border-radius-base !default;
336 | $navbar-padding-horizontal:        floor(($grid-gutter-width / 2)) !default;
337 | $navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2) !default;
338 | $navbar-collapse-max-height:       340px !default;
339 | 
340 | $navbar-default-color:             #777 !default;
341 | $navbar-default-bg:                #f8f8f8 !default;
342 | $navbar-default-border:            darken($navbar-default-bg, 6.5%) !default;
343 | 
344 | // Navbar links
345 | $navbar-default-link-color:                #777 !default;
346 | $navbar-default-link-hover-color:          #333 !default;
347 | $navbar-default-link-hover-bg:             transparent !default;
348 | $navbar-default-link-active-color:         #555 !default;
349 | $navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%) !default;
350 | $navbar-default-link-disabled-color:       #ccc !default;
351 | $navbar-default-link-disabled-bg:          transparent !default;
352 | 
353 | // Navbar brand label
354 | $navbar-default-brand-color:               $navbar-default-link-color !default;
355 | $navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%) !default;
356 | $navbar-default-brand-hover-bg:            transparent !default;
357 | 
358 | // Navbar toggle
359 | $navbar-default-toggle-hover-bg:           #ddd !default;
360 | $navbar-default-toggle-icon-bar-bg:        #888 !default;
361 | $navbar-default-toggle-border-color:       #ddd !default;
362 | 
363 | 
364 | // Inverted navbar
365 | // Reset inverted navbar basics
366 | $navbar-inverse-color:                      $gray-light !default;
367 | $navbar-inverse-bg:                         #222 !default;
368 | $navbar-inverse-border:                     darken($navbar-inverse-bg, 10%) !default;
369 | 
370 | // Inverted navbar links
371 | $navbar-inverse-link-color:                 $gray-light !default;
372 | $navbar-inverse-link-hover-color:           #fff !default;
373 | $navbar-inverse-link-hover-bg:              transparent !default;
374 | $navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color !default;
375 | $navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%) !default;
376 | $navbar-inverse-link-disabled-color:        #444 !default;
377 | $navbar-inverse-link-disabled-bg:           transparent !default;
378 | 
379 | // Inverted navbar brand label
380 | $navbar-inverse-brand-color:                $navbar-inverse-link-color !default;
381 | $navbar-inverse-brand-hover-color:          #fff !default;
382 | $navbar-inverse-brand-hover-bg:             transparent !default;
383 | 
384 | // Inverted navbar toggle
385 | $navbar-inverse-toggle-hover-bg:            #333 !default;
386 | $navbar-inverse-toggle-icon-bar-bg:         #fff !default;
387 | $navbar-inverse-toggle-border-color:        #333 !default;
388 | 
389 | 
390 | //== Navs
391 | //
392 | //##
393 | 
394 | //=== Shared nav styles
395 | $nav-link-padding:                          10px 15px !default;
396 | $nav-link-hover-bg:                         $gray-lighter !default;
397 | 
398 | $nav-disabled-link-color:                   $gray-light !default;
399 | $nav-disabled-link-hover-color:             $gray-light !default;
400 | 
401 | $nav-open-link-hover-color:                 #fff !default;
402 | 
403 | //== Tabs
404 | $nav-tabs-border-color:                     #ddd !default;
405 | 
406 | $nav-tabs-link-hover-border-color:          $gray-lighter !default;
407 | 
408 | $nav-tabs-active-link-hover-bg:             $body-bg !default;
409 | $nav-tabs-active-link-hover-color:          $gray !default;
410 | $nav-tabs-active-link-hover-border-color:   #ddd !default;
411 | 
412 | $nav-tabs-justified-link-border-color:            #ddd !default;
413 | $nav-tabs-justified-active-link-border-color:     $body-bg !default;
414 | 
415 | //== Pills
416 | $nav-pills-border-radius:                   $border-radius-base !default;
417 | $nav-pills-active-link-hover-bg:            $component-active-bg !default;
418 | $nav-pills-active-link-hover-color:         $component-active-color !default;
419 | 
420 | 
421 | //== Pagination
422 | //
423 | //##
424 | 
425 | $pagination-color:                     $link-color !default;
426 | $pagination-bg:                        #fff !default;
427 | $pagination-border:                    #ddd !default;
428 | 
429 | $pagination-hover-color:               $link-hover-color !default;
430 | $pagination-hover-bg:                  $gray-lighter !default;
431 | $pagination-hover-border:              #ddd !default;
432 | 
433 | $pagination-active-color:              #fff !default;
434 | $pagination-active-bg:                 $brand-primary !default;
435 | $pagination-active-border:             $brand-primary !default;
436 | 
437 | $pagination-disabled-color:            $gray-light !default;
438 | $pagination-disabled-bg:               #fff !default;
439 | $pagination-disabled-border:           #ddd !default;
440 | 
441 | 
442 | //== Pager
443 | //
444 | //##
445 | 
446 | $pager-bg:                             $pagination-bg !default;
447 | $pager-border:                         $pagination-border !default;
448 | $pager-border-radius:                  15px !default;
449 | 
450 | $pager-hover-bg:                       $pagination-hover-bg !default;
451 | 
452 | $pager-active-bg:                      $pagination-active-bg !default;
453 | $pager-active-color:                   $pagination-active-color !default;
454 | 
455 | $pager-disabled-color:                 $pagination-disabled-color !default;
456 | 
457 | 
458 | //== Jumbotron
459 | //
460 | //##
461 | 
462 | $jumbotron-padding:              30px !default;
463 | $jumbotron-color:                inherit !default;
464 | $jumbotron-bg:                   $gray-lighter !default;
465 | $jumbotron-heading-color:        inherit !default;
466 | $jumbotron-font-size:            ceil(($font-size-base * 1.5)) !default;
467 | 
468 | 
469 | //== Form states and alerts
470 | //
471 | //## Define colors for form feedback states and, by default, alerts.
472 | 
473 | $state-success-text:             #3c763d !default;
474 | $state-success-bg:               #dff0d8 !default;
475 | $state-success-border:           darken(adjust-hue($state-success-bg, -10), 5%) !default;
476 | 
477 | $state-info-text:                #31708f !default;
478 | $state-info-bg:                  #d9edf7 !default;
479 | $state-info-border:              darken(adjust-hue($state-info-bg, -10), 7%) !default;
480 | 
481 | $state-warning-text:             #8a6d3b !default;
482 | $state-warning-bg:               #fcf8e3 !default;
483 | $state-warning-border:           darken(adjust-hue($state-warning-bg, -10), 5%) !default;
484 | 
485 | $state-danger-text:              #a94442 !default;
486 | $state-danger-bg:                #f2dede !default;
487 | $state-danger-border:            darken(adjust-hue($state-danger-bg, -10), 5%) !default;
488 | 
489 | 
490 | //== Tooltips
491 | //
492 | //##
493 | 
494 | //** Tooltip max width
495 | $tooltip-max-width:           200px !default;
496 | //** Tooltip text color
497 | $tooltip-color:               #fff !default;
498 | //** Tooltip background color
499 | $tooltip-bg:                  #000 !default;
500 | $tooltip-opacity:             .9 !default;
501 | 
502 | //** Tooltip arrow width
503 | $tooltip-arrow-width:         5px !default;
504 | //** Tooltip arrow color
505 | $tooltip-arrow-color:         $tooltip-bg !default;
506 | 
507 | 
508 | //== Popovers
509 | //
510 | //##
511 | 
512 | //** Popover body background color
513 | $popover-bg:                          #fff !default;
514 | //** Popover maximum width
515 | $popover-max-width:                   276px !default;
516 | //** Popover border color
517 | $popover-border-color:                rgba(0,0,0,.2) !default;
518 | //** Popover fallback border color
519 | $popover-fallback-border-color:       #ccc !default;
520 | 
521 | //** Popover title background color
522 | $popover-title-bg:                    darken($popover-bg, 3%) !default;
523 | 
524 | //** Popover arrow width
525 | $popover-arrow-width:                 10px !default;
526 | //** Popover arrow color
527 | $popover-arrow-color:                 #fff !default;
528 | 
529 | //** Popover outer arrow width
530 | $popover-arrow-outer-width:           ($popover-arrow-width + 1) !default;
531 | //** Popover outer arrow color
532 | $popover-arrow-outer-color:           fadein($popover-border-color, 5%) !default;
533 | //** Popover outer arrow fallback color
534 | $popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%) !default;
535 | 
536 | 
537 | //== Labels
538 | //
539 | //##
540 | 
541 | //** Default label background color
542 | $label-default-bg:            $gray-light !default;
543 | //** Primary label background color
544 | $label-primary-bg:            $brand-primary !default;
545 | //** Success label background color
546 | $label-success-bg:            $brand-success !default;
547 | //** Info label background color
548 | $label-info-bg:               $brand-info !default;
549 | //** Warning label background color
550 | $label-warning-bg:            $brand-warning !default;
551 | //** Danger label background color
552 | $label-danger-bg:             $brand-danger !default;
553 | 
554 | //** Default label text color
555 | $label-color:                 #fff !default;
556 | //** Default text color of a linked label
557 | $label-link-hover-color:      #fff !default;
558 | 
559 | 
560 | //== Modals
561 | //
562 | //##
563 | 
564 | //** Padding applied to the modal body
565 | $modal-inner-padding:         20px !default;
566 | 
567 | //** Padding applied to the modal title
568 | $modal-title-padding:         15px !default;
569 | //** Modal title line-height
570 | $modal-title-line-height:     $line-height-base !default;
571 | 
572 | //** Background color of modal content area
573 | $modal-content-bg:                             #fff !default;
574 | //** Modal content border color
575 | $modal-content-border-color:                   rgba(0,0,0,.2) !default;
576 | //** Modal content border color **for IE8**
577 | $modal-content-fallback-border-color:          #999 !default;
578 | 
579 | //** Modal backdrop background color
580 | $modal-backdrop-bg:           #000 !default;
581 | //** Modal backdrop opacity
582 | $modal-backdrop-opacity:      .5 !default;
583 | //** Modal header border color
584 | $modal-header-border-color:   #e5e5e5 !default;
585 | //** Modal footer border color
586 | $modal-footer-border-color:   $modal-header-border-color !default;
587 | 
588 | $modal-lg:                    900px !default;
589 | $modal-md:                    600px !default;
590 | $modal-sm:                    300px !default;
591 | 
592 | 
593 | //== Alerts
594 | //
595 | //## Define alert colors, border radius, and padding.
596 | 
597 | $alert-padding:               15px !default;
598 | $alert-border-radius:         $border-radius-base !default;
599 | $alert-link-font-weight:      bold !default;
600 | 
601 | $alert-success-bg:            $state-success-bg !default;
602 | $alert-success-text:          $state-success-text !default;
603 | $alert-success-border:        $state-success-border !default;
604 | 
605 | $alert-info-bg:               $state-info-bg !default;
606 | $alert-info-text:             $state-info-text !default;
607 | $alert-info-border:           $state-info-border !default;
608 | 
609 | $alert-warning-bg:            $state-warning-bg !default;
610 | $alert-warning-text:          $state-warning-text !default;
611 | $alert-warning-border:        $state-warning-border !default;
612 | 
613 | $alert-danger-bg:             $state-danger-bg !default;
614 | $alert-danger-text:           $state-danger-text !default;
615 | $alert-danger-border:         $state-danger-border !default;
616 | 
617 | 
618 | //== Progress bars
619 | //
620 | //##
621 | 
622 | //** Background color of the whole progress component
623 | $progress-bg:                 #f5f5f5 !default;
624 | //** Progress bar text color
625 | $progress-bar-color:          #fff !default;
626 | 
627 | //** Default progress bar color
628 | $progress-bar-bg:             $brand-primary !default;
629 | //** Success progress bar color
630 | $progress-bar-success-bg:     $brand-success !default;
631 | //** Warning progress bar color
632 | $progress-bar-warning-bg:     $brand-warning !default;
633 | //** Danger progress bar color
634 | $progress-bar-danger-bg:      $brand-danger !default;
635 | //** Info progress bar color
636 | $progress-bar-info-bg:        $brand-info !default;
637 | 
638 | 
639 | //== List group
640 | //
641 | //##
642 | 
643 | //** Background color on `.list-group-item`
644 | $list-group-bg:                 #fff !default;
645 | //** `.list-group-item` border color
646 | $list-group-border:             #ddd !default;
647 | //** List group border radius
648 | $list-group-border-radius:      $border-radius-base !default;
649 | 
650 | //** Background color of single list elements on hover
651 | $list-group-hover-bg:           #f5f5f5 !default;
652 | //** Text color of active list elements
653 | $list-group-active-color:       $component-active-color !default;
654 | //** Background color of active list elements
655 | $list-group-active-bg:          $component-active-bg !default;
656 | //** Border color of active list elements
657 | $list-group-active-border:      $list-group-active-bg !default;
658 | $list-group-active-text-color:  lighten($list-group-active-bg, 40%) !default;
659 | 
660 | $list-group-link-color:         #555 !default;
661 | $list-group-link-heading-color: #333 !default;
662 | 
663 | 
664 | //== Panels
665 | //
666 | //##
667 | 
668 | $panel-bg:                    #fff !default;
669 | $panel-body-padding:          15px !default;
670 | $panel-border-radius:         $border-radius-base !default;
671 | 
672 | //** Border color for elements within panels
673 | $panel-inner-border:          #ddd !default;
674 | $panel-footer-bg:             #f5f5f5 !default;
675 | 
676 | $panel-default-text:          $gray-dark !default;
677 | $panel-default-border:        #ddd !default;
678 | $panel-default-heading-bg:    #f5f5f5 !default;
679 | 
680 | $panel-primary-text:          #fff !default;
681 | $panel-primary-border:        $brand-primary !default;
682 | $panel-primary-heading-bg:    $brand-primary !default;
683 | 
684 | $panel-success-text:          $state-success-text !default;
685 | $panel-success-border:        $state-success-border !default;
686 | $panel-success-heading-bg:    $state-success-bg !default;
687 | 
688 | $panel-info-text:             $state-info-text !default;
689 | $panel-info-border:           $state-info-border !default;
690 | $panel-info-heading-bg:       $state-info-bg !default;
691 | 
692 | $panel-warning-text:          $state-warning-text !default;
693 | $panel-warning-border:        $state-warning-border !default;
694 | $panel-warning-heading-bg:    $state-warning-bg !default;
695 | 
696 | $panel-danger-text:           $state-danger-text !default;
697 | $panel-danger-border:         $state-danger-border !default;
698 | $panel-danger-heading-bg:     $state-danger-bg !default;
699 | 
700 | 
701 | //== Thumbnails
702 | //
703 | //##
704 | 
705 | //** Padding around the thumbnail image
706 | $thumbnail-padding:           4px !default;
707 | //** Thumbnail background color
708 | $thumbnail-bg:                $body-bg !default;
709 | //** Thumbnail border color
710 | $thumbnail-border:            #ddd !default;
711 | //** Thumbnail border radius
712 | $thumbnail-border-radius:     $border-radius-base !default;
713 | 
714 | //** Custom text color for thumbnail captions
715 | $thumbnail-caption-color:     $text-color !default;
716 | //** Padding around the thumbnail caption
717 | $thumbnail-caption-padding:   9px !default;
718 | 
719 | 
720 | //== Wells
721 | //
722 | //##
723 | 
724 | $well-bg:                     #f5f5f5 !default;
725 | $well-border:                 darken($well-bg, 7%) !default;
726 | 
727 | 
728 | //== Badges
729 | //
730 | //##
731 | 
732 | $badge-color:                 #fff !default;
733 | //** Linked badge text color on hover
734 | $badge-link-hover-color:      #fff !default;
735 | $badge-bg:                    $gray-light !default;
736 | 
737 | //** Badge text color in active nav link
738 | $badge-active-color:          $link-color !default;
739 | //** Badge background color in active nav link
740 | $badge-active-bg:             #fff !default;
741 | 
742 | $badge-font-weight:           bold !default;
743 | $badge-line-height:           1 !default;
744 | $badge-border-radius:         10px !default;
745 | 
746 | 
747 | //== Breadcrumbs
748 | //
749 | //##
750 | 
751 | $breadcrumb-padding-vertical:   8px !default;
752 | $breadcrumb-padding-horizontal: 15px !default;
753 | //** Breadcrumb background color
754 | $breadcrumb-bg:                 #f5f5f5 !default;
755 | //** Breadcrumb text color
756 | $breadcrumb-color:              #ccc !default;
757 | //** Text color of current page in the breadcrumb
758 | $breadcrumb-active-color:       $gray-light !default;
759 | //** Textual separator for between breadcrumb elements
760 | $breadcrumb-separator:          "/" !default;
761 | 
762 | 
763 | //== Carousel
764 | //
765 | //##
766 | 
767 | $carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6) !default;
768 | 
769 | $carousel-control-color:                      #fff !default;
770 | $carousel-control-width:                      15% !default;
771 | $carousel-control-opacity:                    .5 !default;
772 | $carousel-control-font-size:                  20px !default;
773 | 
774 | $carousel-indicator-active-bg:                #fff !default;
775 | $carousel-indicator-border-color:             #fff !default;
776 | 
777 | $carousel-caption-color:                      #fff !default;
778 | 
779 | 
780 | //== Close
781 | //
782 | //##
783 | 
784 | $close-font-weight:           bold !default;
785 | $close-color:                 #000 !default;
786 | $close-text-shadow:           0 1px 0 #fff !default;
787 | 
788 | 
789 | //== Code
790 | //
791 | //##
792 | 
793 | $code-color:                  #c7254e !default;
794 | $code-bg:                     #f9f2f4 !default;
795 | 
796 | $kbd-color:                   #fff !default;
797 | $kbd-bg:                      #333 !default;
798 | 
799 | $pre-bg:                      #f5f5f5 !default;
800 | $pre-color:                   $gray-dark !default;
801 | $pre-border-color:            #ccc !default;
802 | $pre-scrollable-max-height:   340px !default;
803 | 
804 | 
805 | //== Type
806 | //
807 | //##
808 | 
809 | //** Text muted color
810 | $text-muted:                  $gray-light !default;
811 | //** Abbreviations and acronyms border color
812 | $abbr-border-color:           $gray-light !default;
813 | //** Headings small color
814 | $headings-small-color:        $gray-light !default;
815 | //** Blockquote small color
816 | $blockquote-small-color:      $gray-light !default;
817 | //** Blockquote font size
818 | $blockquote-font-size:        ($font-size-base * 1.25) !default;
819 | //** Blockquote border color
820 | $blockquote-border-color:     $gray-lighter !default;
821 | //** Page header border color
822 | $page-header-border-color:    $gray-lighter !default;
823 | 
824 | 
825 | //== Miscellaneous
826 | //
827 | //##
828 | 
829 | //** Horizontal line color.
830 | $hr-border:                   $gray-lighter !default;
831 | 
832 | //** Horizontal offset for forms and lists.
833 | $component-offset-horizontal: 180px !default;
834 | 


--------------------------------------------------------------------------------