diff --git a/app/services/osuny/simple_navigation_renderer.rb b/app/services/osuny/simple_navigation_renderer.rb index 6fd290602161190c1d0f86dd16246fa9f65f4a81..b6857b68e21279677696b68b500714ad00d18d76 100644 --- a/app/services/osuny/simple_navigation_renderer.rb +++ b/app/services/osuny/simple_navigation_renderer.rb @@ -33,7 +33,7 @@ class Osuny::SimpleNavigationRenderer < SimpleNavigation::Renderer::Base if item.options.has_key? :image image = item.options[:image] part += "<a href=\"#{item.url}\">" - part += ActionController::Base.helpers.image_tag image, class: 'image' + part += ActionController::Base.helpers.image_tag image, class: 'image', loading: :lazy part += "</a>" end part += "<h2>#{item_name_and_link}</h2>" diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index 371d61af2d74740cfc456c730fdddd59334239e6..2a52a293a7fbd0b0bfae56c4ac91840009f9f6b0 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -86,11 +86,11 @@ <div class="row mt-5 pt-5"> <% @namespaces.each do |namespace| %> <% - path = send "admin_#{namespace.to_s.downcase}_root_path" - description = t "#{namespace.to_s.downcase}.description.text" + path = send "admin_#{namespace.to_s.underscore}_root_path" + description = t "#{namespace.to_s.underscore}.description.text" %> <div class="col-lg-3"> - <%= osuny_panel namespace.model_name.human, image: "admin/#{namespace.to_s.downcase}.jpg" do %> + <%= osuny_panel namespace.model_name.human, image: "admin/#{namespace.to_s.underscore}.jpg" do %> <p><%= description.truncate 180 %></p> <%= link_to t('show'), path, class: 'stretched-link' %> <% end %> diff --git a/app/views/admin/layouts/themes/pure/_nav.html.erb b/app/views/admin/layouts/themes/pure/_nav.html.erb index 2ced5b0cf1e9bc56e9b20182a580ab60c63067df..e55f8cd2dab077edb71c85db909729ef9857b1bc 100644 --- a/app/views/admin/layouts/themes/pure/_nav.html.erb +++ b/app/views/admin/layouts/themes/pure/_nav.html.erb @@ -50,7 +50,7 @@ context ||= :admin image = 'avatar.jpg' end %> - <%= image_tag image, class: 'image' %> + <%= image_tag image, class: 'image', loading: :lazy %> <h2><%= link_to current_user.to_s, admin_user_path(current_user) %></h2> <ul> <li><%= link_to t('menu.profile'), edit_user_registration_path %></li> diff --git a/app/views/admin/layouts/themes/pure/_panel.html.erb b/app/views/admin/layouts/themes/pure/_panel.html.erb index e4f00331395575b17e7579d9ed3ae78c0c3bf6fd..622f74dd953a269dad2b4628e7d9fa97a0885603 100644 --- a/app/views/admin/layouts/themes/pure/_panel.html.erb +++ b/app/views/admin/layouts/themes/pure/_panel.html.erb @@ -1,5 +1,5 @@ <section class="pure__section flex-fill position-relative"> - <%= image_tag image, class: 'img-fluid mb-3' if image %> + <%= image_tag image, class: 'img-fluid mb-3', loading: :lazy if image %> <% if action %> <div class="float-end"><%= raw action %></div> <% end %>