├── log └── .keep ├── app ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── concerns │ │ └── .keep │ ├── bookmark.rb │ └── user.rb ├── assets │ ├── images │ │ └── .keep │ ├── stylesheets │ │ ├── site.css.scss │ │ ├── bookmarks.css.scss │ │ ├── profiles.css.scss │ │ ├── application.css │ │ └── foundation_and_overrides.scss │ └── javascripts │ │ ├── site.js.coffee │ │ ├── bookmarks.js.coffee │ │ ├── profiles.js.coffee │ │ └── application.js ├── controllers │ ├── concerns │ │ └── .keep │ ├── site_controller.rb │ ├── profiles_controller.rb │ ├── application_controller.rb │ └── bookmarks_controller.rb ├── helpers │ ├── site_helper.rb │ ├── bookmarks_helper.rb │ ├── profiles_helper.rb │ └── application_helper.rb └── views │ ├── bookmarks │ ├── new.html.erb │ ├── edit.html.erb │ ├── _form.html.erb │ ├── show.html.erb │ └── index.html.erb │ ├── devise │ ├── mailer │ │ ├── confirmation_instructions.html.erb │ │ ├── unlock_instructions.html.erb │ │ └── reset_password_instructions.html.erb │ ├── passwords │ │ ├── new.html.erb │ │ └── edit.html.erb │ ├── sessions │ │ └── new.html.erb │ ├── unlocks │ │ └── new.html.erb │ ├── confirmations │ │ └── new.html.erb │ ├── registrations │ │ ├── new.html.erb │ │ └── edit.html.erb │ └── shared │ │ └── _links.erb │ ├── profiles │ ├── index.html.erb │ └── show.html.erb │ ├── site │ └── index.html.erb │ └── layouts │ └── application.html.erb ├── lib ├── assets │ └── .keep ├── tasks │ └── .keep └── templates │ └── erb │ └── scaffold │ └── _form.html.erb ├── public ├── favicon.ico ├── robots.txt ├── 500.html ├── 422.html └── 404.html ├── vendor └── assets │ ├── javascripts │ └── .keep │ └── stylesheets │ └── .keep ├── bin ├── rake ├── bundle └── rails ├── config.ru ├── config ├── environment.rb ├── initializers │ ├── session_store.rb │ ├── filter_parameter_logging.rb │ ├── mime_types.rb │ ├── kaminari_config.rb │ ├── backtrace_silencers.rb │ ├── wrap_parameters.rb │ ├── inflections.rb │ ├── secret_token.rb │ ├── simple_form_foundation.rb │ ├── simple_form.rb │ └── devise.rb ├── boot.rb ├── database.yml ├── locales │ ├── en.yml │ ├── simple_form.en.yml │ └── devise.en.yml ├── application.rb ├── environments │ ├── development.rb │ ├── test.rb │ └── production.rb └── routes.rb ├── db ├── migrate │ ├── 20130613152218_add_username_to_user.rb │ ├── 20130612165719_create_bookmarks.rb │ └── 20130612160324_devise_create_users.rb ├── seeds.rb └── schema.rb ├── Rakefile ├── .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 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/helpers/site_helper.rb: -------------------------------------------------------------------------------- 1 | module SiteHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/bookmarks_helper.rb: -------------------------------------------------------------------------------- 1 | module BookmarksHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/profiles_helper.rb: -------------------------------------------------------------------------------- 1 | module ProfilesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /app/views/bookmarks/new.html.erb: -------------------------------------------------------------------------------- 1 |

New bookmark

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Back', bookmarks_path %> 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/views/bookmarks/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Editing bookmark

2 | 3 | <%= render 'form' %> 4 | 5 | <%= link_to 'Show', @bookmark %> | 6 | <%= link_to 'Back', bookmarks_path %> 7 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the Rails application. 5 | Bookmarks::Application.initialize! 6 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Bookmarks::Application.config.session_store :cookie_store, key: '_bookmarks_session' 4 | -------------------------------------------------------------------------------- /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/controllers/site_controller.rb: -------------------------------------------------------------------------------- 1 | class SiteController < ApplicationController 2 | def index 3 | @bookmarks = Bookmark.order('created_at desc').page(params[:page]) if current_user 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/stylesheets/site.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the site controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/bookmarks.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the bookmarks controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/profiles.css.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the profiles controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /db/migrate/20130613152218_add_username_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddUsernameToUser < ActiveRecord::Migration 2 | def change 3 | add_column :users, :username, :string 4 | 5 | add_index :users, :username, :unique => true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/assets/javascripts/site.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/bookmarks.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/profiles.js.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /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 | Bookmarks::Application.load_tasks 7 | -------------------------------------------------------------------------------- /app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>

6 | -------------------------------------------------------------------------------- /db/migrate/20130612165719_create_bookmarks.rb: -------------------------------------------------------------------------------- 1 | class CreateBookmarks < ActiveRecord::Migration 2 | def change 3 | create_table :bookmarks do |t| 4 | t.string :title 5 | t.string :url 6 | t.integer :user_id 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/bookmarks/_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= simple_form_for(@bookmark) do |f| %> 2 | <%= f.error_notification %> 3 | 4 |
5 | <%= f.input :title %> 6 | <%= f.input :url %> 7 |
8 | 9 |
10 | <%= f.button :submit %> 11 |
12 | <% end %> 13 | -------------------------------------------------------------------------------- /app/models/bookmark.rb: -------------------------------------------------------------------------------- 1 | class Bookmark < ActiveRecord::Base 2 | belongs_to :user 3 | 4 | validates :user_id, presence: true 5 | validates :title, length: { minimum: 10 }, presence: true 6 | validates :url, format: {with: Regexp.new(URI::regexp(%w(http https)))}, presence: true 7 | 8 | paginates_per 25 9 | end 10 | -------------------------------------------------------------------------------- /config/initializers/kaminari_config.rb: -------------------------------------------------------------------------------- 1 | Kaminari.configure do |config| 2 | # config.default_per_page = 25 3 | # config.max_per_page = nil 4 | # config.window = 4 5 | # config.outer_window = 0 6 | # config.left = 0 7 | # config.right = 0 8 | # config.page_method_name = :page 9 | # config.param_name = :page 10 | end 11 | -------------------------------------------------------------------------------- /app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %>

8 | -------------------------------------------------------------------------------- /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/controllers/profiles_controller.rb: -------------------------------------------------------------------------------- 1 | class ProfilesController < ApplicationController 2 | def index 3 | @users = User.page(params[:page]) 4 | end 5 | 6 | def show 7 | if @user = User.where(username: params[:id]).first 8 | @bookmarks = @user.bookmarks.page(params[:page]) 9 | else 10 | flash[:alert] = 'Profile not found.' 11 | redirect_to profiles_path 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/bookmarks/show.html.erb: -------------------------------------------------------------------------------- 1 |

<%= notice %>

2 | 3 |

4 | Title: 5 | <%= @bookmark.title %> 6 |

7 | 8 |

9 | Url: 10 | <%= @bookmark.url %> 11 |

12 | 13 |

14 | User: 15 | <%= @bookmark.user_id %> 16 |

17 | 18 | <%= link_to 'Edit', edit_bookmark_path(@bookmark) %> | 19 | <%= link_to 'Back', bookmarks_path %> 20 | -------------------------------------------------------------------------------- /db/migrate/20130612160324_devise_create_users.rb: -------------------------------------------------------------------------------- 1 | class DeviseCreateUsers < ActiveRecord::Migration 2 | def self.up 3 | create_table(:users) do |t| 4 | t.database_authenticatable :null => false 5 | t.rememberable 6 | 7 | t.timestamps 8 | end 9 | 10 | add_index :users, :email, :unique => true 11 | end 12 | 13 | def self.down 14 | drop_table :users 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/templates/erb/scaffold/_form.html.erb: -------------------------------------------------------------------------------- 1 | <%%= simple_form_for(@<%= singular_table_name %>) do |f| %> 2 | <%%= f.error_notification %> 3 | 4 |
5 | <%- attributes.each do |attribute| -%> 6 | <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %> 7 | <%- end -%> 8 |
9 | 10 |
11 | <%%= f.button :submit %> 12 |
13 | <%% end %> 14 | -------------------------------------------------------------------------------- /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/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /app/views/profiles/index.html.erb: -------------------------------------------------------------------------------- 1 |

Users that joined

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <% @users.each do |user| %> 13 | 14 | 15 | 16 | 17 | <% end %> 18 | 19 |
User# Bookmarks
<%= link_to user.username, profile_path(user) %><%= user.bookmarks.count %>
20 | 21 | <%= paginate @users %> 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/*.log 16 | /tmp 17 | -------------------------------------------------------------------------------- /app/models/user.rb: -------------------------------------------------------------------------------- 1 | class User < ActiveRecord::Base 2 | # Include default devise modules. Others available are: 3 | # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable 4 | devise :database_authenticatable, :registerable, 5 | :rememberable, :validatable 6 | 7 | has_many :bookmarks 8 | 9 | validates :username, 10 | presence: true, 11 | uniqueness: {case_sensitive: false}, 12 | format: {with: /\w+/} 13 | 14 | def to_param 15 | self.username 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 |

Forgot your password?

2 | 3 | <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %> 4 | <%= f.error_notification %> 5 | 6 |
7 | <%= f.input :email, :required => true, :autofocus => true %> 8 |
9 | 10 |
11 | <%= f.button :submit, "Send me reset password instructions" %> 12 |
13 | <% end %> 14 | 15 | <%= render "devise/shared/links" %> 16 | -------------------------------------------------------------------------------- /app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 |

Sign in

2 | 3 | <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> 4 |
5 | <%= f.input :email, :required => false, :autofocus => true %> 6 | <%= f.input :password, :required => false %> 7 | <%= f.input :remember_me, :as => :boolean if devise_mapping.rememberable? %> 8 |
9 | 10 |
11 | <%= f.button :submit, "Sign in" %> 12 |
13 | <% end %> 14 | 15 | <%= render "devise/shared/links" %> 16 | -------------------------------------------------------------------------------- /app/views/devise/unlocks/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend unlock instructions

2 | 3 | <%= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> 4 | <%= f.error_notification %> 5 | <%= f.full_error :unlock_token %> 6 | 7 |
8 | <%= f.input :email, :required => true, :autofocus => true %> 9 |
10 | 11 |
12 | <%= f.button :submit, "Resend unlock instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /app/views/profiles/show.html.erb: -------------------------------------------------------------------------------- 1 |

Bookmarks submitted by <%= link_to @user.username, profile_path(@user) %>

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <% @bookmarks.each do |bookmark| %> 13 | 14 | 15 | 16 | 17 | <% end %> 18 | 19 |
UrlUser
<%= link_to bookmark.title, bookmark.url %><%= link_to @user.username, profile_path(@user) %>
20 | 21 | <%= paginate @bookmarks %> 22 | 23 | <%= link_to 'Back', profiles_path %> 24 | -------------------------------------------------------------------------------- /app/views/devise/confirmations/new.html.erb: -------------------------------------------------------------------------------- 1 |

Resend confirmation instructions

2 | 3 | <%= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> 4 | <%= f.error_notification %> 5 | <%= f.full_error :confirmation_token %> 6 | 7 |
8 | <%= f.input :email, :required => true, :autofocus => true %> 9 |
10 | 11 |
12 | <%= f.button :submit, "Resend confirmation instructions" %> 13 |
14 | <% end %> 15 | 16 | <%= render "devise/shared/links" %> 17 | -------------------------------------------------------------------------------- /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/views/devise/registrations/new.html.erb: -------------------------------------------------------------------------------- 1 |

Sign up

2 | 3 | <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> 4 | <%= f.error_notification %> 5 | 6 |
7 | <%= f.input :username, :required => true, :autofocus => true %> 8 | <%= f.input :email, :required => true %> 9 | <%= f.input :password, :required => true %> 10 | <%= f.input :password_confirmation, :required => true %> 11 |
12 | 13 |
14 | <%= f.button :submit, "Sign up" %> 15 |
16 | <% end %> 17 | 18 | <%= render "devise/shared/links" %> 19 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require_self 12 | *= require foundation_and_overrides 13 | *= require_tree . 14 | */ 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 6 | before_action :configure_permitted_parameters, if: :devise_controller? 7 | 8 | protected 9 | 10 | def configure_permitted_parameters 11 | devise_parameter_sanitizer.for(:sign_up) do |u| 12 | u.permit(:username, :email, :password, :password_confirmation) 13 | end 14 | 15 | devise_parameter_sanitizer.for(:account_update) do |u| 16 | u.permit(:username, :email, :password, :password_confirmation, :current_password) 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /config/initializers/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 | Bookmarks::Application.config.secret_key_base = '7269c68465f233d4ec69b89763fd1d5395f219192f8da34db3041dd33a140b7c24e77f25a15fa33d88f07e9e198d39ebc72dd2724ff6bce490fcc2ad9d1b19e8' 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/views/devise/passwords/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Change your password

