Add auth and ruby update

This commit is contained in:
david 2024-09-22 21:57:05 +02:00
parent 5d50194f39
commit fbf6923835
43 changed files with 614 additions and 64 deletions

View file

@ -1,5 +1,5 @@
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container">
<div class="container-fluid">
<a class="navbar-brand" href="<%= root_path %>">
<%= tag.i(class: "bi bi-universal-access") %>
a11ydive
@ -12,12 +12,21 @@
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<% @navbar_items.each do |navbar_item| %>
<li class="nav-item">
<a class="nav-link <%= @nav_path.to_s == navbar_item[:path].to_s && "active" %>" <%= @nav_path.to_s == navbar_item[:path].to_s && "aria-current=\"page\"" %> href="<%= url_for(navbar_item[:path]) %>">
<% if navbar_item[:icon] %>
<span aria-hidden="true" class="bi-<%= navbar_item[:icon] %>"></span>
<% if navbar_item[:method].present? && navbar_item[:method] != :get %>
<%= button_to(navbar_item[:path], method: navbar_item[:method], class: "nav-link") do %>
<% if navbar_item[:icon] %>
<span aria-hidden="true" class="bi-<%= navbar_item[:icon] %>"></span>
<% end %>
<%= navbar_item[:label] %>
<% end %>
<%= navbar_item[:label] %>
</a>
<% else %>
<a class="nav-link <%= (navbar_item[:active] || @nav_path.to_s == navbar_item[:path].to_s) && "active" %>" <%= @nav_path.to_s == navbar_item[:path].to_s && "aria-current=\"page\"" %> href="<%= url_for(navbar_item[:path]) %>">
<% if navbar_item[:icon] %>
<span aria-hidden="true" class="bi-<%= navbar_item[:icon] %>"></span>
<% end %>
<%= navbar_item[:label] %>
</a>
<% end %>
</li>
<% end %>
<%# <li class="nav-item">