rootstrap/rails_hotwire_base

View on GitHub
app/views/layouts/application.html.erb

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
  <head>
    <title>RailsHotwireBase</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>

    <%= stylesheet_link_tag 'application', media: 'all', data: { turbo_track: :reload } %>
    <%= javascript_pack_tag 'application', data: { turbo_track: :reload } %>
    <%= yield :head %>
    <%= stylesheet_pack_tag "application", data: { turbo_track: :reload } %>
  </head>

  <body>
    <div class="flex flex-col bg-gray-50">
      <% if user_signed_in? %>
        <%= render "shared/nav" %>
      <% end %>
      <%= render "shared/notifications" %>
      <main class="flex flex-col justify-center items-center min-h-screen w-full">
        <div class="max-w-7xl py-6 sm:px-6 lg:px-8">
          <%= yield %>
        </div>
      </main>
    </div>
  </body>
</html>