go-bouquins/templates/header.html
Meutel c17e238951
All checks were successful
continuous-integration/drone/push Build is passing
Bootstrap 4
2019-09-12 19:09:52 +02:00

35 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<title>{{ if .Title }}{{ .Title }} | {{ end }}Bouquins</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
<link rel="stylesheet" href="{{ assetUrl "bootstrap" "css" }}">
<link rel="stylesheet" href="{{ assetUrl "bouquins" "css" }}">
<link rel="stylesheet" href="{{ assetUrl "all" "css" }}">
<link rel="preload" href="{{ assetUrl "vue" "js" }}" as="script">
<link rel="prefetch" href="{{ assetUrl "vue" "js" }}">
<link rel="preload" href="{{ assetUrl "bouquins" "js" }}" as="script">
<link rel="prefetch" href="{{ assetUrl "bouquins" "js" }}">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-3" id="nav">
<div class="container">
<ul class="navbar-nav mr-auto">
<li class="nav-item {{ if ne .Page "search" }}{{ if (ne .Page "about") }} active{{ end }}{{ end }}"><a href="/" class="nav-link">Accueil</a></li>
<li class="nav-item {{ if eq .Page "search" }} active{{ end }}"><a href="/search/" class="nav-link">Recherche</a></li>
<li class="nav-item {{ if eq .Page "about" }} active{{ end }}"><a href="/about/" class="nav-link">A propos</a></li>
</ul>
<ul class="navbar-nav mr-1">
{{ if .Username }}
<li class="nav-item"><a href="/logout" class="nav-link">{{ .Username }} <i title="Déconnexion" class="fas fa-sign-in-alt"></i></a></li>
{{ else }}
<li class="nav-item"><a href="/login" class="nav-link">Connexion <i class="fas fa-sign-out-alt"></i></a></li>
{{ end }}
</ul>
<form class="form-inline" role="search" method="get" action="/search/">
<input name="q" type="text" class="form-control" placeholder="Recherche">
</form>
</div>
</nav>