2 | 3 | <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> 4 | <%= f.error_notification %> 5 | 6 | <%= f.input :reset_password_token, :as => :hidden %> 7 | <%= f.full_error :reset_password_token %> 8 | 9 |
10 | <%= f.input :password, :label => "New password", :required => true, :autofocus => true %> 11 | <%= f.input :password_confirmation, :label => "Confirm your new password", :required => true %> 12 |
13 | 14 |
15 | <%= f.button :submit, "Change my password" %> 16 |
17 | <% end %> 18 | 19 | <%= render "devise/shared/links" %> 20 | -------------------------------------------------------------------------------- /app/views/bookmarks/index.html.erb: -------------------------------------------------------------------------------- 1 |

Your bookmarks

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <% @bookmarks.each do |bookmark| %> 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | <% end %> 24 | 25 |
TitleUrl
<%= bookmark.title %><%= bookmark.url %><%= link_to 'Show', bookmark %><%= link_to 'Edit', edit_bookmark_path(bookmark) %><%= link_to 'Destroy', bookmark, method: :delete, data: { confirm: 'Are you sure?' } %>
26 | 27 | <%= paginate @bookmarks %> 28 | 29 | <%= link_to 'New Bookmark', new_bookmark_path, class: 'button' %> 30 | -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery 14 | //= require jquery_ujs 15 | //= require foundation 16 | //= require turbolinks 17 | //= require_tree . 18 | 19 | $(function(){ $(document).foundation(); }); 20 | -------------------------------------------------------------------------------- /config/locales/simple_form.en.yml: -------------------------------------------------------------------------------- 1 | en: 2 | simple_form: 3 | "yes": 'Yes' 4 | "no": 'No' 5 | required: 6 | text: 'required' 7 | mark: '*' 8 | # You can uncomment the line below if you need to overwrite the whole required html. 9 | # When using html, text and mark won't be used. 10 | # html: '*' 11 | error_notification: 12 | default_message: "Please review the problems below:" 13 | # Labels and hints examples 14 | # labels: 15 | # defaults: 16 | # password: 'Password' 17 | # user: 18 | # new: 19 | # email: 'E-mail to sign in.' 20 | # edit: 21 | # email: 'E-mail.' 22 | # hints: 23 | # defaults: 24 | # username: 'User name to sign in.' 25 | # password: 'No special characters, please.' 26 | 27 | -------------------------------------------------------------------------------- /config/initializers/simple_form_foundation.rb: -------------------------------------------------------------------------------- 1 | # Use this setup block to configure all options available in SimpleForm. 2 | SimpleForm.setup do |config| 3 | config.wrappers :foundation, class: :input, hint_class: :field_with_hint, error_class: :error do |b| 4 | b.use :html5 5 | b.use :placeholder 6 | b.optional :maxlength 7 | b.optional :pattern 8 | b.optional :min_max 9 | b.optional :readonly 10 | b.use :label_input 11 | b.use :error, wrap_with: { tag: :small } 12 | 13 | # Uncomment the following line to enable hints. The line is commented out by default since Foundation 14 | # does't provide styles for hints. You will need to provide your own CSS styles for hints. 15 | # b.use :hint, wrap_with: { tag: :span, class: :hint } 16 | end 17 | 18 | # CSS class for buttons 19 | config.button_class = 'button' 20 | 21 | # CSS class to add for error notification helper. 22 | config.error_notification_class = 'alert-box alert' 23 | 24 | # The default wrapper to be used by the FormBuilder. 25 | config.default_wrapper = :foundation 26 | end 27 | -------------------------------------------------------------------------------- /app/views/devise/shared/_links.erb: -------------------------------------------------------------------------------- 1 | <%- if controller_name != 'sessions' %> 2 | <%= link_to "Sign in", new_session_path(resource_name) %>
3 | <% end -%> 4 | 5 | <%- if devise_mapping.registerable? && controller_name != 'registrations' %> 6 | <%= link_to "Sign up", new_registration_path(resource_name) %>
7 | <% end -%> 8 | 9 | <%- if devise_mapping.recoverable? && controller_name != 'passwords' %> 10 | <%= link_to "Forgot your password?", new_password_path(resource_name) %>
11 | <% end -%> 12 | 13 | <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> 14 | <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
15 | <% end -%> 16 | 17 | <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> 18 | <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
19 | <% end -%> 20 | 21 | <%- if devise_mapping.omniauthable? %> 22 | <%- resource_class.omniauth_providers.each do |provider| %> 23 | <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %>
24 | <% end -%> 25 | <% end -%> -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('../boot', __FILE__) 2 | 3 | # Pick the frameworks you want: 4 | require "active_record/railtie" 5 | require "action_controller/railtie" 6 | require "action_mailer/railtie" 7 | require "sprockets/railtie" 8 | # require "rails/test_unit/railtie" 9 | 10 | # Require the gems listed in Gemfile, including any gems 11 | # you've limited to :test, :development, or :production. 12 | Bundler.require(:default, Rails.env) 13 | 14 | module Bookmarks 15 | class Application < Rails::Application 16 | # Settings in config/environments/* take precedence over those specified here. 17 | # Application configuration should go into files in config/initializers 18 | # -- all .rb files in that directory are automatically loaded. 19 | 20 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 21 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 22 | # config.time_zone = 'Central Time (US & Canada)' 23 | 24 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 25 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 26 | # config.i18n.default_locale = :de 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /app/views/devise/registrations/edit.html.erb: -------------------------------------------------------------------------------- 1 |

Edit <%= resource_name.to_s.humanize %>

2 | 3 | <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> 4 | <%= f.error_notification %> 5 | 6 |
7 | <%= f.input :username, :required => true, :autofocus => true %> 8 | <%= f.input :email, :required => true %> 9 | 10 | <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> 11 |

Currently waiting confirmation for: <%= resource.unconfirmed_email %>

12 | <% end %> 13 | 14 | <%= f.input :password, :autocomplete => "off", :hint => "leave it blank if you don't want to change it", :required => false %> 15 | <%= f.input :password_confirmation, :required => false %> 16 | <%= f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true %> 17 |
18 | 19 |
20 | <%= f.button :submit, "Update" %> 21 |
22 | <% end %> 23 | 24 |

Cancel my account

25 | 26 |

Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>

27 | 28 | <%= link_to "Back", :back %> 29 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | Bookmarks::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports and disable caching. 13 | config.consider_all_requests_local = true 14 | config.action_controller.perform_caching = false 15 | 16 | # Don't care if the mailer can't send. 17 | config.action_mailer.raise_delivery_errors = false 18 | 19 | # Print deprecation notices to the Rails logger. 20 | config.active_support.deprecation = :log 21 | 22 | # Raise an error on page load if there are pending migrations 23 | config.active_record.migration_error = :page_load 24 | 25 | # Debug mode disables concatenation and preprocessing of assets. 26 | # This option may cause significant delays in view rendering with a large 27 | # number of complex assets. 28 | config.assets.debug = true 29 | 30 | config.action_mailer.default_url_options = { host: 'localhost:3000' } 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 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 4 | gem 'rails', '4.0.0.rc2' 5 | 6 | # Use sqlite3 as the database for Active Record 7 | gem 'sqlite3' 8 | 9 | # Use SCSS for stylesheets 10 | gem 'sass-rails', '~> 4.0.0.rc2' 11 | 12 | # Use Uglifier as compressor for JavaScript assets 13 | gem 'uglifier', '>= 1.3.0' 14 | 15 | # Use CoffeeScript for .js.coffee assets and views 16 | gem 'coffee-rails', '~> 4.0.0' 17 | 18 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes 19 | # gem 'therubyracer', platforms: :ruby 20 | 21 | # Use jquery as the JavaScript library 22 | gem 'jquery-rails' 23 | 24 | # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 25 | gem 'turbolinks' 26 | 27 | # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 28 | # gem 'jbuilder', '~> 1.2' 29 | 30 | group :doc do 31 | # bundle exec rake doc:rails generates the API under doc/api. 32 | gem 'sdoc', require: false 33 | end 34 | 35 | # Use ActiveModel has_secure_password 36 | # gem 'bcrypt-ruby', '~> 3.0.0' 37 | 38 | # Use unicorn as the app server 39 | # gem 'unicorn' 40 | 41 | # Use Capistrano for deployment 42 | # gem 'capistrano', group: :development 43 | 44 | # Use debugger 45 | # gem 'debugger', group: [:development, :test] 46 | 47 | # Our additional gems 48 | 49 | gem 'devise', '~> 3.0.0.rc' 50 | 51 | gem 'zurb-foundation', '~> 4.2.2' 52 | 53 | gem 'simple_form', '~> 3.0.0.rc' 54 | 55 | gem 'kaminari' 56 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /db/schema.rb: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | # This file is auto-generated from the current state of the database. Instead 3 | # of editing this file, please use the migrations feature of Active Record to 4 | # incrementally modify your database, and then regenerate this schema definition. 5 | # 6 | # Note that this schema.rb definition is the authoritative source for your 7 | # database schema. If you need to create the application database on another 8 | # system, you should be using db:schema:load, not running all the migrations 9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations 10 | # you'll amass, the slower it'll run and the greater likelihood for issues). 11 | # 12 | # It's strongly recommended that you check this file into your version control system. 13 | 14 | ActiveRecord::Schema.define(version: 20130613152218) do 15 | 16 | create_table "bookmarks", force: true do |t| 17 | t.string "title" 18 | t.string "url" 19 | t.integer "user_id" 20 | t.datetime "created_at" 21 | t.datetime "updated_at" 22 | end 23 | 24 | create_table "users", force: true do |t| 25 | t.string "email", default: "", null: false 26 | t.string "encrypted_password", limit: 128, default: "", null: false 27 | t.datetime "remember_created_at" 28 | t.datetime "created_at" 29 | t.datetime "updated_at" 30 | t.string "username" 31 | end 32 | 33 | add_index "users", ["email"], name: "index_users_on_email", unique: true 34 | add_index "users", ["username"], name: "index_users_on_username", unique: true 35 | 36 | end 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /config/environments/test.rb: -------------------------------------------------------------------------------- 1 | Bookmarks::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure static asset server for tests with Cache-Control for performance. 16 | config.serve_static_assets = true 17 | config.static_cache_control = "public, max-age=3600" 18 | 19 | # Show full error reports and disable caching. 20 | config.consider_all_requests_local = true 21 | config.action_controller.perform_caching = false 22 | 23 | # Raise exceptions instead of rendering exception templates. 24 | config.action_dispatch.show_exceptions = false 25 | 26 | # Disable request forgery protection in test environment. 27 | config.action_controller.allow_forgery_protection = false 28 | 29 | # Tell Action Mailer not to deliver emails to the real world. 30 | # The :test delivery method accumulates sent emails in the 31 | # ActionMailer::Base.deliveries array. 32 | config.action_mailer.delivery_method = :test 33 | 34 | # Print deprecation notices to the stderr. 35 | config.active_support.deprecation = :stderr 36 | end 37 | -------------------------------------------------------------------------------- /app/views/site/index.html.erb: -------------------------------------------------------------------------------- 1 | <% if current_user %> 2 |

Latest Bookmarks

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <% @bookmarks.each do |bookmark| %> 13 | 14 | 15 | 16 | 17 | <% end %> 18 | 19 |
UrlUser
<%= link_to bookmark.title, bookmark.url %><%= link_to bookmark.user.username, profile_path(bookmark.user) %>
20 | 21 | <%= paginate @bookmarks %> 22 | 23 | <% else %> 24 |
25 |

Share your bookmarks!

26 |

A simple app to track and share your beloved bookmarks with others.

27 | <%= link_to "Get started today", new_user_registration_path, :class => "button button-large" %> 28 |
29 | 30 |
31 | 32 |
33 |
34 |

12 Devs of Summer

35 |

36 | 12 Devs is an evolution of the 12 Devs of Xmas, a way to bring more cool web development articles to you throughout the year. However 12 Devs won’t just be about the tutorial and tips articles, we’re also going to be bringing you some great new features and events. 37 |

38 |

Learn more.

39 |
40 |
41 |

About this app

42 |

This is a tutorial app developed by Andrea Pavoni as a companion to the rails article. Check the source code on GitHub.

