sul-dlss/pre-assembly

View on GitHub
app/views/shared/_header.html.erb

Summary

Maintainability
Test Coverage
<header class="mb-4">
  <a href="#content" class="visually-hidden-focusable">Skip to main content</a>
  <div class="container">
    <a class="su-brand-bar__logo" href="https://www.stanford.edu">Stanford University</a>
  </div>
  <div class="bg-navbar">
    <div class="container">
      <nav class="navbar navbar-expand-md navbar-dark topbar" role="navigation">
        <div class="container-fluid">
          <a class="mb-0 navbar-brand navbar-logo" href="https://library.stanford.edu">Stanford Libraries</a>
          <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-bs-toggle="collapse" data-target="#user-util-collapse" data-bs-target="#user-util-collapse" aria-controls="user-util-collapse" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
          </button>

          <div class="collapse navbar-collapse justify-content-md-end" id="user-util-collapse">
            <ul class="navbar-nav">
              <li class="nav-item">
                <%= link_to 'Usage instructions', 'https://github.com/sul-dlss/pre-assembly/wiki', class: 'nav-link text-white' %>
              </li>
            </ul>
          </div>
        </div>
      </nav>
    </div>
    <div class="al-masthead bg-navbar">
      <div class="container">
        <div class="row align-items-center">
          <div class="col-md-8 d-flex justify-content-center justify-content-md-start align-items-center">
            <span class="h1">
              <a href="/" class="text-white">Preassembly</a>
              </span>
          </div>
          <nav class="col-md-4 nav-links d-flex justify-content-md-end justify-content-center" aria-label="browse">
            <ul class="navbar-nav">
              <li class="nav-item ">
                <%= link_to 'Start new job', root_path, class: 'nav-link' %>
              </li>
              <li class="nav-item ml-3 ms-3">
                <%= link_to 'All jobs', job_runs_path, class: 'nav-link' %>
              </li>
              <li class="nav-item ml-3 ms-3">
                <%= link_to 'All projects', batch_contexts_path, class: 'nav-link' %>
              </li>
            </ul>
          </nav>
        </div>
      </div>
    </div>
</header>

<% flash.each do |key, value| %>
  <div class="container">
   <div class="alert alert-<%= key %> alert-dismissible fade show" role="alert">
      <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
      <%= value %>
    </div>
  </div>
<% end %>