mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 02:28:50 +01:00
Update HTML for Bootstrap 5
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user