diff --git a/Gemfile b/Gemfile index bfaffad..e15701c 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,10 @@ gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc -gem 'twitter-bootstrap-rails' +gem 'bootstrap-sass', '~> 3.3.1' +gem 'autoprefixer-rails' + +gem 'bh', '~> 1.2' gem 'will_paginate', '~> 3.0.6' gem 'will_paginate-bootstrap' diff --git a/Gemfile.lock b/Gemfile.lock index 4676a3b..2e78cb0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,6 +28,13 @@ GEM thread_safe (~> 0.1) tzinfo (~> 1.1) arel (5.0.1.20140414130214) + autoprefixer-rails (4.0.2.1) + execjs + bh (1.2.0) + actionpack + activesupport + bootstrap-sass (3.3.1.0) + sass (~> 3.2) builder (3.2.2) coffee-rails (4.0.1) coffee-script (>= 2.2.0) @@ -97,11 +104,6 @@ GEM tilt (1.4.1) turbolinks (2.5.2) coffee-rails - twitter-bootstrap-rails (3.2.0) - actionpack (~> 4.1) - execjs (~> 2.2) - rails (~> 4.1) - railties (~> 4.1) tzinfo (1.2.2) thread_safe (~> 0.1) tzinfo-data (1.2014.10) @@ -117,6 +119,9 @@ PLATFORMS x86-mingw32 DEPENDENCIES + autoprefixer-rails + bh (~> 1.2) + bootstrap-sass (~> 3.3.1) coffee-rails (~> 4.0.0) jbuilder (~> 2.0) jquery-rails @@ -125,7 +130,6 @@ DEPENDENCIES sdoc (~> 0.4.0) sqlite3 turbolinks - twitter-bootstrap-rails tzinfo-data uglifier (>= 1.3.0) will_paginate (~> 3.0.6) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 3885622..6ef234e 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,6 +12,6 @@ // //= require jquery //= require jquery_ujs -//= require twitter/bootstrap //= require turbolinks +//= require bootstrap-sprockets //= require_tree . diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee deleted file mode 100644 index 9440679..0000000 --- a/app/assets/javascripts/bootstrap.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -jQuery -> - $("a[rel~=popover], .has-popover").popover() - $("a[rel~=tooltip], .has-tooltip").tooltip() diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css.scss similarity index 92% rename from app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.css.scss index a443db3..4b83bcd 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css.scss @@ -13,3 +13,6 @@ *= require_tree . *= require_self */ + +@import "bootstrap-sprockets"; +@import "bootstrap"; diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css b/app/assets/stylesheets/bootstrap_and_overrides.css deleted file mode 100644 index 131fcfd..0000000 --- a/app/assets/stylesheets/bootstrap_and_overrides.css +++ /dev/null @@ -1,7 +0,0 @@ -/* - =require twitter-bootstrap-static/bootstrap - - Use Font Awesome icons (default) - To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites" - =require twitter-bootstrap-static/fontawesome - */ \ No newline at end of file diff --git a/app/assets/stylesheets/problems.css.scss b/app/assets/stylesheets/problems.css.scss index 440f713..7f0de10 100644 --- a/app/assets/stylesheets/problems.css.scss +++ b/app/assets/stylesheets/problems.css.scss @@ -1,3 +1,3 @@ // Place all the styles related to the Problems controller here. -// They will automatically be included in application.css. +// They will automatically be included in application.css.scss. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 713644b..a24b5e2 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -7,9 +7,14 @@ <%= csrf_meta_tags %> -<%= nav_bar :brand => 'Projekt Euler', :brand_link => root_path do %> - <%= menu_group do %> - <%= menu_item 'Probleme', problems_path %> +<%= navbar position: :static do %> + <%= vertical do %> + <%= link_to 'Projekt Euler', root_path %> + <% end %> + <%= horizontal do %> + <%= nav class: 'navbar-left' do %> + <%= link_to 'Probleme', problems_path %> + <% end %> <% end %> <% end %>
diff --git a/app/views/problems/show.html.erb b/app/views/problems/show.html.erb index bdc91a0..e4a460d 100644 --- a/app/views/problems/show.html.erb +++ b/app/views/problems/show.html.erb @@ -6,10 +6,10 @@

<%= @problem.title %> Problem <%= @problem.id %>

-
-
- <%= sanitize @problem.content %> -
-
+<%= panel do %> +
+ <%= sanitize @problem.content %> +
+<% end %> <%= link_to 'Edit', edit_problem_path(@problem), class: 'btn btn-default' %> diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index d2f4ec3..ab212d0 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -4,5 +4,5 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# application.js, application.css.scss, and all non-JS/CSS in app/assets folder are already added. # Rails.application.config.assets.precompile += %w( search.js ) diff --git a/config/locales/en.bootstrap.yml b/config/locales/en.bootstrap.yml deleted file mode 100644 index 8d75119..0000000 --- a/config/locales/en.bootstrap.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - breadcrumbs: - application: - root: "Index" - pages: - pages: "Pages" - helpers: - actions: "Actions" - links: - back: "Back" - cancel: "Cancel" - confirm: "Are you sure?" - destroy: "Delete" - new: "New" - edit: "Edit" - titles: - edit: "Edit %{model}" - save: "Save %{model}" - new: "New %{model}" - delete: "Delete %{model}"