<!DOCTYPE html>
<html lang="en">
  <head>
    <title><%= @page_title ? "#{@page_title} // " : "" %>Flipper</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="<%= script_name %>/octicons/octicons.css">
    <link rel="stylesheet" href="<%= script_name %>/css/application.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <div class="container">
      <%- unless Flipper::UI.configuration.banner_text.nil? -%>
        <div class="alert alert-<%= Flipper::UI.configuration.banner_class %> text-center font-weight-bold">
          <%= Flipper::UI.configuration.banner_text %>
        </div>
      <%- end -%>

      <nav aria-label="breadcrumb">
        <ol class="breadcrumb bg-white border border-light align-items-center">
          <% @breadcrumbs.each do |breadcrumb| %>
            <li class="breadcrumb-item <% if breadcrumb.active? %>active<% end %>">
              <% if breadcrumb.active? %>
                <%= breadcrumb.text %>
              <% else %>
                <a href="<%= breadcrumb.href %>"><%= breadcrumb.text %></a>
              <% end %>
            </li>
          <% end %>
          <li class="ml-auto">
            <%- if Flipper::UI.feature_creation_enabled -%>
              <a class="btn btn-sm btn-light" href="<%= script_name %>/features/new">Add Feature</a>
            <%- end -%>
          </li>
        </ol>
      </nav>

      <div>
        <%== yield %>
      </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
    <script src="<%= script_name %>/js/application.js"></script>
  </body>
</html>
