feat: Nouveau design

This commit is contained in:
2020-11-04 23:45:35 +01:00
parent 5c706477b0
commit d93ab68476
21 changed files with 111 additions and 6144 deletions

View File

@ -1,10 +1,7 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
{{ partial "head.html" . }}
<body{{ $currentPage := . }}{{ range .Site.Menus.main }}
{{ if or ($currentPage.IsMenuCurrent "main" .) (eq $currentPage.Menus.main.Pre .Pre) }} class="{{ .Pre }}"{{ end }}
{{ if $currentPage.IsHome }} class="home"{{ end }}
{{ end }}>
<body>
{{ partial "header.html" . }}
{{ block "all" . }}
<main role="main" id="content">

View File

@ -1,31 +1,23 @@
<div class="container-header">
<div class="container grid-xl">
<header class="navbar navbar-main">
<section class="navbar-section">
<header class="header">
{{ $headless := .Site.GetPage "/" }}
{{ $image := $headless.Resources.GetMatch "*" }}
{{ $resized := $image.Fill "1400x600 Top"}}
<img class="hero" src="{{ $resized.RelPermalink }}" alt="{{ .Title }}" />
<nav class="nav">
<ol>
<li class="logo">
<a href="/" class="">
<img src="logo.png" alt="Blason de Crémeaux" height="80" />
<img src="/icons/logo.jpg" alt="Blason de Crémeaux" />
</a>
</section>
<section class="navbar-center">
{{ range .Site.Menus.main }}
<a href="{{ .URL }}" class="m-2 btn btn-primary {{ .Identifier }} {{ .Pre }}">{{ .Name }}</a>
{{ end }}
</section>
</header>
</div>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
{{ if .HasChildren }}
<header class="navbar navbar-submenu">
<section class="navbar-center btn-group btn-group-block">
{{ $color := .Pre }}
{{ range .Children }}
<a class="btn {{if $currentPage.IsMenuCurrent "main" .}}btn-primary{{else}}btn-link{{end}} {{$color}}" href="{{ .URL }}">{{ .Name }}</a>
<li>
{{ range .Site.Menus.main }}
<li class="link">
<a href="{{ .URL }}" class="m-2 btn btn-primary {{ .Pre }}">
<img src="/icons/{{ .Identifier }}.jpg" alt="{{ .Name }}" />
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
</section>
</header>
{{ end }}
{{ end }}
{{ end }}
</div>
</ol>
</nav>
</header>