diff --git a/Gemfile b/Gemfile
index 34f4efe..2d71810 100644
--- a/Gemfile
+++ b/Gemfile
@@ -37,18 +37,16 @@ gem 'web-console', '~> 4.0.1', group: :development
# Use Codacy for coverage
gem 'codacy-coverage', :require => false
-gem 'bootstrap-sass', '~> 3.4.1'
-gem 'autoprefixer-rails', '~> 9.6.1'
-
-gem 'bh', '~> 1.3.6'
+gem 'bootstrap', '~> 4.4.1'
+gem "bootstrap_form", "~> 4.0"
+gem 'font-awesome-sass', '~> 5.12.0'
# Use Diffy for showing translation diffs
gem 'diffy'
gem 'diff-lcs'
gem 'will_paginate', '~> 3.1.8'
-gem 'will-paginate-i18n', '~> 0.1.15'
-gem 'will_paginate-bootstrap', '~> 1.0.2'
+gem 'will_paginate-bootstrap4', '~> 0.2.2'
gem 'devise', '~> 4.7.1'
gem 'omniauth'
diff --git a/Gemfile.lock b/Gemfile.lock
index 55e912d..d842ac2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -56,18 +56,19 @@ GEM
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
- autoprefixer-rails (9.6.5)
+ autoprefixer-rails (9.7.3)
execjs
bcrypt (3.1.13)
- bh (1.3.6)
- actionpack
- activesupport
bindex (0.8.1)
bootsnap (1.4.5)
msgpack (~> 1.0)
- bootstrap-sass (3.4.1)
- autoprefixer-rails (>= 5.2.1)
- sassc (>= 2.0.0)
+ bootstrap (4.4.1)
+ autoprefixer-rails (>= 9.1.0)
+ popper_js (>= 1.14.3, < 2)
+ sassc-rails (>= 2.0.0)
+ bootstrap_form (4.3.0)
+ actionpack (>= 5.0)
+ activemodel (>= 5.0)
builder (3.2.3)
codacy-coverage (2.1.5)
simplecov
@@ -94,6 +95,8 @@ GEM
faraday (0.17.0)
multipart-post (>= 1.2, < 3)
ffi (1.11.2)
+ font-awesome-sass (5.12.0)
+ sassc (>= 1.11)
globalid (0.4.2)
activesupport (>= 4.2.0)
hashie (3.6.0)
@@ -143,6 +146,7 @@ GEM
oauth2 (~> 1.1)
omniauth (~> 1.9)
orm_adapter (0.5.0)
+ popper_js (1.14.5)
rack (2.0.8)
rack-test (1.1.0)
rack (>= 1.0, < 3)
@@ -227,25 +231,24 @@ GEM
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
- will-paginate-i18n (0.1.15)
will_paginate (3.1.8)
- will_paginate-bootstrap (1.0.2)
- will_paginate (>= 3.0.3)
+ will_paginate-bootstrap4 (0.2.2)
+ will_paginate (~> 3.0, >= 3.0.0)
zeitwerk (2.2.1)
PLATFORMS
ruby
DEPENDENCIES
- autoprefixer-rails (~> 9.6.1)
- bh (~> 1.3.6)
bootsnap
- bootstrap-sass (~> 3.4.1)
+ bootstrap (~> 4.4.1)
+ bootstrap_form (~> 4.0)
codacy-coverage
coffee-rails (~> 5.0.0)
devise (~> 4.7.1)
diff-lcs
diffy
+ font-awesome-sass (~> 5.12.0)
jbuilder (~> 2.9.1)
jquery-rails (~> 4.3.5)
mysql2 (~> 0.5.2)
@@ -261,9 +264,8 @@ DEPENDENCIES
tzinfo-data
uglifier (~> 4.1.20)
web-console (~> 4.0.1)
- will-paginate-i18n (~> 0.1.15)
will_paginate (~> 3.1.8)
- will_paginate-bootstrap (~> 1.0.2)
+ will_paginate-bootstrap4 (~> 0.2.2)
BUNDLED WITH
2.0.2
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 907c067..84f608f 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -10,9 +10,10 @@
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
-//= require jquery
-//= require jquery_ujs
//= require turbolinks
+//= require jquery3
+//= require rails-ujs
+//= require popper
//= require bootstrap-sprockets
//= require codemirror/codemirror
//= require codemirror/addon/display/placeholder
diff --git a/app/assets/javascripts/init.coffee b/app/assets/javascripts/init.coffee
index fbac815..cabf848 100644
--- a/app/assets/javascripts/init.coffee
+++ b/app/assets/javascripts/init.coffee
@@ -18,6 +18,6 @@ App.init = ->
$(document).on "turbolinks:load", ->
App.init()
-$(document).on "click", '#translationNav a[href="#preview"]', ->
+$(document).on "click", '#translationTab a[href="#preview"]', ->
$('#preview .problem-content').html(cm.getValue())
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
\ No newline at end of file
diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss
index da8e9b4..0e5ac21 100644
--- a/app/assets/stylesheets/application.css.scss
+++ b/app/assets/stylesheets/application.css.scss
@@ -15,11 +15,13 @@
*= require_tree .
*/
-@import "bootstrap-sprockets";
@import "bootstrap";
+@import "rails_bootstrap_forms";
+@import "font-awesome-sprockets";
+@import "font-awesome";
.turbolinks-progress-bar {
- background-color: $brand-primary;
+ background-color: $primary;
}
/* Sticky footer styles
-------------------------------------------------- */
@@ -37,21 +39,33 @@ body {
width: 100%;
/* Set the fixed height of the footer here */
height: 40px;
- background-color: $navbar-default-bg;
+ background-color: $light;
}
.container .text-muted {
margin: 10px 0;
}
+.problem-buttons {
+ position: relative;
+ display: block;
+}
+
+.problem-buttons .problem-buttons-inner {
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 10;
+}
+
/* Style for links to previous and next problem */
.problem-prev {
- @extend .pull-left;
+ float: left;
margin: 20px -30px 0;
}
.problem-next {
- @extend .pull-right;
+ float: right;
margin: 20px -30px 0;
}
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index ec958ef..66acd86 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -27,4 +27,12 @@ module ApplicationHelper
page_title + ' - ' + base_title
end
end
+
+ def nav_link_to(body, url)
+ nav_options = { class: current_page?(url) ? 'nav-item active': 'nav-item' }
+ content_tag(:li, nav_options) do
+ link_to body, url, class: 'nav-link'
+ end
+ end
+
end
diff --git a/app/views/about/copyright.de.html.erb b/app/views/about/copyright.de.html.erb
index ebac61c..7f66d5a 100644
--- a/app/views/about/copyright.de.html.erb
+++ b/app/views/about/copyright.de.html.erb
@@ -1,6 +1,8 @@
<% provide(:title, 'Copyright') %>
-
+
+
Copyright
+
Kann ich die Probleme woanders benutzen?
Ja! Es ist nicht nur erlaubt, sondern beherzt, das Material zu teilen und frei zu benutzen - für nichtkommerzielle Zwecke. Aber bitte lesen Sie weiter...
diff --git a/app/views/about/index.de.html.erb b/app/views/about/index.de.html.erb
index c0edcd1..f627490 100644
--- a/app/views/about/index.de.html.erb
+++ b/app/views/about/index.de.html.erb
@@ -1,12 +1,10 @@
-
-
Willkommen auf Projekt Euler!
-
Diese Seite ist eine Übersetzung der englischen Rätsel-Webseite projecteuler.net.
-
- <%= link_to about_info_path, class: 'btn btn-primary btn-lg' do %>
- Mehr erfahren »
- <% end %>
-
+
Willkommen auf Projekt Euler!
+
Diese Seite ist eine Übersetzung der englischen Rätsel-Webseite projecteuler.net.
+
+ <%= link_to about_info_path, class: 'btn btn-primary btn-lg' do %>
+ Mehr erfahren »
+ <% end %>
@@ -16,7 +14,7 @@
Ansehen
Sehen Sie sich die mathematischen Probleme in deutscher Sprache an.
- <%= link_to problems_path, class: 'btn btn-default' do %>
+ <%= link_to problems_path, class: 'btn btn-primary' do %>
Zu den Problemen »
<% end %>
@@ -28,7 +26,7 @@
\ No newline at end of file
diff --git a/app/views/about/info.de.html.erb b/app/views/about/info.de.html.erb
index 275d50e..ae9e17b 100644
--- a/app/views/about/info.de.html.erb
+++ b/app/views/about/info.de.html.erb
@@ -1,8 +1,8 @@
<% provide(:title, 'Über Project Euler') %>
-
-