2023-02-04 14:04:35 +01:00
|
|
|
<!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>
|
2023-02-04 14:22:05 +01:00
|
|
|
<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">
|
2023-02-04 14:04:35 +01:00
|
|
|
|
2023-02-04 14:22:05 +01:00
|
|
|
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
|
2023-02-04 14:38:27 +01:00
|
|
|
<li><%= link_to t("fields.home"), root_path, class: "nav-link px-2 #{current_page?(root_path) ? "text-secondary" : "text-white"}" %></li>
|
|
|
|
<% if current_user %>
|
2023-02-05 21:01:07 +01:00
|
|
|
<li><%= link_to t("fields.count"), count_index_path, class: "nav-link px-2 #{current_page?(count_index_path) ? "text-secondary" : "text-white"}" %></li>
|
2023-04-06 19:58:34 +02:00
|
|
|
<li><%= link_to t("fields.profile"), profile_path, class: "nav-link px-2 #{current_page?(profile_path) ? "text-secondary" : "text-white"}" %></li>
|
2023-02-04 14:38:27 +01:00
|
|
|
<% end %>
|
2023-02-04 14:22:05 +01:00
|
|
|
</ul>
|
|
|
|
|
2023-02-04 14:38:27 +01:00
|
|
|
<div class="nav text-end">
|
2023-02-04 14:22:05 +01:00
|
|
|
<% if current_user %>
|
2023-02-04 14:38:27 +01:00
|
|
|
<a class="nav-link disabled"><%= current_user.email %></a>
|
2023-02-04 14:22:05 +01:00
|
|
|
<%= 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>
|
2023-02-04 14:04:35 +01:00
|
|
|
|
2023-02-04 14:38:27 +01:00
|
|
|
<div class="container">
|
|
|
|
<% if notice %>
|
2023-02-05 21:01:07 +01:00
|
|
|
<div class="alert alert-primary" role="alert">
|
|
|
|
<%= notice %>
|
|
|
|
</div>
|
2023-02-04 14:38:27 +01:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if alert %>
|
2023-02-05 21:01:07 +01:00
|
|
|
<div class="alert alert-danger" role="alert">
|
|
|
|
<%= alert %>
|
|
|
|
</div>
|
2023-02-04 14:38:27 +01:00
|
|
|
<% end %>
|
2023-02-05 21:01:07 +01:00
|
|
|
|
2023-02-04 14:38:27 +01:00
|
|
|
<%= yield %>
|
|
|
|
</div>
|
2023-02-04 14:04:35 +01:00
|
|
|
</body>
|
|
|
|
</html>
|