app/views/layouts/application.html.erb
<!DOCTYPE html>
<html lang="en" class="h-100">
<head>
<title>Dragnet</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "application" %>
</head>
<body class="d-flex flex-column h-100">
<nav class="navbar navbar-expand-lg bg-light mb-3 border-bottom">
<div class="container-fluid">
<a href="<%= root_path %>" class="navbar-brand mb-0 h1">
Dragnet
</a>
<% if user_signed_in? %>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<% if current_user.valid_email? %>
<%= image_tag current_user.gravatar_url, size: 30, class: 'rounded-circle' %>
<% else %>
<%= icon 'fas', 'user' %>
<% end %>
</a>
<div class="dropdown-menu dropdown-menu-end">
<p class="fs-6 mb-1 px-3">Signed in as <strong><%= current_user.login %></strong></p>
<div class="dropdown-divider"></div>
<%= link_to 'Help', '#', class: 'dropdown-item' %>
<div class="dropdown-divider"></div>
<%= button_to 'Sign out', destroy_user_session_path, method: :delete, class: 'dropdown-item' %>
</div>
</li>
</ul>
<% end %>
</div>
</nav>
<main class="container-fluid flex-shrink-0">
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<% if notice %><%= toast message: notice, level: :info %><% end %>
<% if alert %><%= toast message: alert, level: :danger %><% end %>
</div>
<div class="container">
<%= yield %>
</div>
</main>
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 px-4 mt-auto border-top bg-light">
<div class="col-md-8">
<div class="text-muted">
<% if Rails.env.production? %>
<small>Release <%= release_link %></small>
<% else %>
<small>
Version <%= version_link %>
</small>
<small>— <%= Rails.env %></small>
<small>— <%= ui_tests_link %></small>
<% end %>
</div>
<small class="text-muted">
© 2023 <%= author_link label: 'Delon R. Newman' %>.
Dragnet is open source and released under the terms of the <%= licence_link label: 'GNU General Public License v2 (GPL)' %>.
</small>
</div>
<ul class="nav col-md-4 mt-3 mb-4 mt-md-0 mb-md-0 justify-content-end list-unstyled d-flex">
<li class="ms-3"><%= github_link %></li>
</ul>
</footer>
<%= javascript_include_tag "application" %>
</body>
</html>