44 lines
1.4 KiB
Text
44 lines
1.4 KiB
Text
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>rails8-memoapp</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<meta name="turbo-cache-control" content="no-cache">
|
|
<%= 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 current_user %>
|
|
<div class="fixed top-4 left-4 text-sm text-gray-600 bg-gray-100 px-3 py-1 rounded-full">
|
|
<%= current_user.email %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% 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>
|
|
<div class="modal"
|
|
tabindex="-1"
|
|
data-controller="modal"
|
|
data-action="click->modal#clickOutside turbo:frame-load->modal#open turbo:submit-end->modal#close">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<%= turbo_frame_tag "modal" %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|