43 |
44 |
45 | <% end %> 46 | -------------------------------------------------------------------------------- /app/controllers/bookmarks_controller.rb: -------------------------------------------------------------------------------- 1 | class BookmarksController < ApplicationController 2 | before_action :set_bookmark, only: [:show, :edit, :update, :destroy] 3 | before_action :authenticate_user! 4 | 5 | # GET /bookmarks 6 | def index 7 | @bookmarks = current_user.bookmarks.order('created_at desc').page(params[:page]) 8 | end 9 | 10 | # GET /bookmarks/1 11 | def show 12 | end 13 | 14 | # GET /bookmarks/new 15 | def new 16 | @bookmark = current_user.bookmarks.new 17 | end 18 | 19 | # GET /bookmarks/1/edit 20 | def edit 21 | end 22 | 23 | # POST /bookmarks 24 | def create 25 | @bookmark = current_user.bookmarks.new(bookmark_params) 26 | 27 | if @bookmark.save 28 | redirect_to @bookmark, notice: 'Bookmark was successfully created.' 29 | else 30 | render action: 'new' 31 | end 32 | end 33 | 34 | # PATCH/PUT /bookmarks/1 35 | def update 36 | if @bookmark.update(bookmark_params) 37 | redirect_to @bookmark, notice: 'Bookmark was successfully updated.' 38 | else 39 | render action: 'edit' 40 | end 41 | end 42 | 43 | # DELETE /bookmarks/1 44 | def destroy 45 | @bookmark.destroy 46 | redirect_to bookmarks_url, notice: 'Bookmark was successfully destroyed.' 47 | end 48 | 49 | private 50 | # Use callbacks to share common setup or constraints between actions. 51 | def set_bookmark 52 | unless @bookmark = current_user.bookmarks.where(id: params[:id]).first 53 | flash[:alert] = 'Bookmark not found.' 54 | redirect_to root_url 55 | end 56 | end 57 | 58 | # Only allow a trusted parameter "white list" through. 59 | def bookmark_params 60 | params.require(:bookmark).permit(:title, :url, :user_id) 61 | end 62 | end 63 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | Bookmarks::Application.routes.draw do 2 | resources :bookmarks 3 | resources :profiles, only: [:index, :show] 4 | 5 | devise_for :users 6 | # The priority is based upon order of creation: first created -> highest priority. 7 | # See how all your routes lay out with "rake routes". 8 | 9 | # You can have the root of your site routed with "root" 10 | # root 'welcome#index' 11 | root 'site#index' 12 | 13 | # Example of regular route: 14 | # get 'products/:id' => 'catalog#view' 15 | 16 | # Example of named route that can be invoked with purchase_url(id: product.id) 17 | # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase 18 | 19 | # Example resource route (maps HTTP verbs to controller actions automatically): 20 | # resources :products 21 | 22 | # Example resource route with options: 23 | # resources :products do 24 | # member do 25 | # get 'short' 26 | # post 'toggle' 27 | # end 28 | # 29 | # collection do 30 | # get 'sold' 31 | # end 32 | # end 33 | 34 | # Example resource route with sub-resources: 35 | # resources :products do 36 | # resources :comments, :sales 37 | # resource :seller 38 | # end 39 | 40 | # Example resource route with more complex sub-resources: 41 | # resources :products do 42 | # resources :comments 43 | # resources :sales do 44 | # get 'recent', on: :collection 45 | # end 46 | # end 47 | 48 | # Example resource route with concerns: 49 | # concern :toggleable do 50 | # post 'toggle' 51 | # end 52 | # resources :posts, concerns: :toggleable 53 | # resources :photos, concerns: :toggleable 54 | 55 | # Example resource route within a namespace: 56 | # namespace :admin do 57 | # # Directs /admin/products/* to Admin::ProductsController 58 | # # (app/controllers/admin/products_controller.rb) 59 | # resources :products 60 | # end 61 | end 62 | -------------------------------------------------------------------------------- /config/locales/devise.en.yml: -------------------------------------------------------------------------------- 1 | # Additional translations at https://github.com/plataformatec/devise/wiki/I18n 2 | 3 | en: 4 | errors: 5 | messages: 6 | expired: "has expired, please request a new one" 7 | not_found: "not found" 8 | already_confirmed: "was already confirmed, please try signing in" 9 | not_locked: "was not locked" 10 | not_saved: 11 | one: "1 error prohibited this %{resource} from being saved:" 12 | other: "%{count} errors prohibited this %{resource} from being saved:" 13 | 14 | devise: 15 | failure: 16 | already_authenticated: 'You are already signed in.' 17 | unauthenticated: 'You need to sign in or sign up before continuing.' 18 | unconfirmed: 'You have to confirm your account before continuing.' 19 | locked: 'Your account is locked.' 20 | invalid: 'Invalid email or password.' 21 | invalid_token: 'Invalid authentication token.' 22 | timeout: 'Your session expired, please sign in again to continue.' 23 | inactive: 'Your account was not activated yet.' 24 | sessions: 25 | signed_in: 'Signed in successfully.' 26 | signed_out: 'Signed out successfully.' 27 | passwords: 28 | send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.' 29 | updated: 'Your password was changed successfully. You are now signed in.' 30 | updated_not_active: 'Your password was changed successfully.' 31 | send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail" 32 | confirmations: 33 | send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' 34 | send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.' 35 | confirmed: 'Your account was successfully confirmed. You are now signed in.' 36 | registrations: 37 | signed_up: 'Welcome! You have signed up successfully.' 38 | inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.' 39 | updated: 'You updated your account successfully.' 40 | destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' 41 | reasons: 42 | inactive: 'inactive' 43 | unconfirmed: 'unconfirmed' 44 | locked: 'locked' 45 | unlocks: 46 | send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' 47 | unlocked: 'Your account was successfully unlocked. You are now signed in.' 48 | send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.' 49 | omniauth_callbacks: 50 | success: 'Successfully authorized from %{kind} account.' 51 | failure: 'Could not authorize you from %{kind} because "%{reason}".' 52 | mailer: 53 | confirmation_instructions: 54 | subject: 'Confirmation instructions' 55 | reset_password_instructions: 56 | subject: 'Reset password instructions' 57 | unlock_instructions: 58 | subject: 'Unlock Instructions' 59 | -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | Bookmarks::Application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both thread web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application 18 | # Add `rack-cache` to your Gemfile before enabling this. 19 | # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. 20 | # config.action_dispatch.rack_cache = true 21 | 22 | # Disable Rails's static asset server (Apache or nginx will already do this). 23 | config.serve_static_assets = false 24 | 25 | # Compress JavaScripts and CSS. 26 | config.assets.js_compressor = :uglifier 27 | # config.assets.css_compressor = :sass 28 | 29 | # Do not fallback to assets pipeline if a precompiled asset is missed. 30 | config.assets.compile = false 31 | 32 | # Generate digests for assets URLs. 33 | config.assets.digest = true 34 | 35 | # Version of your assets, change this if you want to expire all your assets. 36 | config.assets.version = '1.0' 37 | 38 | # Specifies the header that your server uses for sending files. 39 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache 40 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx 41 | 42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 43 | # config.force_ssl = true 44 | 45 | # Set to :debug to see everything in the log. 46 | config.log_level = :info 47 | 48 | # Prepend all log lines with the following tags. 49 | # config.log_tags = [ :subdomain, :uuid ] 50 | 51 | # Use a different logger for distributed setups. 52 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 53 | 54 | # Use a different cache store in production. 55 | # config.cache_store = :mem_cache_store 56 | 57 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 58 | # config.action_controller.asset_host = "http://assets.example.com" 59 | 60 | # Precompile additional assets. 61 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 62 | # config.assets.precompile += %w( search.js ) 63 | 64 | # Ignore bad email addresses and do not raise email delivery errors. 65 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 66 | # config.action_mailer.raise_delivery_errors = false 67 | 68 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 69 | # the I18n.default_locale when a translation can not be found). 70 | config.i18n.fallbacks = true 71 | 72 | # Send deprecation notices to registered listeners. 73 | config.active_support.deprecation = :notify 74 | 75 | # Disable automatic flushing of the log to improve performance. 76 | # config.autoflush_log = false 77 | 78 | # Use default logging formatter so that PID and timestamp are not suppressed. 79 | config.log_formatter = ::Logger::Formatter.new 80 | end 81 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | actionmailer (4.0.0.rc2) 5 | actionpack (= 4.0.0.rc2) 6 | mail (~> 2.5.3) 7 | actionpack (4.0.0.rc2) 8 | activesupport (= 4.0.0.rc2) 9 | builder (~> 3.1.0) 10 | erubis (~> 2.7.0) 11 | rack (~> 1.5.2) 12 | rack-test (~> 0.6.2) 13 | activemodel (4.0.0.rc2) 14 | activesupport (= 4.0.0.rc2) 15 | builder (~> 3.1.0) 16 | activerecord (4.0.0.rc2) 17 | activemodel (= 4.0.0.rc2) 18 | activerecord-deprecated_finders (~> 1.0.2) 19 | activesupport (= 4.0.0.rc2) 20 | arel (~> 4.0.0) 21 | activerecord-deprecated_finders (1.0.3) 22 | activesupport (4.0.0.rc2) 23 | i18n (~> 0.6, >= 0.6.4) 24 | minitest (~> 4.2) 25 | multi_json (~> 1.3) 26 | thread_safe (~> 0.1) 27 | tzinfo (~> 0.3.37) 28 | arel (4.0.0) 29 | atomic (1.1.9) 30 | bcrypt-ruby (3.0.1) 31 | builder (3.1.4) 32 | coffee-rails (4.0.0) 33 | coffee-script (>= 2.2.0) 34 | railties (>= 4.0.0.beta, < 5.0) 35 | coffee-script (2.2.0) 36 | coffee-script-source 37 | execjs 38 | coffee-script-source (1.6.2) 39 | devise (3.0.0.rc) 40 | bcrypt-ruby (~> 3.0) 41 | orm_adapter (~> 0.1) 42 | railties (>= 3.2.6, < 5) 43 | warden (~> 1.2.1) 44 | erubis (2.7.0) 45 | execjs (1.4.0) 46 | multi_json (~> 1.0) 47 | hike (1.2.3) 48 | i18n (0.6.4) 49 | jquery-rails (3.0.1) 50 | railties (>= 3.0, < 5.0) 51 | thor (>= 0.14, < 2.0) 52 | json (1.8.0) 53 | kaminari (0.14.1) 54 | actionpack (>= 3.0.0) 55 | activesupport (>= 3.0.0) 56 | mail (2.5.4) 57 | mime-types (~> 1.16) 58 | treetop (~> 1.4.8) 59 | mime-types (1.23) 60 | minitest (4.7.4) 61 | multi_json (1.7.6) 62 | orm_adapter (0.4.0) 63 | polyglot (0.3.3) 64 | rack (1.5.2) 65 | rack-test (0.6.2) 66 | rack (>= 1.0) 67 | rails (4.0.0.rc2) 68 | actionmailer (= 4.0.0.rc2) 69 | actionpack (= 4.0.0.rc2) 70 | activerecord (= 4.0.0.rc2) 71 | activesupport (= 4.0.0.rc2) 72 | bundler (>= 1.3.0, < 2.0) 73 | railties (= 4.0.0.rc2) 74 | sprockets-rails (~> 2.0.0) 75 | railties (4.0.0.rc2) 76 | actionpack (= 4.0.0.rc2) 77 | activesupport (= 4.0.0.rc2) 78 | rake (>= 0.8.7) 79 | thor (>= 0.18.1, < 2.0) 80 | rake (10.0.4) 81 | rdoc (3.12.2) 82 | json (~> 1.4) 83 | sass (3.2.9) 84 | sass-rails (4.0.0.rc2) 85 | railties (>= 4.0.0.beta, < 5.0) 86 | sass (>= 3.1.10) 87 | sprockets-rails (~> 2.0.0) 88 | sdoc (0.3.20) 89 | json (>= 1.1.3) 90 | rdoc (~> 3.10) 91 | simple_form (3.0.0.rc) 92 | actionpack (>= 4.0.0.rc1, < 4.1) 93 | activemodel (>= 4.0.0.rc1, < 4.1) 94 | sprockets (2.10.0) 95 | hike (~> 1.2) 96 | multi_json (~> 1.0) 97 | rack (~> 1.0) 98 | tilt (~> 1.1, != 1.3.0) 99 | sprockets-rails (2.0.0) 100 | actionpack (>= 3.0) 101 | activesupport (>= 3.0) 102 | sprockets (~> 2.8) 103 | sqlite3 (1.3.7) 104 | thor (0.18.1) 105 | thread_safe (0.1.0) 106 | atomic 107 | tilt (1.4.1) 108 | treetop (1.4.14) 109 | polyglot 110 | polyglot (>= 0.3.1) 111 | turbolinks (1.2.0) 112 | coffee-rails 113 | tzinfo (0.3.37) 114 | uglifier (2.1.1) 115 | execjs (>= 0.3.0) 116 | multi_json (~> 1.0, >= 1.0.2) 117 | warden (1.2.1) 118 | rack (>= 1.0) 119 | zurb-foundation (4.2.2) 120 | sass (>= 3.2.0) 121 | 122 | PLATFORMS 123 | ruby 124 | 125 | DEPENDENCIES 126 | coffee-rails (~> 4.0.0) 127 | devise (~> 3.0.0.rc) 128 | jquery-rails 129 | kaminari 130 | rails (= 4.0.0.rc2) 131 | sass-rails (~> 4.0.0.rc2) 132 | sdoc 133 | simple_form (~> 3.0.0.rc) 134 | sqlite3 135 | turbolinks 136 | uglifier (>= 1.3.0) 137 | zurb-foundation (~> 4.2.2) 138 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <%= content_for?(:title) ? yield(:title) : "Bookmarks" %> 16 | 17 | <%= stylesheet_link_tag "application" %> 18 | <%= javascript_include_tag "vendor/custom.modernizr" %> 19 | <%= csrf_meta_tags %> 20 | 21 | 22 | 23 |
24 |
25 | 26 | 27 | 28 |
29 |
30 | 31 | 66 | 67 |
68 |
69 | 70 | 71 | 72 |
73 |
74 | <% if flash[:notice] %> 75 |
76 | × 77 | <%= flash[:notice] %> 78 |
79 | <% end %> 80 | 81 | <% if flash[:alert] %> 82 |
83 | × 84 | <%= flash[:alert] %> 85 |
86 | <% end %> 87 |
88 |
89 | 90 | 91 | 92 |
93 |
94 | <%= yield %> 95 |
96 |
97 | 98 | 99 | 100 |
101 |

