{{define "header"}}<!doctype html>
<html lang="en" class="h-100">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">


	<script src="./assets/dist/js/jquery.min.js"></script>
	<script src="./assets/dist/js/bootstrap.bundle.min.js"></script>
	<link href="./assets/dist/css/bootstrap.min.css" rel="stylesheet">
	<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png">
	<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
	<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
	<link rel="manifest" href="./site.webmanifest">
        <link href="css/min/gokapi.min.{{ template "css_main"}}.css" rel="stylesheet">
	<link href="./assets/dist/icons/bootstrap-icons.min.css" rel="stylesheet">
{{ if .IsAdminView }}
        <title>{{.PublicName}} Admin</title>
	<script src="./assets/dist/js/dropzone.min.js?v={{ template "js_dropzone_version"}}"></script>
	<script src="./assets/dist/js/clipboard.min.js"></script>
	<script src="./assets/dist/js/datatables.min.js"></script>
	<script src="./assets/dist/js/qrcode.min.js"></script>
	<script src="./assets/dist/js/flatpickr.min.js"></script>
	<link  href="./assets/dist/css/dropzone.min.css" rel="stylesheet">
	<link  href="./assets/dist/css/datatables.min.css" rel="stylesheet">
	<link  href="./assets/dist/css/flatpickr.min.css" rel="stylesheet">
	<link  href="./assets/dist/css/flatpickr.dark.min.css" rel="stylesheet">

	<style>
		.masthead-brand {
			float: left;
		}
		.nav-masthead {
			float: right;
		}
	</style>
{{ else }}
   {{ if .IsDownloadView }}
       {{ if .IsPasswordView }}
          <title>{{.PublicName}}: Password required</title>
	  <meta name="title" content="{{.PublicName}}">
    	  <meta name="description" content="Password required">
    	  
    	  <meta property="og:title" content="{{.PublicName}}"/>
  	  <meta property="og:description" content="Password required"/>
       {{ else }}
          <title>{{.PublicName}}: {{.Name}}</title>
	  <meta name="title" content="{{.PublicName}}: {{.Name}}">
    	  <meta name="description" content="{{.Size}}">
    	  
    	  <meta property="og:title" content="{{.Name}}"/>
  	  <meta property="og:description" content="{{.Size}}"/>
       {{end }}
  	  <meta property="og:url" content="{{.BaseUrl}}"/>
   {{ else }}
        <title>{{.PublicName}}</title>
   {{end }}
	<style>
	body {
	  box-shadow: inset 0 0 5rem rgba(0, 0, 0, .5);
	}
	</style>
	<script src="./js/min/end2end_download.min.{{ template "js_e2eversion"}}.js"></script>
{{end}}
  </head>
  <body class="d-flex h-100 text-center text-white bg-dark">
{{ if .IsAdminView }}
  <div class="d-flex w-100 h-100 p-3 mx-auto flex-column">
      <header class="masthead mb-auto">
        <div  style="max-width: 80em;  margin: 0 auto;"  class="inner">
          <h1>{{.PublicName}}</h1>
          <nav class="nav nav-masthead justify-content-center">
            <a class="nav-link {{ if eq .ActiveView 0}}active{{ end }}" href="./admin">Upload</a>
            {{ if .ActiveUser.HasPermissionManageLogs }}
            <a class="nav-link {{ if eq .ActiveView 1 }}active{{ end }}" href="./logs">Logs</a>
            {{ end }}
            {{ if and .ActiveUser.HasPermissionManageUsers .IsUserTabAvailable }}
            <a class="nav-link {{ if eq .ActiveView 3 }}active{{ end }}" href="./users">Users</a>
            {{ end }}
            <a class="nav-link {{ if eq .ActiveView 2 }}active{{ end }}" href="./apiKeys">API</a>
            {{ if .IsLogoutAvailable }}<a class="nav-link" href="./logout">Logout</a>{{ end }}
          </nav>
        </div>
      </header>
  <main style="margin-top: 2rem">
{{ else }}
  <div class="d-flex w-100 h-100 p-3 mx-auto flex-column">
  <header class="mb-auto">
    <div>
      <h1><a href="/index" style="text-decoration: none;display: block;">{{.PublicName}}</a></h1>
    </div>
  </header>
  <main>
{{ end }}
{{end}}

