Add auth and ruby update
This commit is contained in:
parent
5d50194f39
commit
fbf6923835
43 changed files with 614 additions and 64 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<% if flash[:alert] || flash[:notice] %>
|
||||
<div class="container mt-3 mb-3">
|
||||
<div class="container-fluid mt-3 mb-3">
|
||||
<% if flash[:alert] %>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<%= flash[:alert] %><% flash.delete(:alert) %>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
<div class="col-auto px-0">
|
||||
<div id="sidebar" class="collapse collapse-horizontal show border-0">
|
||||
<div id="sidebar-nav" class="list-group border-0 rounded-0 text-sm-start min-vh-100">
|
||||
<% if @sidebar_items %>
|
||||
<% @sidebar_items.each do |sidebar_item| %>
|
||||
<% if sidebar_item[:method].present? && sidebar_item[:method] != :get %>
|
||||
<%= button_to(sidebar_item[:path], method: sidebar_item[:method], class: "list-group-item border-end-0 d-inline-block text-truncate") do %>
|
||||
<% if sidebar_item[:icon] %>
|
||||
<span aria-hidden="true" class="bi-<%= sidebar_item[:icon] %>"></span>
|
||||
<% end %>
|
||||
<%= sidebar_item[:label] %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<a class="list-group-item border-0 d-inline-block text-truncate <%= (sidebar_item[:active] || @nav_path.to_s == sidebar_item[:path].to_s) && "active" %>" <%= @nav_path.to_s == sidebar_item[:path].to_s && "aria-current=\"page\"" %> href="<%= url_for(sidebar_item[:path]) %>">
|
||||
<% if sidebar_item[:icon] %>
|
||||
<span aria-hidden="true" class="bi-<%= sidebar_item[:icon] %>"></span>
|
||||
<% end %>
|
||||
<%= sidebar_item[:label] %>
|
||||
</a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="me-auto"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -12,12 +12,19 @@
|
|||
</head>
|
||||
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
<%= render partial: "layouts/sidebar" %>
|
||||
<%= render partial: "layouts/navigation" %>
|
||||
<%= render partial: "layouts/flash" %>
|
||||
<main class="mt-3 container">
|
||||
<%= yield %>
|
||||
</main>
|
||||
<footer class="container mt-auto"><%= Rails.configuration.build_version && "Version: #{Rails.configuration.build_version}" %>
|
||||
<div class="container-fluid">
|
||||
<div class="row flex-nowrap">
|
||||
<%= render partial: "layouts/sidebar" %>
|
||||
<main class="col ps-md-2 pt-2 <%= "border-start" if sidebar? %>">
|
||||
<%= render partial: "layouts/flash" %>
|
||||
<% if false && sidebar? %>
|
||||
<a href="#" data-bs-target="#sidebar" data-bs-toggle="collapse" class="p-1 text-decoration-none"><i class="bi bi-list bi-lg py-2 p-1"></i> Menu</a>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="container-fluid mt-auto"><%= Rails.configuration.build_version && "Version: #{Rails.configuration.build_version}" %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue