<!DOCTYPE html>
<html>
  <head>
    <title>rails8-memoapp</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" %>
    <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
    <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module", as: "script" %>
  </head>

  <body class="bg-gray-50">
  <% if user_signed_in? %>
    <div class="fixed top-4 right-4">
      <%= button_to destroy_user_session_path,
          method: :delete,
          class: "bg-gray-500 hover:bg-gray-600 text-white font-bold py-2 px-4 rounded-lg transition-colors duration-200" do %>
        退出
      <% end %>
    </div>
  <% end %>

  <div class="max-w-2xl mx-auto px-4">
    <%= yield %>
  </div>
</body>

</html>