1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 08:46:41 +01:00

Merge pull request #10 from PFischbeck/bootstrap-fix

Bootstrap fix
This commit is contained in:
Philipp Fischbeck 2014-12-10 17:37:26 +01:00
commit d457735dc8
11 changed files with 33 additions and 51 deletions

View File

@ -23,7 +23,10 @@ gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api. # bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc 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', '~> 3.0.6'
gem 'will_paginate-bootstrap' gem 'will_paginate-bootstrap'

View File

@ -28,6 +28,13 @@ GEM
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
arel (5.0.1.20140414130214) 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) builder (3.2.2)
coffee-rails (4.0.1) coffee-rails (4.0.1)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
@ -97,11 +104,6 @@ GEM
tilt (1.4.1) tilt (1.4.1)
turbolinks (2.5.2) turbolinks (2.5.2)
coffee-rails coffee-rails
twitter-bootstrap-rails (3.2.0)
actionpack (~> 4.1)
execjs (~> 2.2)
rails (~> 4.1)
railties (~> 4.1)
tzinfo (1.2.2) tzinfo (1.2.2)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo-data (1.2014.10) tzinfo-data (1.2014.10)
@ -117,6 +119,9 @@ PLATFORMS
x86-mingw32 x86-mingw32
DEPENDENCIES DEPENDENCIES
autoprefixer-rails
bh (~> 1.2)
bootstrap-sass (~> 3.3.1)
coffee-rails (~> 4.0.0) coffee-rails (~> 4.0.0)
jbuilder (~> 2.0) jbuilder (~> 2.0)
jquery-rails jquery-rails
@ -125,7 +130,6 @@ DEPENDENCIES
sdoc (~> 0.4.0) sdoc (~> 0.4.0)
sqlite3 sqlite3
turbolinks turbolinks
twitter-bootstrap-rails
tzinfo-data tzinfo-data
uglifier (>= 1.3.0) uglifier (>= 1.3.0)
will_paginate (~> 3.0.6) will_paginate (~> 3.0.6)

View File

@ -12,6 +12,6 @@
// //
//= require jquery //= require jquery
//= require jquery_ujs //= require jquery_ujs
//= require twitter/bootstrap
//= require turbolinks //= require turbolinks
//= require bootstrap-sprockets
//= require_tree . //= require_tree .

View File

@ -1,3 +0,0 @@
jQuery ->
$("a[rel~=popover], .has-popover").popover()
$("a[rel~=tooltip], .has-tooltip").tooltip()

View File

@ -13,3 +13,6 @@
*= require_tree . *= require_tree .
*= require_self *= require_self
*/ */
@import "bootstrap-sprockets";
@import "bootstrap";

View File

@ -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
*/

View File

@ -1,3 +1,3 @@
// Place all the styles related to the Problems controller here. // 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/ // You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -7,9 +7,14 @@
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
</head> </head>
<body> <body>
<%= nav_bar :brand => 'Projekt Euler', :brand_link => root_path do %> <%= navbar position: :static do %>
<%= menu_group do %> <%= vertical do %>
<%= menu_item 'Probleme', problems_path %> <%= link_to 'Projekt Euler', root_path %>
<% end %>
<%= horizontal do %>
<%= nav class: 'navbar-left' do %>
<%= link_to 'Probleme', problems_path %>
<% end %>
<% end %> <% end %>
<% end %> <% end %>
<div class="container"> <div class="container">

View File

@ -6,10 +6,10 @@
<h1><%= @problem.title %> <small>Problem <%= @problem.id %></small></h1> <h1><%= @problem.title %> <small>Problem <%= @problem.id %></small></h1>
</div> </div>
<div class="panel panel-default"> <%= panel do %>
<div class="panel-body problem-content"> <div class="panel-body problem-content">
<%= sanitize @problem.content %> <%= sanitize @problem.content %>
</div> </div>
</div> <% end %>
<%= link_to 'Edit', edit_problem_path(@problem), class: 'btn btn-default' %> <%= link_to 'Edit', edit_problem_path(@problem), class: 'btn btn-default' %>

View File

@ -4,5 +4,5 @@
Rails.application.config.assets.version = '1.0' Rails.application.config.assets.version = '1.0'
# Precompile additional assets. # 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 ) # Rails.application.config.assets.precompile += %w( search.js )

View File

@ -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}"