diff --git a/Gemfile b/Gemfile index 1befa0d9..1786de34 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'rails', '4.1.6' +gem 'rails', '4.1.7' gem 'pg', group: :postgres gem 'mysql2', group: :mysql @@ -16,10 +16,12 @@ gem 'sdoc', '~> 0.4.1', group: :doc gem 'bcrypt', '~> 3.1.7' gem 'haml' -gem 'semantic-ui-sass', '~> 0.19.3.0' +gem 'bootstrap-sass', '~> 3.2.0.1' +gem 'bootswatch-rails', '~> 3.2.0' gem 'will_paginate' gem 'http_accept_language' gem 'devise' +gem 'bootstrap_form' gem 'font-kit-rails' gem 'nprogress-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 65bcba8f..0552361e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,27 +1,27 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.1.6) - actionpack (= 4.1.6) - actionview (= 4.1.6) + actionmailer (4.1.7) + actionpack (= 4.1.7) + actionview (= 4.1.7) mail (~> 2.5, >= 2.5.4) - actionpack (4.1.6) - actionview (= 4.1.6) - activesupport (= 4.1.6) + actionpack (4.1.7) + actionview (= 4.1.7) + activesupport (= 4.1.7) rack (~> 1.5.2) rack-test (~> 0.6.2) - actionview (4.1.6) - activesupport (= 4.1.6) + actionview (4.1.7) + activesupport (= 4.1.7) builder (~> 3.1) erubis (~> 2.7.0) - activemodel (4.1.6) - activesupport (= 4.1.6) + activemodel (4.1.7) + activesupport (= 4.1.7) builder (~> 3.1) - activerecord (4.1.6) - activemodel (= 4.1.6) - activesupport (= 4.1.6) + activerecord (4.1.7) + activemodel (= 4.1.7) + activesupport (= 4.1.7) arel (~> 5.0.0) - activesupport (4.1.6) + activesupport (4.1.7) i18n (~> 0.6, >= 0.6.9) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -29,6 +29,11 @@ GEM tzinfo (~> 1.1) arel (5.0.1.20140414130214) bcrypt (3.1.9) + bootstrap-sass (3.2.0.2) + sass (~> 3.2) + bootstrap_form (2.2.0) + bootswatch-rails (3.2.4) + railties (>= 3.1) builder (3.2.2) coffee-rails (4.1.0) coffee-script (>= 2.2.0) @@ -38,7 +43,7 @@ GEM execjs coffee-script-source (1.8.0) daemons (1.1.9) - devise (3.4.0) + devise (3.4.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 3.2.6, < 5) @@ -49,7 +54,7 @@ GEM erubis (2.7.0) eventmachine (1.0.3) execjs (2.2.2) - font-kit-rails (1.0.2) + font-kit-rails (1.1.0) rails haml (4.0.5) tilt @@ -76,19 +81,19 @@ GEM rack (1.5.2) rack-test (0.6.2) rack (>= 1.0) - rails (4.1.6) - actionmailer (= 4.1.6) - actionpack (= 4.1.6) - actionview (= 4.1.6) - activemodel (= 4.1.6) - activerecord (= 4.1.6) - activesupport (= 4.1.6) + rails (4.1.7) + actionmailer (= 4.1.7) + actionpack (= 4.1.7) + actionview (= 4.1.7) + activemodel (= 4.1.7) + activerecord (= 4.1.7) + activesupport (= 4.1.7) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.6) + railties (= 4.1.7) sprockets-rails (~> 2.0) - railties (4.1.6) - actionpack (= 4.1.6) - activesupport (= 4.1.6) + railties (4.1.7) + actionpack (= 4.1.7) + activesupport (= 4.1.7) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) raindrops (0.13.0) @@ -98,23 +103,21 @@ GEM responders (1.1.1) railties (>= 3.2, < 4.2) sass (3.2.19) - sass-rails (4.0.3) + sass-rails (4.0.4) railties (>= 4.0.0, < 5.0) - sass (~> 3.2.0) - sprockets (~> 2.8, <= 2.11.0) + sass (~> 3.2.2) + sprockets (~> 2.8, < 2.12) sprockets-rails (~> 2.0) sdoc (0.4.1) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - semantic-ui-sass (0.19.3.0) - sass (~> 3.2) simplecov (0.9.1) docile (~> 1.1.0) multi_json (~> 1.0) simplecov-html (~> 0.8.0) simplecov-html (0.8.0) spring (1.1.3) - sprockets (2.11.0) + sprockets (2.11.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) @@ -130,7 +133,7 @@ GEM thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) - turbolinks (2.4.0) + turbolinks (2.5.1) coffee-rails tzinfo (1.2.2) thread_safe (~> 0.1) @@ -150,6 +153,9 @@ PLATFORMS DEPENDENCIES bcrypt (~> 3.1.7) + bootstrap-sass (~> 3.2.0.1) + bootstrap_form + bootswatch-rails (~> 3.2.0) coffee-rails (~> 4.1.0) devise font-kit-rails @@ -160,10 +166,9 @@ DEPENDENCIES mysql2 nprogress-rails pg - rails (= 4.1.6) + rails (= 4.1.7) sass-rails (~> 4.0.3) sdoc (~> 0.4.1) - semantic-ui-sass (~> 0.19.3.0) simplecov spring thin diff --git a/app/assets/javascripts/application.coffee b/app/assets/javascripts/application.coffee index 2711098f..dc7e2ae7 100644 --- a/app/assets/javascripts/application.coffee +++ b/app/assets/javascripts/application.coffee @@ -1,9 +1,6 @@ #= require jquery #= require jquery_ujs #= require turbolinks -#= require semantic-ui +#= require bootstrap #= require_tree . -$(document).ready -> - $('.ui.dropdown').dropdown - on: "hover" \ No newline at end of file diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 60160db8..87984a7f 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -1,73 +1,9 @@ /* - *= require font-kit-rails/open-sans + *= require rails_bootstrap_forms *= require_self */ -@import "semantic-ui"; +@import "bootswatch/flatly/variables"; +@import "bootstrap"; +body { padding-top: $navbar-height; } +@import "bootswatch/flatly/bootswatch"; @import "base"; - -html, -body { - font-size: 15px; - height: 100%; -} - -body { - font-family: "Open Sans", "Helvetica Neue", "Helvetica", "DejaVu Sans", "Arial", sans-serif; - background: #FFFFFF; - margin: 0px; - padding: 0px; - color: #555555; - text-rendering: optimizeLegibility; - min-width: 320px; -} - - -/* mobile only */ - -@media only screen and (max-width : 768px) { - .ui.page.grid.segment { - padding-top: 2rem; - padding-bottom: 2rem; - } - - h1.ui.header { - font-size: 1.5em; - } - - .masthead.segment { - background-size: auto; - } - - .masthead.segment .information { - margin-left: 190px; - } - - .masthead.segment .image { - bottom: -65px; - width: 150px; - } - - .masthead.segment .button { - font-size: 1rem; - } - - .overview .divided.grid .header .icon { - font-size: 1.5em; - } - - .overview .divided.grid .header + p { - min-height: 0px; - } - - .masthead.segment .column { - font-size: 0.7rem; - } - - .masthead.segment .column p { - display: none; - } -} - -@media only screen and (max-width : 1000px) { - -} \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d298ed14..0f01df3d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,9 +1,6 @@ module ApplicationHelper - def nav_entry(body, path, options={}) - options = {class: "", icon: "", label: "", label_color: "red"}.merge options - body = semantic_icon(options[:icon]) + " " + body unless options[:icon].empty? - body = body + " " + content_tag(:div, options[:label], class: "ui #{options[:label_color]} label") unless options[:label].empty? - link_to(body, path, class: "#{'active' if current_page? path} item #{options[:class]}") + def nav_entry(body, path) + content_tag(:li, link_to(body, path), class: ('active' if current_page? path)) end ## diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb new file mode 100644 index 00000000..434fe000 --- /dev/null +++ b/app/views/devise/confirmations/new.html.erb @@ -0,0 +1,12 @@ +
Welcome <%= @screen_name %>!
+ +You can confirm your account email through the link below:
+ +<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb new file mode 100644 index 00000000..f667dc12 --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -0,0 +1,8 @@ +Hello <%= @resource.email %>!
+ +Someone has requested a link to change your password. You can do this through the link below.
+ +<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>
+ +If you didn't request this, please ignore this email.
+Your password won't change until you access the link above and create a new one.
diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb new file mode 100644 index 00000000..41e148bf --- /dev/null +++ b/app/views/devise/mailer/unlock_instructions.html.erb @@ -0,0 +1,7 @@ +Hello <%= @resource.email %>!
+ +Your account has been locked due to an excessive number of unsuccessful sign in attempts.
+ +Click the link below to unlock your account:
+ +<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>
diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb new file mode 100644 index 00000000..55350988 --- /dev/null +++ b/app/views/devise/passwords/edit.html.erb @@ -0,0 +1,16 @@ +Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>
+ +<%= link_to "Back", :back %> diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index 150fa9f1..5bf72700 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -1,6 +1,6 @@ .container %h1 Edit #{resource_name.to_s.humanize} - = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| + = bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| = devise_error_messages! = f.text_field :screen_name, autofocus: true, label: "User name" diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 80a57944..80d46542 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -1,7 +1,7 @@ .container %h1 Sign up - = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| + = bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| = devise_error_messages! = f.text_field :screen_name, autofocus: true, label: "User name" diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 8caed3d5..a9721102 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -2,7 +2,7 @@ %h1 Sign in = render 'layouts/messages' - = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| + = bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| = f.text_field :login, autofocus: true, label: "User name" = f.password_field :password, autocomplete: "off", label: "Password" diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb new file mode 100644 index 00000000..d84bdde9 --- /dev/null +++ b/app/views/devise/shared/_links.erb @@ -0,0 +1,25 @@ +<%- if controller_name != 'sessions' %> + <%= link_to "Sign in", new_session_path(resource_name) %>