go-bouquins/templates/header.html

35 lines
1.8 KiB
HTML
Raw Permalink Normal View History

2017-07-30 16:09:27 +00:00
<!DOCTYPE html>
<html lang="fr">
<head>
2017-08-03 17:51:56 +00:00
<title>{{ if .Title }}{{ .Title }} | {{ end }}Bouquins</title>
2017-07-30 16:09:27 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
2017-09-05 15:35:10 +00:00
<link rel="stylesheet" href="{{ assetUrl "bootstrap" "css" }}">
2017-09-09 10:28:46 +00:00
<link rel="stylesheet" href="{{ assetUrl "bouquins" "css" }}">
2019-09-12 17:09:52 +00:00
<link rel="stylesheet" href="{{ assetUrl "all" "css" }}">
2017-09-05 15:35:10 +00:00
<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" }}">
2017-07-30 16:09:27 +00:00
</head>
<body>
2019-09-12 17:09:52 +00:00
<nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-3" id="nav">
2017-07-30 16:09:27 +00:00
<div class="container">
2019-09-12 17:09:52 +00:00
<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>
2017-07-30 16:09:27 +00:00
</ul>
2019-09-12 17:09:52 +00:00
<ul class="navbar-nav mr-1">
2017-09-08 16:13:22 +00:00
{{ if .Username }}
2019-09-12 17:09:52 +00:00
<li class="nav-item"><a href="/logout" class="nav-link">{{ .Username }} <i title="Déconnexion" class="fas fa-sign-in-alt"></i></a></li>
2017-09-08 16:13:22 +00:00
{{ else }}
2019-09-12 17:09:52 +00:00
<li class="nav-item"><a href="/login" class="nav-link">Connexion <i class="fas fa-sign-out-alt"></i></a></li>
2017-09-08 16:13:22 +00:00
{{ end }}
</ul>
2019-09-12 17:09:52 +00:00
<form class="form-inline" role="search" method="get" action="/search/">
<input name="q" type="text" class="form-control" placeholder="Recherche">
</form>
2017-07-30 16:09:27 +00:00
</div>
</nav>