osunyorg/admin

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

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title><%= content_for?(:title) ? raw("#{yield(:title)} ∙ Osuny") : 'Osuny' %></title>
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>
    <script nonce="<%= request.content_security_policy_nonce %>">
    // Avoid opening menu on load
    </script>
    <%= stylesheet_link_tag 'admin', media: 'all' %>
    <%= favicon_link_tag 'favicon.png' %>
  </head>
  <body class="<%= body_classes %>">
    <%= render "server/application/nav" %>
    <%= render "admin/application/components/hero" %>
    <%= render 'application/notice' %>
    <main class="container-fluid">
      <% unless current_user.confirmed? %>
        <div class="alert alert-warning">
          <div class="alert-message">
            <%= t('admin.users_alerts.pending_confirmation_html', duration: distance_of_time_in_words(Rails.configuration.devise.allow_unconfirmed_access_for)) %>
            <br>
            <%= link_to t('devise.confirmations.new.resend_confirmation_instructions'), resend_user_confirmation_path, method: :post, class: 'alert-link' %>
          </div>
        </div>
      <% end %>
      <div class="position-relative">
        <%= yield %>
      </div>
    </main>
    <%= render "admin/application/components/commands" %>
    <%= render "server/application/footer" %>
    <%= javascript_include_tag 'server' %>
    <%= render 'bugsnag' %>
  </body>
</html>