tabletop-companion/app/views/layouts/application.html.erb

55 lines
1.9 KiB
Plaintext
Raw Normal View History

2024-04-13 10:22:40 +00:00
<!DOCTYPE html>
<html>
<head>
<title><%= "#{yield(:title)} | " if content_for? :title %><%= t("site_name") %></title>
2024-04-13 10:22:40 +00:00
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
2024-05-26 08:38:17 +00:00
<%= stylesheet_link_tag :all, "data-turbo-track": "reload" %>
2024-04-13 10:22:40 +00:00
<%= javascript_importmap_tags %>
2024-04-14 19:01:32 +00:00
<meta name="turbo-refresh-method" content="morph">
<meta name="turbo-refresh-scroll" content="preserve">
2024-04-13 10:22:40 +00:00
</head>
<body>
2024-06-21 08:09:19 +00:00
<%= turbo_frame_tag :modal %>
2024-04-14 19:01:32 +00:00
<header>
2024-06-14 07:39:38 +00:00
<%= yield(:header_content) if content_for?(:header_content) %>
2024-06-29 08:03:27 +00:00
<h1><%= link_to root_path do %>
<%= image_tag "logo.png", width: "600px" %>
<% end %></h1>
2024-05-26 08:51:17 +00:00
<nav>
<ul>
<% if logged_in? %>
2024-06-05 17:46:27 +00:00
<li><%= link_to t(".characters"), characters_path %></li>
2024-05-28 19:22:08 +00:00
<li><%= link_to t(".tables"), tables_path %></li>
2024-05-30 08:07:54 +00:00
<li><%= link_to t(".profile"), user_path(Current.user) %></li>
2024-05-26 08:51:17 +00:00
<li><%= link_to t("log_out"), logout_path, data: {turbo_method: :delete} %></li>
2024-05-26 09:34:09 +00:00
<% if Current.user.admin? %>
<li><%= link_to t("administration"), admin_index_path %></li>
<% end %>
2024-05-26 08:51:17 +00:00
<% else %>
<li><%= link_to t("log_in"), login_path %></li>
2024-06-19 17:22:20 +00:00
<% if ActiveModel::Type::Boolean.new.cast(ENV.fetch("ENABLE_SIGNUP") { false } ) %>
<li><%= link_to t("sign_up"), new_user_path %></li>
<% end %>
2024-05-26 08:51:17 +00:00
<% end %>
</ul>
</nav>
2024-04-14 19:01:32 +00:00
</header>
2024-04-21 12:45:31 +00:00
<main>
2024-05-30 16:08:51 +00:00
<%= render partial: "shared/flash_messages" %>
2024-05-26 10:42:48 +00:00
<%= yield(:submenu) if content_for?(:submenu) %>
2024-06-12 17:20:14 +00:00
<%= yield(:main) if content_for?(:main) %>
<%= yield unless content_for?(:main) %>
2024-04-21 12:45:31 +00:00
</main>
2024-06-27 08:43:26 +00:00
<footer>
<%= link_to "https://tablewarez.net", target: "_blank" do %>
<%= t(".made_by") %>
<%= image_tag "tablewarez.png", width: "300px" %>
<% end %>
</footer>
2024-04-13 10:22:40 +00:00
</body>
</html>