diff --git a/Gemfile b/Gemfile index 081d36e..e4b9b27 100644 --- a/Gemfile +++ b/Gemfile @@ -39,7 +39,7 @@ gem 'sdoc', '~> 2.1.0', group: :doc gem 'web-console', '~> 4.1.0', group: :development gem 'listen', '~> 3.5.1', group: :development -gem 'bootstrap', '~> 4.5.3' +gem 'bootstrap', '~> 5.0.1' gem "bootstrap_form", "~> 4.5" gem 'font-awesome-sass', '~> 5.15.1' diff --git a/Gemfile.lock b/Gemfile.lock index fe592c8..4517265 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,15 +62,15 @@ GEM zeitwerk (~> 2.3) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - autoprefixer-rails (10.0.2.0) - execjs + autoprefixer-rails (10.2.5.0) + execjs (< 2.8.0) bcrypt (3.1.16) bindex (0.8.1) bootsnap (1.7.5) msgpack (~> 1.0) - bootstrap (4.5.3) + bootstrap (5.0.1) autoprefixer-rails (>= 9.1.0) - popper_js (>= 1.14.3, < 2) + popper_js (>= 2.9.2, < 3) sassc-rails (>= 2.0.0) bootstrap_form (4.5.0) actionpack (>= 5.2) @@ -141,7 +141,7 @@ GEM multipart-post (2.1.1) mysql2 (0.5.3) nio4r (2.5.7) - nokogiri (1.11.4) + nokogiri (1.11.5) mini_portile2 (~> 2.5.0) racc (~> 1.4) oauth2 (1.4.7) @@ -164,7 +164,7 @@ GEM actionpack (>= 4.2) omniauth (~> 2.0) orm_adapter (0.5.0) - popper_js (1.16.0) + popper_js (2.9.2) public_suffix (4.0.6) puma (5.3.1) nio4r (~> 2.0) @@ -268,7 +268,7 @@ PLATFORMS DEPENDENCIES bootsnap - bootstrap (~> 4.5.3) + bootstrap (~> 5.0.1) bootstrap_form (~> 4.5) coffee-rails (~> 5.0.0) devise (~> 4.8.0) diff --git a/app/assets/javascripts/init.coffee b/app/assets/javascripts/init.coffee index cabf848..1f84e32 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", '#translationTab a[href="#preview"]', -> +$(document).on "click", '#translationTab button[data-bs-target="#preview"]', -> $('#preview .problem-content').html(cm.getValue()) MathJax.Hub.Queue(["Typeset",MathJax.Hub]); \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 66acd86..ef3fbc5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -7,11 +7,8 @@ module ApplicationHelper capture do flash.each do |msg_type, message| concat(content_tag(:div, message, class: "alert #{bootstrap_class_for(msg_type)} alert-dismissible", role: 'alert') do - concat(content_tag(:button, class: 'close', data: { dismiss: 'alert' }) do - concat content_tag(:span, '×'.html_safe, 'aria-hidden' => true) - concat content_tag(:span, 'Close', class: 'sr-only') - end) concat message + concat content_tag(:button, "", class: 'btn-close', data: { 'bs-dismiss': 'alert' }, 'aria-label': 'Close') end) end nil @@ -29,9 +26,8 @@ module ApplicationHelper 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' + content_tag(:li, class: 'nav-item') do + link_to body, url, class: current_page?(url) ? 'nav-link active': 'nav-link' end end diff --git a/app/views/about/index.de.html.erb b/app/views/about/index.de.html.erb index f627490..0c9d6c7 100644 --- a/app/views/about/index.de.html.erb +++ b/app/views/about/index.de.html.erb @@ -1,4 +1,4 @@ -
+

Willkommen auf Projekt Euler!

Diese Seite ist eine Übersetzung der englischen Rätsel-Webseite projecteuler.net.

@@ -7,26 +7,27 @@ <% end %>

-
- -
-
+
+
+

Ansehen

Sehen Sie sich die mathematischen Probleme in deutscher Sprache an.

-

- <%= link_to problems_path, class: 'btn btn-primary' do %> - Zu den Problemen » - <% end %> -

+ <%= link_to problems_path, class: 'btn btn-primary' do %> + Zu den Problemen » + <% end %>
-
+
+
+

Übersetzen

Bisher wurden erst <%= Problem.translated_count %> der <%= Problem.count %> Probleme übersetzt. Helfen Sie mit, Übersetzungen zu erstellen und anzupassen!

-
+
+
+

Verbessern

Vermissen Sie eine Funktion auf der Webseite, oder ist Ihnen ein Fehler aufgefallen? Dann helfen Sie beim Entwickeln der Webseite in Ruby on Rails!

-

Projekt Euler auf GitHub »

+ Projekt Euler auf GitHub »
\ No newline at end of file diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 000b870..a3e50d5 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,44 +1,46 @@ \ No newline at end of file diff --git a/app/views/translations/_form.html.erb b/app/views/translations/_form.html.erb index 86aa359..4ade8a4 100644 --- a/app/views/translations/_form.html.erb +++ b/app/views/translations/_form.html.erb @@ -2,10 +2,10 @@ <%= f.text_field :title %>
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index 4a29dc2..302e3c2 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -8,6 +8,6 @@ class ApplicationHelperTest < ActionView::TestCase test "bootstrap flash messages should work" do flash[:error] = "Error" - assert_equal "
Error
", flash_messages + assert_equal "
Error
", flash_messages end end