cityssm/attendance-tracking

View on GitHub
views/_header.ejs

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html class="has-navbar-fixed-top is-fullwidth" lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="csrf-token" content="<%= csrfToken %>" />

  <title>
    <%= headTitle %>:
    <%= configFunctions.getConfigProperty("application.applicationName") %>
  </title>

  <% if (!configFunctions.isLogoOverwritten) { %>
    <link rel="apple-touch-icon" sizes="180x180" href="<%= urlPrefix %>/images/favicon/apple-touch-icon.png" />
    <link rel="icon" type="image/png" sizes="32x32" href="<%= urlPrefix %>/images/favicon/favicon-32x32.png" />
    <link rel="icon" type="image/png" sizes="16x16" href="<%= urlPrefix %>/images/favicon/favicon-16x16.png" />
    <link rel="icon" type="image/svg+xml" href="<%= urlPrefix %>/images/favicon/favicon.svg" />
    <link rel="mask-icon" href="<%= urlPrefix %>/images/favicon/safari-pinned-tab.svg" color="#5bbad5" />
    <link rel="shortcut icon" href="<%= urlPrefix %>/images/favicon/favicon.ico" />
  <% } %>

  <link rel="stylesheet" href="<%= urlPrefix %>/stylesheets/style.css" />
</head>

<body>
  <nav class="navbar is-light is-fixed-top is-static-print" id="cityssm-theme--navbar" role="navigation"
    aria-label="main navigation">
    <div class="container">
      <div class="navbar-brand">
        <a class="navbar-item" href="<%= urlPrefix %>/dashboard">
          <img class="mr-3"
            src="<%= urlPrefix + configFunctions.getConfigProperty("application.smallLogoURL") %>"
            alt=""
            height="28" />
          <strong><%= configFunctions.getConfigProperty("application.applicationName") %></strong>
        </a>
        <a class="navbar-burger burger is-hidden-print" role="button" aria-label="menu" aria-expanded="false">
          <span aria-hidden="true"></span>
          <span aria-hidden="true"></span>
          <span aria-hidden="true"></span>
        </a>
      </div>

      <div class="navbar-menu">
        <div class="navbar-start">
          <a class="navbar-item" href="<%= urlPrefix %>/attendance">
            <span class="icon mr-1">
              <span class="fa-layers fa-fw" aria-hidden="true">
                <i class="fas fa-hard-hat"></i>
                <i class="fas fa-check" data-fa-transform="shrink-8 right-8 down-5" data-fa-glow="10"></i>
              </span>
            </span>
            <span>Attendance</span>
          </a>

          <div class="navbar-item has-dropdown">
            <a class="navbar-link is-arrowless" href="#">
              <span>More</span>
              <span class="icon ml-1">
                <i class="fas fa-angle-down" aria-hidden="true"></i>
              </span>
            </a>
            <div class="navbar-dropdown">
              <a class="navbar-item" href="<%= urlPrefix %>/reports">
                <span class="icon mr-1">
                    <i class="fas fa-fw fa-file" aria-hidden="true"></i>
                </span>
                <span>Reports</span>
              </a>
              <% if (configFunctions.getConfigProperty('features.help')) { %>
                <hr class="navbar-divider" />
                <a class="navbar-item" href="https://cityssm.github.io/attendance-tracking/docs"
                    target="_blank"
                    accesskey="h"
                    rel="noopener noreferrer">
                    <span class="icon mr-1">
                        <i class="fas fa-fw fa-question-circle" aria-hidden="true"></i>
                    </span>
                    <span>Help</span>
                </a>
              <% } %>
            </div>
          </div>
        </div>

        <div class="navbar-end">
          <a class="navbar-item" id="cityssm-theme--logout-button" role="button" href="#" accesskey="x">
            <span class="icon mr-1">
              <i class="fas fa-fw fa-sign-out-alt" aria-hidden="true"></i>
            </span>
            <span>Log Out <%=user.userName %></span>
          </a>
        </div>
      </div>
    </div>
  </nav>

  <main class="container pt-2 px-3 mr-auto has-min-page-height"
    data-session-keep-alive-millis="<%= configFunctions.keepAliveMillis %>"
    data-url-prefix="<%= urlPrefix %>"
    data-user-name="<%= user.userName %>"
    data-can-update="<%= user.canUpdate ? "true" : "false" %>"
    data-is-admin="<%= user.isAdmin ? "true" : "false" %>">