count-anything/app/views/layouts/application.html.erb

38 lines
1.2 KiB
Plaintext
Raw Normal View History

<!DOCTYPE html>
<html lang="fr">
<head>
<title>CountAnything</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
</head>
<body>
<header class="p-3 text-bg-dark">
<div class="container">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
<li><%= link_to t("fields.home"), root_path, class: "nav-link px-2 text-secondary" %></li>
</ul>
<div class="text-end">
<% if current_user %>
<%= button_to t("fields.logout"), destroy_user_session_path, method: "delete", class: "btn btn-danger me-2" %>
<% else %>
<%= link_to t("fields.login"), new_user_session_path, class: "btn btn-outline-light me-2" %>
<% end %>
</div>
</div>
</div>
</header>
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
<%= yield %>
</body>
</html>