aceberg/ForAuth

View on GitHub
internal/web/templates/header.html

Summary

Maintainability
Test Coverage
{{ define "header.html"}}

<!DOCTYPE html>
<html lang="en" data-bs-theme="{{ .Config.Color }}">
<head>
  <title>ForAuth</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!--Favicon-->
  <link href="data:image/x-icon;base64,{{ .Config.Icon }}" rel="icon" type="image/x-icon" />
  {{ if eq .Config.NodePath "" }}
  <!-- Font for icons -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
  <!-- Bootstrap and theme -->
  <link href="https://cdn.jsdelivr.net/npm/aceberg-bootswatch-fork@v5.3.3-2/dist/{{ .Config.Theme }}/bootstrap.min.css" rel="stylesheet">
  {{ else }} <!-- Local node_modules -->
  <link rel="stylesheet" href="{{ .Config.NodePath }}/node_modules/bootstrap-icons/font/bootstrap-icons.css">
  <link href="{{ .Config.NodePath }}/node_modules/bootswatch/dist/{{ .Config.Theme }}/bootstrap.min.css" rel="stylesheet">
  {{ end }}
</head>
<body>
  <nav class="navbar navbar-expand-sm navbar-dark bg-primary">
    <div class="container-lg">
      <ul class="nav navbar-nav me-auto mb-2 mb-sm-0">
        <li class="nav-item">
          <a class="nav-link active" href="http://{{ .Config.Host }}:{{ .Config.PortConf }}">Config</a>
        </li>
        <li class="nav-item">
          <a class="nav-link active" href="http://{{ .Config.Host }}:{{ .Config.Port }}">Proxy</a>
        </li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li class="nav-item">
          <a class="nav-link active fs-3 ms-md-2" target="_blank" href="https://github.com/aceberg/ForAuth"><i class="bi bi-github"></i></a>
      </li>
      </ul>
    </div>
  </nav>
{{ end }}