<%--
  ~ Copyright (c) 2017 Google Inc. All Rights Reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License"); you
  ~ may not use this file except in compliance with the License. You may
  ~ obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  ~ implied. See the License for the specific language governing
  ~ permissions and limitations under the License.
  --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<head>
  <link rel='stylesheet' href='/css/navbar.css'>
  <link rel='stylesheet' href='/css/common.css'>
  <link rel='stylesheet' href='https://www.gstatic.com/external_hosted/materialize/all_styles-bundle.css'>
  <link rel='icon' href='https://www.gstatic.com/images/branding/googleg/1x/googleg_standard_color_32dp.png' sizes='32x32'>
  <link rel='stylesheet' href='https://fonts.googleapis.com/icon?family=Material+Icons'>
  <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700'>
  <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script>
  <script src='https://www.gstatic.com/external_hosted/materialize/materialize.min.js'></script>
  <script type='text/javascript'>
    if (${analyticsID}) {
        // Autogenerated from Google Analytics
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
        ga('create', ${analyticsID}, 'auto');
        ga('send', 'pageview');
    }
    links = ${navbarLinksJson};
  </script>
  <title>VTS Dashboard</title>
</head>
<body>
  <nav id='navbar'>
    <div class='nav-wrapper'>
      <span>
        <c:forEach items='${navbarLinks}' var='link'>
          <a href='${link[0]}' class='breadcrumb'>${link[1]}</a>
        </c:forEach>
      </span>
      <ul class='right'><li>
        <a id='dropdown-button' class='dropdown-button btn red lighten-3' href='#' data-activates='dropdown'>
          ${email}
        </a>
      </li></ul>
      <ul id='dropdown' class='dropdown-content'>
        <li><a href='${logoutURL}'>Log out</a></li>
      </ul>
      </div>
    </div>
  </nav>
</body>