102 |
103 |
104 |

© Copyright no one at all.

105 |
106 | 107 |
108 | 114 |
115 |
116 |
117 |
118 | 119 | 120 |
121 |
122 | 123 | <%= javascript_include_tag "application" %> 124 | 125 | 126 | -------------------------------------------------------------------------------- /config/initializers/simple_form.rb: -------------------------------------------------------------------------------- 1 | # Use this setup block to configure all options available in SimpleForm. 2 | SimpleForm.setup do |config| 3 | # Wrappers are used by the form builder to generate a 4 | # complete input. You can remove any component from the 5 | # wrapper, change the order or even add your own to the 6 | # stack. The options given below are used to wrap the 7 | # whole input. 8 | config.wrappers :default, class: :input, 9 | hint_class: :field_with_hint, error_class: :field_with_errors do |b| 10 | ## Extensions enabled by default 11 | # Any of these extensions can be disabled for a 12 | # given input by passing: `f.input EXTENSION_NAME => false`. 13 | # You can make any of these extensions optional by 14 | # renaming `b.use` to `b.optional`. 15 | 16 | # Determines whether to use HTML5 (:email, :url, ...) 17 | # and required attributes 18 | b.use :html5 19 | 20 | # Calculates placeholders automatically from I18n 21 | # You can also pass a string as f.input placeholder: "Placeholder" 22 | b.use :placeholder 23 | 24 | ## Optional extensions 25 | # They are disabled unless you pass `f.input EXTENSION_NAME => :lookup` 26 | # to the input. If so, they will retrieve the values from the model 27 | # if any exists. If you want to enable the lookup for any of those 28 | # extensions by default, you can change `b.optional` to `b.use`. 29 | 30 | # Calculates maxlength from length validations for string inputs 31 | b.optional :maxlength 32 | 33 | # Calculates pattern from format validations for string inputs 34 | b.optional :pattern 35 | 36 | # Calculates min and max from length validations for numeric inputs 37 | b.optional :min_max 38 | 39 | # Calculates readonly automatically from readonly attributes 40 | b.optional :readonly 41 | 42 | ## Inputs 43 | b.use :label_input 44 | b.use :hint, wrap_with: { tag: :span, class: :hint } 45 | b.use :error, wrap_with: { tag: :span, class: :error } 46 | end 47 | 48 | # The default wrapper to be used by the FormBuilder. 49 | config.default_wrapper = :default 50 | 51 | # Define the way to render check boxes / radio buttons with labels. 52 | # Defaults to :nested for bootstrap config. 53 | # inline: input + label 54 | # nested: label > input 55 | config.boolean_style = :nested 56 | 57 | # Default class for buttons 58 | config.button_class = 'btn' 59 | 60 | # Method used to tidy up errors. Specify any Rails Array method. 61 | # :first lists the first message for each field. 62 | # Use :to_sentence to list all errors for each field. 63 | # config.error_method = :first 64 | 65 | # Default tag used for error notification helper. 66 | config.error_notification_tag = :div 67 | 68 | # CSS class to add for error notification helper. 69 | config.error_notification_class = 'alert alert-error' 70 | 71 | # ID to add for error notification helper. 72 | # config.error_notification_id = nil 73 | 74 | # Series of attempts to detect a default label method for collection. 75 | # config.collection_label_methods = [ :to_label, :name, :title, :to_s ] 76 | 77 | # Series of attempts to detect a default value method for collection. 78 | # config.collection_value_methods = [ :id, :to_s ] 79 | 80 | # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none. 81 | # config.collection_wrapper_tag = nil 82 | 83 | # You can define the class to use on all collection wrappers. Defaulting to none. 84 | # config.collection_wrapper_class = nil 85 | 86 | # You can wrap each item in a collection of radio/check boxes with a tag, 87 | # defaulting to :span. Please note that when using :boolean_style = :nested, 88 | # SimpleForm will force this option to be a label. 89 | # config.item_wrapper_tag = :span 90 | 91 | # You can define a class to use in all item wrappers. Defaulting to none. 92 | # config.item_wrapper_class = nil 93 | 94 | # How the label text should be generated altogether with the required text. 95 | # config.label_text = lambda { |label, required| "#{required} #{label}" } 96 | 97 | # You can define the class to use on all labels. Default is nil. 98 | config.label_class = 'control-label' 99 | 100 | # You can define the class to use on all forms. Default is simple_form. 101 | # config.form_class = :simple_form 102 | 103 | # You can define which elements should obtain additional classes 104 | # config.generate_additional_classes_for = [:wrapper, :label, :input] 105 | 106 | # Whether attributes are required by default (or not). Default is true. 107 | # config.required_by_default = true 108 | 109 | # Tell browsers whether to use the native HTML5 validations (novalidate form option). 110 | # These validations are enabled in SimpleForm's internal config but disabled by default 111 | # in this configuration, which is recommended due to some quirks from different browsers. 112 | # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations, 113 | # change this configuration to true. 114 | config.browser_validations = false 115 | 116 | # Collection of methods to detect if a file type was given. 117 | # config.file_methods = [ :mounted_as, :file?, :public_filename ] 118 | 119 | # Custom mappings for input types. This should be a hash containing a regexp 120 | # to match as key, and the input type that will be used when the field name 121 | # matches the regexp as value. 122 | # config.input_mappings = { /count/ => :integer } 123 | 124 | # Custom wrappers for input types. This should be a hash containing an input 125 | # type as key and the wrapper that will be used for all inputs with specified type. 126 | # config.wrapper_mappings = { string: :prepend } 127 | 128 | # Default priority for time_zone inputs. 129 | # config.time_zone_priority = nil 130 | 131 | # Default priority for country inputs. 132 | # config.country_priority = nil 133 | 134 | # When false, do not use translations for labels. 135 | # config.translate_labels = true 136 | 137 | # Automatically discover new inputs in Rails' autoload path. 138 | # config.inputs_discovery = true 139 | 140 | # Cache SimpleForm inputs discovery 141 | # config.cache_discovery = !Rails.env.development? 142 | end 143 | -------------------------------------------------------------------------------- /config/initializers/devise.rb: -------------------------------------------------------------------------------- 1 | # Use this hook to configure devise mailer, warden hooks and so forth. 2 | # Many of these configuration options can be set straight in your model. 3 | Devise.setup do |config| 4 | # ==> Mailer Configuration 5 | # Configure the e-mail address which will be shown in Devise::Mailer, 6 | # note that it will be overwritten if you use your own mailer class with default "from" parameter. 7 | config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com" 8 | 9 | # Configure the class responsible to send e-mails. 10 | # config.mailer = "Devise::Mailer" 11 | 12 | # ==> ORM configuration 13 | # Load and configure the ORM. Supports :active_record (default) and 14 | # :mongoid (bson_ext recommended) by default. Other ORMs may be 15 | # available as additional gems. 16 | require 'devise/orm/active_record' 17 | 18 | # ==> Configuration for any authentication mechanism 19 | # Configure which keys are used when authenticating a user. The default is 20 | # just :email. You can configure it to use [:username, :subdomain], so for 21 | # authenticating a user, both parameters are required. Remember that those 22 | # parameters are used only when authenticating and not when retrieving from 23 | # session. If you need permissions, you should implement that in a before filter. 24 | # You can also supply a hash where the value is a boolean determining whether 25 | # or not authentication should be aborted when the value is not present. 26 | config.authentication_keys = [ :email ] 27 | 28 | # Configure parameters from the request object used for authentication. Each entry 29 | # given should be a request method and it will automatically be passed to the 30 | # find_for_authentication method and considered in your model lookup. For instance, 31 | # if you set :request_keys to [:subdomain], :subdomain will be used on authentication. 32 | # The same considerations mentioned for authentication_keys also apply to request_keys. 33 | # config.request_keys = [] 34 | 35 | # Configure which authentication keys should be case-insensitive. 36 | # These keys will be downcased upon creating or modifying a user and when used 37 | # to authenticate or find a user. Default is :email. 38 | config.case_insensitive_keys = [ :email ] 39 | 40 | # Configure which authentication keys should have whitespace stripped. 41 | # These keys will have whitespace before and after removed upon creating or 42 | # modifying a user and when used to authenticate or find a user. Default is :email. 43 | config.strip_whitespace_keys = [ :email ] 44 | 45 | # Tell if authentication through request.params is enabled. True by default. 46 | # config.params_authenticatable = true 47 | 48 | # Tell if authentication through HTTP Basic Auth is enabled. False by default. 49 | # config.http_authenticatable = false 50 | 51 | # If http headers should be returned for AJAX requests. True by default. 52 | # config.http_authenticatable_on_xhr = true 53 | 54 | # The realm used in Http Basic Authentication. "Application" by default. 55 | # config.http_authentication_realm = "Application" 56 | 57 | # It will change confirmation, password recovery and other workflows 58 | # to behave the same regardless if the e-mail provided was right or wrong. 59 | # Does not affect registerable. 60 | # config.paranoid = true 61 | 62 | # ==> Configuration for :database_authenticatable 63 | # For bcrypt, this is the cost for hashing the password and defaults to 10. If 64 | # using other encryptors, it sets how many times you want the password re-encrypted. 65 | # 66 | # Limiting the stretches to just one in testing will increase the performance of 67 | # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use 68 | # a value less than 10 in other environments. 69 | config.stretches = Rails.env.test? ? 1 : 10 70 | 71 | # Setup a pepper to generate the encrypted password. 72 | # config.pepper = "96a489e20b7c4846dc9437a94819aa225b45bfe2379231848b36d8fd5a104711fc145322fc5782379cdf93bf80a00de0792d7468e8f1c8d39ccea270008027d1" 73 | 74 | # ==> Configuration for :confirmable 75 | # A period that the user is allowed to access the website even without 76 | # confirming his account. For instance, if set to 2.days, the user will be 77 | # able to access the website for two days without confirming his account, 78 | # access will be blocked just in the third day. Default is 0.days, meaning 79 | # the user cannot access the website without confirming his account. 80 | # config.confirm_within = 2.days 81 | 82 | # Defines which key will be used when confirming an account 83 | # config.confirmation_keys = [ :email ] 84 | 85 | # ==> Configuration for :rememberable 86 | # The time the user will be remembered without asking for credentials again. 87 | # config.remember_for = 2.weeks 88 | 89 | # If true, a valid remember token can be re-used between multiple browsers. 90 | # config.remember_across_browsers = true 91 | 92 | # If true, extends the user's remember period when remembered via cookie. 93 | # config.extend_remember_period = false 94 | 95 | # If true, uses the password salt as remember token. This should be turned 96 | # to false if you are not using database authenticatable. 97 | config.use_salt_as_remember_token = true 98 | 99 | # Options to be passed to the created cookie. For instance, you can set 100 | # :secure => true in order to force SSL only cookies. 101 | # config.cookie_options = {} 102 | 103 | # ==> Configuration for :validatable 104 | # Range for password length. Default is 6..128. 105 | # config.password_length = 6..128 106 | 107 | # Email regex used to validate email formats. It simply asserts that 108 | # an one (and only one) @ exists in the given string. This is mainly 109 | # to give user feedback and not to assert the e-mail validity. 110 | # config.email_regexp = /\A[^@]+@[^@]+\z/ 111 | 112 | # ==> Configuration for :timeoutable 113 | # The time you want to timeout the user session without activity. After this 114 | # time the user will be asked for credentials again. Default is 30 minutes. 115 | # config.timeout_in = 30.minutes 116 | 117 | # ==> Configuration for :lockable 118 | # Defines which strategy will be used to lock an account. 119 | # :failed_attempts = Locks an account after a number of failed attempts to sign in. 120 | # :none = No lock strategy. You should handle locking by yourself. 121 | # config.lock_strategy = :failed_attempts 122 | 123 | # Defines which key will be used when locking and unlocking an account 124 | # config.unlock_keys = [ :email ] 125 | 126 | # Defines which strategy will be used to unlock an account. 127 | # :email = Sends an unlock link to the user email 128 | # :time = Re-enables login after a certain amount of time (see :unlock_in below) 129 | # :both = Enables both strategies 130 | # :none = No unlock strategy. You should handle unlocking by yourself. 131 | # config.unlock_strategy = :both 132 | 133 | # Number of authentication tries before locking an account if lock_strategy 134 | # is failed attempts. 135 | # config.maximum_attempts = 20 136 | 137 | # Time interval to unlock the account if :time is enabled as unlock_strategy. 138 | # config.unlock_in = 1.hour 139 | 140 | # ==> Configuration for :recoverable 141 | # 142 | # Defines which key will be used when recovering the password for an account 143 | # config.reset_password_keys = [ :email ] 144 | 145 | # Time interval you can reset your password with a reset password key. 146 | # Don't put a too small interval or your users won't have the time to 147 | # change their passwords. 148 | config.reset_password_within = 2.hours 149 | 150 | # ==> Configuration for :encryptable 151 | # Allow you to use another encryption algorithm besides bcrypt (default). You can use 152 | # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1, 153 | # :authlogic_sha512 (then you should set stretches above to 20 for default behavior) 154 | # and :restful_authentication_sha1 (then you should set stretches to 10, and copy 155 | # REST_AUTH_SITE_KEY to pepper) 156 | # config.encryptor = :sha512 157 | 158 | # ==> Configuration for :token_authenticatable 159 | # Defines name of the authentication token params key 160 | # config.token_authentication_key = :auth_token 161 | 162 | # If true, authentication through token does not store user in session and needs 163 | # to be supplied on each request. Useful if you are using the token as API token. 164 | # config.stateless_token = false 165 | 166 | # ==> Scopes configuration 167 | # Turn scoped views on. Before rendering "sessions/new", it will first check for 168 | # "users/sessions/new". It's turned off by default because it's slower if you 169 | # are using only default views. 170 | # config.scoped_views = false 171 | 172 | # Configure the default scope given to Warden. By default it's the first 173 | # devise role declared in your routes (usually :user). 174 | # config.default_scope = :user 175 | 176 | # Configure sign_out behavior. 177 | # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope). 178 | # The default is true, which means any logout action will sign out all active scopes. 179 | # config.sign_out_all_scopes = true 180 | 181 | # ==> Navigation configuration 182 | # Lists the formats that should be treated as navigational. Formats like 183 | # :html, should redirect to the sign in page when the user does not have 184 | # access, but formats like :xml or :json, should return 401. 185 | # 186 | # If you have any extra navigational formats, like :iphone or :mobile, you 187 | # should add them to the navigational formats lists. 188 | # 189 | # The :"*/*" and "*/*" formats below is required to match Internet 190 | # Explorer requests. 191 | # config.navigational_formats = [:"*/*", "*/*", :html] 192 | 193 | # The default HTTP method used to sign out a resource. Default is :delete. 194 | config.sign_out_via = :get 195 | 196 | # ==> OmniAuth 197 | # Add a new OmniAuth provider. Check the wiki for more information on setting 198 | # up on your models and hooks. 199 | # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo' 200 | 201 | # ==> Warden configuration 202 | # If you want to use other strategies, that are not supported by Devise, or 203 | # change the failure app, you can configure them inside the config.warden block. 204 | # 205 | # config.warden do |manager| 206 | # manager.intercept_401 = false 207 | # manager.default_strategies(:scope => :user).unshift :some_external_strategy 208 | # end 209 | end 210 | -------------------------------------------------------------------------------- /app/assets/stylesheets/foundation_and_overrides.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Foundation Variables 3 | // 4 | 5 | // The default font-size is set to 100% of the browser style sheet (usually 16px) 6 | // for compatibility with browser-based text zoom or user-set defaults. 7 | $base-font-size: 100% !default; 8 | 9 | // $base-line-height is 24px while $base-font-size is 16px 10 | // $base-line-height: 150%; 11 | 12 | // This is the default html and body font-size for the base em value. 13 | 14 | // Since the typical default browser font-size is 16px, that makes the calculation for grid size. 15 | // If you want your base font-size to be a different size and not have it effect grid size too, 16 | // set the value of $em-base to $base-font-size ($em-base: $base-font-size;) 17 | $em-base: 16px !default; 18 | 19 | // Working in ems is annoying. Think in pixels by using this handy function, emCalc(#px) 20 | @function emCalc($pxWidth) { 21 | @return $pxWidth / $em-base * 1em; 22 | } 23 | 24 | // Change whether or not you include browser prefixes 25 | // $experimental: true; 26 | 27 | // Various global styles 28 | 29 | $default-float: left; 30 | 31 | // $body-bg: #fff; 32 | // $body-font-color: #222; 33 | // $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; 34 | // $body-font-weight: normal; 35 | // $body-font-style: normal; 36 | 37 | // Font-smoothing 38 | 39 | // $font-smoothing: antialiased; 40 | 41 | // Text direction settings 42 | 43 | // $text-direction: ltr; 44 | 45 | // Colors 46 | 47 | // $primary-color: #2ba6cb; 48 | // $secondary-color: #e9e9e9; 49 | // $alert-color: #c60f13; 50 | // $success-color: #5da423; 51 | 52 | // Make sure border radius matches unless we want it different. 53 | 54 | // $global-radius: 3px; 55 | // $global-rounded: 1000px; 56 | 57 | // Inset shadow shiny edges and depressions. 58 | 59 | // $shiny-edge-size: 0 1px 0; 60 | // $shiny-edge-color: rgba(#fff, .5); 61 | // $shiny-edge-active-color: rgba(#000, .2); 62 | 63 | // Control whether or not CSS classes come through in the CSS files. 64 | 65 | // $include-html-classes: true; 66 | // $include-print-styles: true; 67 | // $include-html-global-classes: $include-html-classes; 68 | // $include-html-type-classes: $include-html-classes; 69 | // $include-html-grid-classes: $include-html-classes; 70 | // $include-html-visibility-classes: $include-html-classes; 71 | // $include-html-button-classes: $include-html-classes; 72 | // $include-html-form-classes: $include-html-classes; 73 | // $include-html-custom-form-classes: $include-html-classes; 74 | // $include-html-media-classes: $include-html-classes; 75 | // $include-html-section-classes: $include-html-classes; 76 | // $include-html-orbit-classes: $include-html-classes; 77 | // $include-html-reveal-classes: $include-html-classes; 78 | // $include-html-joyride-classes: $include-html-classes; 79 | // $include-html-clearing-classes: $include-html-classes; 80 | // $include-html-alert-classes: $include-html-classes; 81 | // $include-html-nav-classes: $include-html-classes; 82 | // $include-html-top-bar-classes: $include-html-classes; 83 | // $include-html-label-classes: $include-html-classes; 84 | // $include-html-panel-classes: $include-html-classes; 85 | // $include-html-pricing-classes: $include-html-classes; 86 | // $include-html-progress-classes: $include-html-classes; 87 | // $include-html-magellan-classes: $include-html-classes; 88 | // $include-html-tooltip-classes: $include-html-classes; 89 | 90 | // Media Queries 91 | 92 | // $small-screen: 768px; 93 | // $medium-screen: 1280px; 94 | // $large-screen: 1440px; 95 | 96 | // $screen: "only screen"; 97 | // $small: "only screen and (min-width: #{$small-screen})"; 98 | // $medium: "only screen and (min-width: #{$medium-screen})"; 99 | // $large: "only screen and (min-width: #{$large-screen})"; 100 | // $landscape: "only screen and (orientation: landscape)"; 101 | // $portrait: "only screen and (orientation: portrait)"; 102 | 103 | //// Cursors 104 | 105 | //Custom use example -> $cursor-default-value: url(http://cursors-site.net/path/to/custom/cursor/default.cur),progress; 106 | 107 | // $cursor-crosshair-value: "crosshair"; 108 | // $cursor-default-value: "default"; 109 | // $cursor-pointer-value: "pointer"; 110 | // $cursor-help-value: "help"; 111 | 112 | // 113 | // Grid Variables 114 | // 115 | 116 | // $row-width: emCalc(1000px); 117 | // $column-gutter: emCalc(30px); 118 | // $total-columns: 12; 119 | 120 | // 121 | // Block Grid Variables 122 | // 123 | 124 | // Maximum number of block grid elements per row 125 | 126 | // $block-grid-elements: 12; 127 | // $block-grid-default-spacing: emCalc(20px); 128 | 129 | // Enables media queries for block-grid classes. Set to false if writing semantic HTML. 130 | 131 | // $block-grid-media-queries: true; 132 | 133 | // 134 | // Typography Variables 135 | // 136 | 137 | // Heading font styles 138 | 139 | // $header-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; 140 | // $header-font-weight: bold; 141 | // $header-font-style: normal; 142 | // $header-font-color: #222; 143 | // $header-line-height: 1.4; 144 | // $header-top-margin: .2em; 145 | // $header-bottom-margin: .5em; 146 | // $header-text-rendering: optimizeLegibility; 147 | 148 | // Heading font sizes 149 | 150 | // $h1-font-size: emCalc(44px); 151 | // $h2-font-size: emCalc(37px); 152 | // $h3-font-size: emCalc(27px); 153 | // $h4-font-size: emCalc(23px); 154 | // $h5-font-size: emCalc(18px); 155 | // $h6-font-size: 1em; 156 | 157 | // Subheaders 158 | 159 | // $subheader-line-height: 1.4; 160 | // $subheader-font-color: lighten($header-font-color, 30%); 161 | // $subheader-font-weight: 300; 162 | // $subheader-top-margin: .2em; 163 | // $subheader-bottom-margin: .5em; 164 | 165 | // styling 166 | 167 | // $small-font-size: 60%; 168 | // $small-font-color: lighten($header-font-color, 30%); 169 | 170 | // Paragraphs 171 | 172 | // $paragraph-font-family: inherit; 173 | // $paragraph-font-weight: normal; 174 | // $paragraph-font-size: 1em; 175 | // $paragraph-line-height: 1.6; 176 | // $paragraph-margin-bottom: emCalc(20px); 177 | // $paragraph-aside-font-size: emCalc(14px); 178 | // $paragraph-aside-line-height: 1.35; 179 | // $paragraph-aside-font-style: italic; 180 | 181 | // tags 182 | 183 | // $code-color: darken($alert-color, 15%); 184 | // $code-font-family: Consolas, 'Liberation Mono', Courier, monospace; 185 | // $code-font-weight: bold; 186 | 187 | // Anchors 188 | 189 | // $anchor-text-decoration: none; 190 | // $anchor-font-color: $primary-color; 191 | // $anchor-font-color-hover: darken($primary-color, 5%); 192 | 193 | //
element 194 | 195 | // $hr-border-width: 1px; 196 | // $hr-border-style: solid; 197 | // $hr-border-color: #ddd; 198 | // $hr-margin: emCalc(20px); 199 | 200 | // Lists 201 | 202 | // $list-style-position: outside; 203 | // $list-side-margin: emCalc(20px); 204 | // $list-nested-margin: emCalc(20px); 205 | // $definition-list-header-weight: bold; 206 | // $definition-list-header-margin-bottom: .3em; 207 | // $definition-list-margin-bottom: emCalc(12px); 208 | 209 | // Blockquotes 210 | 211 | // $blockquote-font-color: lighten($header-font-color, 30%); 212 | // $blockquote-padding: emCalc(9px) emCalc(20px) 0 emCalc(19px); 213 | // $blockquote-border: 1px solid #ddd; 214 | // $blockquote-cite-font-size: emCalc(13px); 215 | // $blockquote-cite-font-color: lighten($header-font-color, 20%); 216 | // $blockquote-cite-link-color: $blockquote-cite-font-color; 217 | 218 | // Acronym 219 | 220 | // $acronym-underline: 1px dotted #ddd; 221 | 222 | // Padding and margin 223 | 224 | // $microformat-padding: emCalc(10px) emCalc(12px); 225 | // $microformat-margin: 0 0 emCalc(20px) 0; 226 | 227 | // Border styles 228 | 229 | // $microformat-border-width: 1px; 230 | // $microformat-border-style: solid; 231 | // $microformat-border-color: #ddd; 232 | 233 | // Full name font styles 234 | 235 | // $microformat-fullname-font-weight: bold; 236 | // $microformat-fullname-font-size: emCalc(15px); 237 | 238 | // Summary font styles 239 | 240 | // $microformat-summary-font-weight: bold; 241 | 242 | // padding 243 | 244 | // $microformat-abbr-padding: 0 emCalc(1px); 245 | 246 | // font styles 247 | 248 | // $microformat-abbr-font-weight: bold; 249 | // $microformat-abbr-font-decoration: none; 250 | 251 | // 252 | // Form Variables 253 | // 254 | 255 | // Base for lots of form spacing and positioning styles 256 | 257 | // $form-spacing: emCalc(16px); 258 | 259 | // Labels 260 | 261 | // $form-label-pointer: pointer; 262 | // $form-label-font-size: emCalc(14px); 263 | // $form-label-font-weight: 500; 264 | // $form-label-font-color: lighten(#000, 30%); 265 | // $form-label-bottom-margin: emCalc(3px); 266 | // $input-font-family: inherit; 267 | // $input-font-color: rgba(0,0,0,0.75); 268 | // $input-font-size: emCalc(14px); 269 | // $input-bg-color: #fff; 270 | // $input-focus-bg-color: darken(#fff, 2%); 271 | // $input-border-color: darken(#fff, 20%); 272 | // $input-focus-border-color: darken(#fff, 40%); 273 | // $input-border-style: solid; 274 | // $input-border-width: 1px; 275 | // $input-disabled-bg: #ddd; 276 | // $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 277 | // $input-include-glowing-effect: true; 278 | 279 | // Fieldset border and spacing. 280 | 281 | // $fieldset-border-style: solid; 282 | // $fieldset-border-width: 1px; 283 | // $fieldset-border-color: #ddd; 284 | // $fieldset-padding: emCalc(20px); 285 | // $fieldset-margin: emCalc(18px) 0; 286 | 287 | // Legends 288 | 289 | // $legend-bg: #fff; 290 | // $legend-font-weight: bold; 291 | // $legend-padding: 0 emCalc(3px); 292 | 293 | // Prefix and postfix input elements 294 | 295 | // $input-prefix-bg: darken(#fff, 5%); 296 | // $input-prefix-border-color: darken(#fff, 20%); 297 | // $input-prefix-border-size: 1px; 298 | // $input-prefix-border-type: solid; 299 | // $input-prefix-overflow: hidden; 300 | // $input-prefix-font-color: #333; 301 | // $input-prefix-font-color-alt: #fff; 302 | 303 | // Error states for inputs and labels 304 | 305 | // $input-error-message-padding: emCalc(6px) emCalc(4px); 306 | // $input-error-message-top: -($form-spacing) - emCalc(5px); 307 | // $input-error-message-font-size: emCalc(12px); 308 | // $input-error-message-font-weight: bold; 309 | // $input-error-message-font-color: #fff; 310 | // $input-error-message-font-color-alt: #333; 311 | 312 | // Glowing effect of inputs when focused 313 | 314 | // $glowing-effect-fade-time: 0.45s; 315 | // $glowing-effect-color: $input-focus-border-color; 316 | 317 | // 318 | // Button Variables 319 | // 320 | 321 | // Padding for buttons. 322 | 323 | // $button-tny: emCalc(7px); 324 | // $button-sml: emCalc(9px); 325 | // $button-med: emCalc(12px); 326 | // $button-lrg: emCalc(16px); 327 | 328 | // Display property. 329 | 330 | // $button-display: inline-block; 331 | // $button-margin-bottom: emCalc(20px); 332 | 333 | // Button text styles. 334 | 335 | // $button-font-family: inherit; 336 | // $button-font-color: #fff; 337 | // $button-font-color-alt: #333; 338 | // $button-font-med: emCalc(16px); 339 | // $button-font-tny: emCalc(11px); 340 | // $button-font-sml: emCalc(13px); 341 | // $button-font-lrg: emCalc(20px); 342 | // $button-font-weight: bold; 343 | // $button-font-align: center; 344 | 345 | // Various hover effects. 346 | 347 | // $button-function-factor: 10%; 348 | 349 | // Button border styles. 350 | 351 | // $button-border-width: 1px; 352 | // $button-border-style: solid; 353 | // $button-border-color: darken($primary-color, $button-function-factor); 354 | 355 | // Radius used throughout the core. 356 | 357 | // $button-radius: $global-radius; 358 | 359 | // Opacity for disabled buttons. 360 | 361 | // $button-disabled-opacity: 0.6; 362 | 363 | // 364 | // Button Groups 365 | // 366 | 367 | // Sets the margin for the right side by default, and the left margin if right-to-left direction is used 368 | 369 | // $button-bar-margin-opposite: emCalc(10px); 370 | 371 | // 372 | // Dropdown Button Variables 373 | // 374 | 375 | // Color of the pip in dropdown buttons 376 | 377 | // $dropdown-button-pip-color: #fff; 378 | // $dropdown-button-pip-color-alt: #333; 379 | 380 | // Tiny dropdown buttons 381 | 382 | // $dropdown-button-padding-tny: $button-tny * 5; 383 | // $dropdown-button-pip-size-tny: $button-tny; 384 | // $dropdown-button-pip-right-tny: $button-tny * 2; 385 | // $dropdown-button-pip-top-tny: -$button-tny / 2 + emCalc(1px); 386 | 387 | // Small dropdown buttons 388 | 389 | // $dropdown-button-padding-sml: $button-sml * 5; 390 | // $dropdown-button-pip-size-sml: $button-sml; 391 | // $dropdown-button-pip-right-sml: $button-sml * 2; 392 | // $dropdown-button-pip-top-sml: -$button-sml / 2 + emCalc(1px); 393 | 394 | // Medium dropdown buttons 395 | 396 | // $dropdown-button-padding-med: $button-med * 4 + emCalc(3px); 397 | // $dropdown-button-pip-size-med: $button-med - emCalc(3px); 398 | // $dropdown-button-pip-right-med: $button-med * 2; 399 | // $dropdown-button-pip-top-med: -$button-med / 2 + emCalc(2px); 400 | 401 | // Large dropdown buttons 402 | 403 | // $dropdown-button-padding-lrg: $button-lrg * 4; 404 | // $dropdown-button-pip-size-lrg: $button-lrg - emCalc(6px); 405 | // $dropdown-button-pip-right-lrg: $button-lrg + emCalc(12px); 406 | // $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3px); 407 | 408 | // 409 | // Split Button Variables 410 | // 411 | 412 | // Shared styles for Split Buttons 413 | 414 | // $split-button-function-factor: 15%; 415 | // $split-button-pip-color: #fff; 416 | // $split-button-pip-color-alt: #333; 417 | // $split-button-active-bg-tint: rgba(0,0,0,0.1); 418 | 419 | // Tiny split buttons 420 | 421 | // $split-button-padding-tny: $button-tny * 9; 422 | // $split-button-span-width-tny: $button-tny * 6.5; 423 | // $split-button-pip-size-tny: $button-tny; 424 | // $split-button-pip-top-tny: $button-tny * 2; 425 | // $split-button-pip-left-tny: emCalc(-5px); 426 | 427 | // Small split buttons 428 | 429 | // $split-button-padding-sml: $button-sml * 7; 430 | // $split-button-span-width-sml: $button-sml * 5; 431 | // $split-button-pip-size-sml: $button-sml; 432 | // $split-button-pip-top-sml: $button-sml * 1.5; 433 | // $split-button-pip-left-sml: emCalc(-9px); 434 | 435 | // Medium split buttons 436 | 437 | // $split-button-padding-med: $button-med * 6.4; 438 | // $split-button-span-width-med: $button-med * 4; 439 | // $split-button-pip-size-med: $button-med - emCalc(3px); 440 | // $split-button-pip-top-med: $button-med * 1.5; 441 | // $split-button-pip-left-med: emCalc(-9px); 442 | 443 | // Large split buttons 444 | 445 | // $split-button-padding-lrg: $button-lrg * 6; 446 | // $split-button-span-width-lrg: $button-lrg * 3.75; 447 | // $split-button-pip-size-lrg: $button-lrg - emCalc(6px); 448 | // $split-button-pip-top-lrg: $button-lrg + emCalc(5px); 449 | // $split-button-pip-left-lrg: emCalc(-9px); 450 | 451 | // 452 | // Alert Variables 453 | // 454 | 455 | // Alert padding 456 | 457 | // $alert-padding-top: emCalc(11px); 458 | // $alert-padding-default-float: $alert-padding-top; 459 | // $alert-padding-opposite-direction: $alert-padding-top + emCalc(10px); 460 | // $alert-padding-bottom: $alert-padding-top + emCalc(1px); 461 | 462 | // Text style 463 | 464 | // $alert-font-weight: bold; 465 | // $alert-font-size: emCalc(14px); 466 | // $alert-font-color: #fff; 467 | // $alert-font-color-alt: darken($secondary-color, 60%); 468 | 469 | // Hover effect 470 | 471 | // $alert-function-factor: 10%; 472 | 473 | // Border Styles 474 | 475 | // $alert-border-style: solid; 476 | // $alert-border-width: 1px; 477 | // $alert-border-color: darken($primary-color, $alert-function-factor); 478 | // $alert-bottom-margin: emCalc(20px); 479 | 480 | // Close Button style 481 | 482 | // $alert-close-color: #333; 483 | // $alert-close-position: emCalc(5px); 484 | // $alert-close-font-size: emCalc(22px); 485 | // $alert-close-opacity: 0.3; 486 | // $alert-close-opacity-hover: 0.5; 487 | // $alert-close-padding: 5px 4px 4px; 488 | 489 | // Border radius 490 | 491 | // $alert-radius: $global-radius; 492 | 493 | 494 | // 495 | // Breadcrumb Variables 496 | // 497 | 498 | // Background color for the breadcrumb container. 499 | 500 | // $crumb-bg: lighten($secondary-color, 5%); 501 | 502 | // Padding around the breadcrumbs. 503 | 504 | // $crumb-padding: emCalc(6px) emCalc(14px) emCalc(9px); 505 | // $crumb-side-padding: emCalc(12px); 506 | 507 | // Border styles. 508 | 509 | // $crumb-function-factor: 10%; 510 | // $crumb-border-size: 1px; 511 | // $crumb-border-style: solid; 512 | // $crumb-border-color: darken($crumb-bg, $crumb-function-factor); 513 | // $crumb-radius: $global-radius; 514 | 515 | // Various text styles for breadcrumbs. 516 | 517 | // $crumb-font-size: emCalc(11px); 518 | // $crumb-font-color: $primary-color; 519 | // $crumb-font-color-current: #333; 520 | // $crumb-font-color-unavailable: #999; 521 | // $crumb-font-transform: uppercase; 522 | // $crumb-link-decor: underline; 523 | 524 | // Slash between breadcrumbs 525 | 526 | // $crumb-slash-color: #aaa; 527 | // $crumb-slash: "/"; 528 | 529 | // 530 | // Clearing Variables 531 | // 532 | 533 | // Background colors for parts of Clearing. 534 | 535 | // $clearing-bg: #111; 536 | // $clearing-caption-bg: $clearing-bg; 537 | // $clearing-carousel-bg: #111; 538 | // $clearing-img-bg: $clearing-bg; 539 | 540 | // Close button 541 | 542 | // $clearing-close-color: #fff; 543 | // $clearing-close-size: 40px; 544 | 545 | // Style the arrows 546 | 547 | // $clearing-arrow-size: 16px; 548 | // $clearing-arrow-color: $clearing-close-color; 549 | 550 | // Style captions 551 | 552 | // $clearing-caption-font-color: #fff; 553 | // $clearing-caption-padding: 10px 30px; 554 | 555 | // Make the image and carousel height and style 556 | 557 | // $clearing-active-img-height: 75%; 558 | // $clearing-carousel-height: 150px; 559 | // $clearing-carousel-thumb-width: 175px; 560 | // $clearing-carousel-thumb-active-border: 4px solid rgb(255,255,255); 561 | 562 | // 563 | // Custom Form Variables 564 | // 565 | 566 | // Basic form styles input styles 567 | 568 | // $custom-form-border-color: #ccc; 569 | // $custom-form-border-size: 1px; 570 | // $custom-form-bg: #fff; 571 | // $custom-form-bg-disabled: #ddd; 572 | // $custom-form-input-size: 16px; 573 | // $custom-form-check-color: #222; 574 | // $custom-form-check-size: 14px; 575 | // $custom-form-radio-size: 8px; 576 | // $custom-form-checkbox-radius: 0px; 577 | 578 | // Custom select form element. 579 | 580 | // $custom-select-bg: #fff; 581 | // $custom-select-fade-to-color: #f3f3f3; 582 | // $custom-select-border-color: #ddd; 583 | // $custom-select-triangle-color: #aaa; 584 | // $custom-select-triangle-color-open: #222; 585 | // $custom-select-height: emCalc(13px) + ($form-spacing * 1.5); 586 | // $custom-select-margin-bottom: emCalc(20px); 587 | // $custom-select-font-color-selected: #141414; 588 | // $custom-select-disabled-color: #888; 589 | 590 | // Custom select dropdown element. 591 | 592 | // $custom-dropdown-height: 200px; 593 | // $custom-dropdown-bg: #fff; 594 | // $custom-dropdown-border-color: darken(#fff, 20%); 595 | // $custom-dropdown-border-width: 1px; 596 | // $custom-dropdown-border-style: solid; 597 | // $custom-dropdown-font-color: #555; 598 | // $custom-dropdown-font-size: emCalc(14px); 599 | // $custom-dropdown-color-selected: #eeeeee; 600 | // $custom-dropdown-font-color-selected: #000; 601 | // $custom-dropdown-shadow: 0 2px 2px 0px rgba(0,0,0,0.1); 602 | // $custom-dropdown-offset-top: none; 603 | // $custom-dropdown-list-padding: emCalc(4px); 604 | // $custom-dropdown-left-padding: emCalc(6px); 605 | // $custom-dropdown-right-padding: emCalc(38px); 606 | // $custom-dropdown-list-item-min-height: emCalc(24px); 607 | 608 | // 609 | // Dropdown Variables 610 | // 611 | 612 | // Height and width styles. 613 | 614 | // $f-dropdown-max-width: 200px; 615 | // $f-dropdown-height: auto; 616 | // $f-dropdown-max-height: none; 617 | // $f-dropdown-margin-top: 2px; 618 | 619 | // Background color 620 | 621 | // $f-dropdown-bg: #fff; 622 | 623 | // Border styles for dropdowns. 624 | 625 | // $f-dropdown-border-style: solid; 626 | // $f-dropdown-border-width: 1px; 627 | // $f-dropdown-border-color: darken(#fff, 20%); 628 | 629 | // Triangle pip. 630 | 631 | // $f-dropdown-triangle-size: 6px; 632 | // $f-dropdown-triangle-color: #fff; 633 | // $f-dropdown-triangle-side-offset: 10px; 634 | 635 | // List elements. 636 | 637 | // $f-dropdown-list-style: none; 638 | // $f-dropdown-font-color: #555; 639 | // $f-dropdown-font-size: emCalc(14px); 640 | // $f-dropdown-list-padding: emCalc(5px) emCalc(10px); 641 | // $f-dropdown-line-height: emCalc(18px); 642 | // $f-dropdown-list-hover-bg: #eeeeee; 643 | // $dropdown-mobile-left: 0; 644 | 645 | // When the dropdown has custom content. 646 | 647 | // $f-dropdown-content-padding: emCalc(20px); 648 | 649 | // 650 | // Flex Video Variables 651 | // 652 | 653 | // Video container padding and margins 654 | 655 | // $flex-video-padding-top: emCalc(25px); 656 | // $flex-video-padding-bottom: 67.5%; 657 | // $flex-video-margin-bottom: emCalc(16px); 658 | 659 | // Widescreen bottom padding 660 | 661 | // $flex-video-widescreen-padding-bottom: 57.25%; 662 | 663 | // 664 | // Inline List Variables 665 | // 666 | 667 | // Margins and padding of the inline list. 668 | 669 | // $inline-list-margin-bottom: emCalc(17px) emCalc(-22px ); 670 | // $inline-list-margin: 0 0; 671 | // $inline-list-padding: 0; 672 | 673 | // Overflow of the inline list. 674 | 675 | // $inline-list-overflow: hidden; 676 | 677 | // List items 678 | 679 | // $inline-list-display: block; 680 | 681 | // Elments within list items 682 | 683 | // $inline-list-children-display: block; 684 | 685 | // 686 | // Joyride Variables 687 | // 688 | 689 | // Joyride styles 690 | 691 | // $joyride-tip-bg: rgb(0,0,0); 692 | // $joyride-tip-default-width: 300px; 693 | // $joyride-tip-padding: emCalc(18px) emCalc(20px) emCalc(24px); 694 | // $joyride-tip-border: solid 1px #555; 695 | // $joyride-tip-radius: 4px; 696 | // $joyride-tip-position-offset: 22px; 697 | 698 | // Tip font styles 699 | 700 | // $joyride-tip-font-color: #fff; 701 | // $joyride-tip-font-size: emCalc(14px); 702 | // $joyride-tip-header-weight: bold; 703 | 704 | // Changes the nub size 705 | 706 | // $joyride-tip-nub-size: 14px; 707 | 708 | // Adjusts the styles for the timer when its enabled 709 | 710 | // $joyride-tip-timer-width: 50px; 711 | // $joyride-tip-timer-height: 3px; 712 | // $joyride-tip-timer-color: #666; 713 | 714 | // Changes up the styles for the close button 715 | 716 | // $joyride-tip-close-color: #777; 717 | // $joyride-tip-close-size: 30px; 718 | // $joyride-tip-close-weight: normal; 719 | 720 | // When Joyride is filling the screen, style for the bg 721 | 722 | // $joyride-screenfill: rgba(0,0,0,0.5); 723 | 724 | // 725 | // Keystroke Variables 726 | // 727 | 728 | // Text styles. 729 | 730 | // $keystroke-font: "Consolas", "Menlo", "Courier", monospace; 731 | // $keystroke-font-size: emCalc(15px); 732 | // $keystroke-font-color: #222; 733 | // $keystroke-font-color-alt: #fff; 734 | // $keystroke-function-factor: 7%; 735 | 736 | // Keystroke padding. 737 | 738 | // $keystroke-padding: emCalc(2px) emCalc(4px) emCalc(0px); 739 | 740 | // Background and border styles. 741 | 742 | // $keystroke-bg: darken(#fff, $keystroke-function-factor); 743 | // $keystroke-border-style: solid; 744 | // $keystroke-border-width: 1px; 745 | // $keystroke-border-color: darken($keystroke-bg, $keystroke-function-factor); 746 | // $keystroke-radius: $global-radius; 747 | 748 | // 749 | // Label Variables 750 | // 751 | 752 | // Style the labels 753 | 754 | // $label-padding: emCalc(3px) emCalc(10px) emCalc(4px); 755 | // $label-radius: $global-radius; 756 | 757 | // We use these to style the label text 758 | 759 | // $label-font-sizing: emCalc(14px); 760 | // $label-font-weight: bold; 761 | // $label-font-color: #333; 762 | // $label-font-color-alt: #fff; 763 | 764 | // 765 | // Magellan Variables 766 | // 767 | 768 | // Basic visual styles 769 | 770 | // $magellan-bg: #fff; 771 | // $magellan-padding: 10px; 772 | 773 | // 774 | // Orbit Settings 775 | // 776 | 777 | // Caption styles 778 | 779 | // $orbit-container-bg: #f5f5f5; 780 | // $orbit-caption-bg-old: rgb(0,0,0); 781 | // $orbit-caption-bg: rgba(0,0,0,0.6); 782 | // $orbit-caption-font-color: #fff; 783 | 784 | // Left/right nav styles 785 | 786 | // $orbit-nav-bg-old: rgb(0,0,0); 787 | // $orbit-nav-bg: rgba(0,0,0,0.6); 788 | 789 | // Timer styles 790 | 791 | // $orbit-timer-bg-old: rgb(0,0,0); 792 | // $orbit-timer-bg: rgba(0,0,0,0.6); 793 | 794 | // Bullet nav styles 795 | 796 | // $orbit-bullet-nav-color: #999; 797 | // $orbit-bullet-nav-color-active: #222; 798 | 799 | // Slide numbers 800 | 801 | // $orbit-slide-number-bg: rgba(0,0,0,0); 802 | // $orbit-slide-number-font-color: #fff; 803 | // $orbit-slide-number-padding: emCalc(5px); 804 | 805 | // Graceful Loading Wrapper and preloader 806 | 807 | // $wrapper-class: "slideshow-wrapper"; 808 | // $preloader-class: "preloader" ; 809 | 810 | // 811 | // Pagination Variables 812 | // 813 | 814 | // Pagination container 815 | 816 | // $pagination-height: emCalc(24px); 817 | // $pagination-margin: emCalc(-5px); 818 | 819 | // List-item properties 820 | 821 | // $pagination-li-float: $default-float; 822 | // $pagination-li-height: emCalc(24px); 823 | // $pagination-li-font-color: #222; 824 | // $pagination-li-font-size: emCalc(14px); 825 | // $pagination-li-margin: emCalc(5px); 826 | 827 | // Pagination anchor links 828 | 829 | // $pagination-link-pad: emCalc(1px) emCalc(7px) emCalc(1px); 830 | // $pagination-link-font-color: #999; 831 | // $pagination-link-active-bg: darken(#fff, 10%); 832 | 833 | // Disabled anchor links 834 | 835 | // $pagination-link-unavailable-cursor: $cursor-default-value; 836 | // $pagination-link-unavailable-font-color: #999; 837 | // $pagination-link-unavailable-bg-active: transparent; 838 | 839 | // Currently selected anchor links 840 | 841 | // $pagination-link-current-background: $primary-color; 842 | // $pagination-link-current-font-color: #fff; 843 | // $pagination-link-current-font-weight: bold; 844 | // $pagination-link-current-cursor: $cursor-default-value; 845 | // $pagination-link-current-active-bg: $primary-color; 846 | 847 | // 848 | // Panel Variables 849 | // 850 | 851 | // Background and border styles 852 | 853 | // $panel-bg: darken(#fff, 5%); 854 | // $panel-border-style: solid; 855 | // $panel-border-size: 1px; 856 | 857 | // Control how much we darken things on hover 858 | 859 | // $panel-function-factor: 10%; 860 | // $panel-border-color: darken($panel-bg, $panel-function-factor); 861 | 862 | // Inner padding and bottom margin 863 | 864 | // $panel-margin-bottom: emCalc(20px); 865 | // $panel-padding: emCalc(20px); 866 | 867 | // Font colors 868 | 869 | // $panel-font-color: #333; 870 | // $panel-font-color-alt: #fff; 871 | // $panel-header-adjust: true; // Set to false to keep default header styles 872 | 873 | // 874 | // Pricing Table Variables 875 | // 876 | 877 | // Border color 878 | 879 | // $price-table-border: solid 1px #ddd; 880 | 881 | // Bottom margin of the pricing table 882 | 883 | // $price-table-margin-bottom: emCalc(20px); 884 | 885 | // Control the title styles 886 | 887 | // $price-title-bg: #ddd; 888 | // $price-title-padding: emCalc(15px) emCalc(20px); 889 | // $price-title-align: center; 890 | // $price-title-color: #333; 891 | // $price-title-weight: bold; 892 | // $price-title-size: emCalc(16px); 893 | 894 | // Control the price styles 895 | 896 | // $price-money-bg: #eee; 897 | // $price-money-padding: emCalc(15px) emCalc(20px); 898 | // $price-money-align: center; 899 | // $price-money-color: #333; 900 | // $price-money-weight: normal; 901 | // $price-money-size: emCalc(20px); 902 | 903 | // Description styles 904 | 905 | // $price-bg: #fff; 906 | // $price-desc-color: #777; 907 | // $price-desc-padding: emCalc(15px); 908 | // $price-desc-align: center; 909 | // $price-desc-font-size: emCalc(12px); 910 | // $price-desc-weight: normal; 911 | // $price-desc-line-height: 1.4; 912 | // $price-desc-bottom-border: dotted 1px #ddd; 913 | 914 | // List item styles 915 | 916 | // $price-item-color: #333; 917 | // $price-item-padding: emCalc(15px); 918 | // $price-item-align: center; 919 | // $price-item-font-size: emCalc(14px); 920 | // $price-item-weight: normal; 921 | // $price-item-bottom-border: dotted 1px #ddd; 922 | 923 | // CTA area styles 924 | 925 | // $price-cta-bg: #f5f5f5; 926 | // $price-cta-align: center; 927 | // $price-cta-padding: emCalc(20px) emCalc(20px) 0; 928 | 929 | // 930 | // Progress Bar Variables 931 | // 932 | 933 | // Progress bar height 934 | 935 | // $progress-bar-height: emCalc(25px); 936 | // $progress-bar-color: transparent; 937 | 938 | // Border styles 939 | 940 | // $progress-bar-border-color: darken(#fff, 20%); 941 | // $progress-bar-border-size: 1px; 942 | // $progress-bar-border-style: solid; 943 | // $progress-bar-border-radius: $global-radius; 944 | 945 | // Margin & padding 946 | 947 | // $progress-bar-pad: emCalc(2px); 948 | // $progress-bar-margin-bottom: emCalc(10px); 949 | 950 | // Meter colors 951 | 952 | // $progress-meter-color: $primary-color; 953 | // $progress-meter-secondary-color: $secondary-color; 954 | // $progress-meter-success-color: $success-color; 955 | // $progress-meter-alert-color: $alert-color; 956 | 957 | // 958 | // Reveal Variables 959 | // 960 | 961 | // Reveal overlay. 962 | 963 | // $reveal-overlay-bg: rgba(#000, .45); 964 | // $reveal-overlay-bg-old: #000; 965 | 966 | // Modal itself. 967 | 968 | // $reveal-modal-bg: #fff; 969 | // $reveal-position-top: 50px; 970 | // $reveal-default-width: 80%; 971 | // $reveal-modal-padding: emCalc(20px); 972 | // $reveal-box-shadow: 0 0 10px rgba(#000,.4); 973 | 974 | // Reveal close button 975 | 976 | // $reveal-close-font-size: emCalc(22px); 977 | // $reveal-close-top: emCalc(8px); 978 | // $reveal-close-side: emCalc(11px); 979 | // $reveal-close-color: #aaa; 980 | // $reveal-close-weight: bold; 981 | 982 | // Modal border 983 | 984 | // $reveal-border-style: solid; 985 | // $reveal-border-width: 1px; 986 | // $reveal-border-color: #666; 987 | 988 | // $reveal-modal-class: "reveal-modal"; 989 | // $close-reveal-modal-class: "close-reveal-modal"; 990 | 991 | // 992 | // Section Variables 993 | // 994 | 995 | // Padding and hover factor 996 | 997 | // $section-title-padding: emCalc(15px); 998 | // $section-content-padding: emCalc(15px); 999 | // $section-function-factor: 10%; 1000 | 1001 | // Titles 1002 | 1003 | // $section-title-color: #333; 1004 | // $section-title-bg: #efefef; 1005 | // $section-title-bg-active: darken($section-title-bg, $section-function-factor); 1006 | // $section-title-bg-active-tabs: #fff; 1007 | // $section-title-bg-hover: darken($section-title-bg, $section-function-factor/2); 1008 | 1009 | // Border size 1010 | 1011 | // $section-border-size: 1px; 1012 | // $section-border-style: solid; 1013 | // $section-border-color: #ccc; 1014 | 1015 | // Font controls 1016 | 1017 | // $section-font-size: emCalc(14px); 1018 | 1019 | // Control the color of the background and some size options 1020 | 1021 | // $section-content-bg: #fff; 1022 | // $section-vertical-nav-min-width: emCalc(200px); 1023 | // $section-vertical-tabs-title-width: emCalc(200px); 1024 | // $section-bottom-margin: emCalc(20px); 1025 | 1026 | // $title-selector: ".title"; 1027 | // $content-selector: ".content"; 1028 | 1029 | // 1030 | // Side Nav Variables 1031 | // 1032 | 1033 | // Padding 1034 | 1035 | // $side-nav-padding: emCalc(14px) 0; 1036 | 1037 | // List styles 1038 | 1039 | // $side-nav-list-type: none; 1040 | // $side-nav-list-position: inside; 1041 | // $side-nav-list-margin: 0 0 emCalc(7px) 0; 1042 | 1043 | // Link styles 1044 | 1045 | // $side-nav-link-color: $primary-color; 1046 | // $side-nav-link-color-active: lighten(#000, 30%); 1047 | // $side-nav-font-size: emCalc(14px); 1048 | // $side-nav-font-weight: bold; 1049 | 1050 | // Border styles 1051 | 1052 | // $side-nav-divider-size: 1px; 1053 | // $side-nav-divider-style: solid; 1054 | // $side-nav-divider-color: darken(#fff, 10%); 1055 | 1056 | // 1057 | // Sub Nav Variables 1058 | // 1059 | 1060 | // Margin and padding 1061 | 1062 | // $sub-nav-list-margin: emCalc(-4px) 0 emCalc(18px); 1063 | // $sub-nav-list-padding-top: emCalc(4px); 1064 | 1065 | // Definition 1066 | 1067 | // $sub-nav-font-size: emCalc(14px); 1068 | // $sub-nav-font-color: #999; 1069 | // $sub-nav-font-weight: normal; 1070 | // $sub-nav-text-decoration: none; 1071 | // $sub-nav-border-radius: 1000px; 1072 | 1073 | // Active item styles 1074 | 1075 | // $sub-nav-active-font-weight: bold; 1076 | // $sub-nav-active-bg: $primary-color; 1077 | // $sub-nav-active-color: #fff; 1078 | // $sub-nav-active-padding: emCalc(3px) emCalc(9px); 1079 | // $sub-nav-active-cursor: $cursor-default-value; 1080 | 1081 | // 1082 | // Switch Variables 1083 | // 1084 | 1085 | // Border styles and background colors for the switch container 1086 | 1087 | // $switch-border-color: darken(#fff, 20%); 1088 | // $switch-border-style: solid; 1089 | // $switch-border-width: 1px; 1090 | // $switch-bg: #fff; 1091 | 1092 | // Switch heights for our default classes 1093 | 1094 | // $switch-height-tny: 22px; 1095 | // $switch-height-sml: 28px; 1096 | // $switch-height-med: 36px; 1097 | // $switch-height-lrg: 44px; 1098 | // $switch-bottom-margin: emCalc(20px); 1099 | 1100 | // Font sizes for our classes. 1101 | 1102 | // $switch-font-size-tny: 11px; 1103 | // $switch-font-size-sml: 12px; 1104 | // $switch-font-size-med: 14px; 1105 | // $switch-font-size-lrg: 17px; 1106 | // $switch-label-side-padding: 6px; 1107 | 1108 | // Switch-paddle 1109 | 1110 | // $switch-paddle-bg: #fff; 1111 | // $switch-paddle-fade-to-color: darken($switch-paddle-bg, 10%); 1112 | // $switch-paddle-border-color: darken($switch-paddle-bg, 35%); 1113 | // $switch-paddle-border-width: 1px; 1114 | // $switch-paddle-border-style: solid; 1115 | // $switch-paddle-transition-speed: .1s; 1116 | // $switch-paddle-transition-ease: ease-out; 1117 | // $switch-positive-color: lighten($success-color, 50%); 1118 | // $switch-negative-color: #f5f5f5; 1119 | 1120 | // Outline Style for tabbing through switches 1121 | 1122 | // $switch-label-outline: 1px dotted #888; 1123 | 1124 | // 1125 | // Table Variables 1126 | // 1127 | 1128 | // Background color for the table and even rows 1129 | 1130 | // $table-bg: #fff; 1131 | // $table-even-row-bg: #f9f9f9; 1132 | 1133 | // Table cell border style 1134 | 1135 | // $table-border-style: solid; 1136 | // $table-border-size: 1px; 1137 | // $table-border-color: #ddd; 1138 | 1139 | // Table head styles 1140 | 1141 | // $table-head-bg: #f5f5f5; 1142 | // $table-head-font-size: emCalc(14px); 1143 | // $table-head-font-color: #222; 1144 | // $table-head-font-weight: bold; 1145 | // $table-head-padding: emCalc(8px) emCalc(10px) emCalc(10px); 1146 | 1147 | // Row padding and font styles 1148 | 1149 | // $table-row-padding: emCalc(9px) emCalc(10px); 1150 | // $table-row-font-size: emCalc(14px); 1151 | // $table-row-font-color: #222; 1152 | // $table-line-height: emCalc(18px); 1153 | 1154 | // Display and margin of tables 1155 | 1156 | // $table-display: table-cell; 1157 | // $table-margin-bottom: emCalc(20px); 1158 | 1159 | // 1160 | // Image Thumbnail Variables 1161 | // 1162 | 1163 | // Border styles 1164 | 1165 | // $thumb-border-style: solid; 1166 | // $thumb-border-width: 4px; 1167 | // $thumb-border-color: #fff; 1168 | // $thumb-box-shadow: 0 0 0 1px rgba(#000,.2); 1169 | // $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5); 1170 | 1171 | // Radius and transition speed for thumbs 1172 | 1173 | // $thumb-radius: $global-radius; 1174 | // $thumb-transition-speed: 200ms; 1175 | 1176 | // 1177 | // Tooltip Variables 1178 | // 1179 | 1180 | // $has-tip-border-bottom: dotted 1px #ccc; 1181 | // $has-tip-font-weight: bold; 1182 | // $has-tip-font-color: #333; 1183 | // $has-tip-border-bottom-hover: dotted 1px darken($primary-color, 20%); 1184 | // $has-tip-font-color-hover: $primary-color; 1185 | // $has-tip-cursor-type: help; 1186 | 1187 | // $tooltip-padding: emCalc(8px); 1188 | // $tooltip-bg: #000; 1189 | // $tooltip-font-size: emCalc(15px); 1190 | // $tooltip-font-weight: bold; 1191 | // $tooltip-font-color: #fff; 1192 | // $tooltip-line-height: 1.3; 1193 | // $tooltip-close-font-size: emCalc(10px); 1194 | // $tooltip-close-font-weight: normal; 1195 | // $tooltip-close-font-color: #888; 1196 | // $tooltip-font-size-sml: emCalc(14px); 1197 | // $tooltip-radius: $global-radius; 1198 | // $tooltip-pip-size: 5px; 1199 | 1200 | // 1201 | // Top Bar Variables 1202 | // 1203 | 1204 | // Background color for the top bar 1205 | 1206 | // $topbar-bg: #111 !default; 1207 | 1208 | // Height and margin 1209 | 1210 | // $topbar-height: 45px; 1211 | // $topbar-margin-bottom: emCalc(30px); 1212 | 1213 | // Control Input height for top bar 1214 | 1215 | // $topbar-input-height: 2.45em; 1216 | 1217 | // Controlling the styles for the title in the top bar 1218 | 1219 | // $topbar-title-weight: bold; 1220 | // $topbar-title-font-size: emCalc(17px); 1221 | 1222 | // Style the top bar dropdown elements 1223 | 1224 | // $topbar-dropdown-bg: #222; 1225 | // $topbar-dropdown-link-color: #fff; 1226 | // $topbar-dropdown-link-bg: lighten($topbar-bg, 5%); 1227 | // $topbar-dropdown-toggle-size: 5px; 1228 | // $topbar-dropdown-toggle-color: #fff; 1229 | // $topbar-dropdown-toggle-alpha: 0.5; 1230 | 1231 | // Set the link colors and styles for top-level nav 1232 | 1233 | // $topbar-link-color: #fff; 1234 | // $topbar-link-color-hover: #fff; 1235 | // $topbar-link-color-active: #fff; 1236 | // $topbar-link-weight: bold; 1237 | // $topbar-link-font-size: emCalc(13px); 1238 | // $topbar-link-hover-lightness: -30%; // Darken by 30% 1239 | // $topbar-link-bg-hover: darken($topbar-bg, 3%); 1240 | // $topbar-link-bg-active: darken($topbar-bg, 3%); 1241 | 1242 | // $topbar-dropdown-label-color: #555; 1243 | // $topbar-dropdown-label-text-transform: uppercase; 1244 | // $topbar-dropdown-label-font-weight: bold; 1245 | // $topbar-dropdown-label-font-size: emCalc(10px); 1246 | 1247 | // Top menu icon styles 1248 | 1249 | // $topbar-menu-link-transform: uppercase; 1250 | // $topbar-menu-link-font-size: emCalc(13px); 1251 | // $topbar-menu-link-weight: bold; 1252 | // $topbar-menu-link-color: #fff; 1253 | // $topbar-menu-icon-color: #fff; 1254 | // $topbar-menu-link-color-toggled: #888; 1255 | // $topbar-menu-icon-color-toggled: #888; 1256 | 1257 | // Transitions and breakpoint styles 1258 | 1259 | // $topbar-transition-speed: 300ms; 1260 | // $topbar-breakpoint: emCalc(940px); // Change to 9999px for always mobile layout 1261 | // $topbar-media-query: "only screen and (min-width: #{$topbar-breakpoint})"; 1262 | 1263 | // Divider Styles 1264 | 1265 | // $topbar-divider-border-bottom: solid 1px lighten($topbar-bg, 10%); 1266 | // $topbar-divider-border-top: solid 1px darken($topbar-bg, 10%); 1267 | 1268 | // Sticky Class 1269 | 1270 | // $topbar-sticky-class: ".sticky"; 1271 | 1272 | @import 'foundation'; 1273 | --------------------------------------------------------------------------------