aboutsummaryrefslogtreecommitdiff
path: root/layouts/index.html
blob: 74c4d99f88b3cf8a926a7780d7bab712ab89a775 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{{ define "head" }}
<link href="{{ .Site.BaseURL }}css/leaflet.css" rel="stylesheet" type="text/css">
{{ end }}

{{ define "footer" }}
<script>
  var fournilNav = document.getElementById('fournil-nav');
  var fournilHeader = document.getElementById('fournil-header');

  window.addEventListener('scroll', function (e) {
    var nav = document.getElementById('fournil-nav');
    if (nav.offsetTop > fournilHeader.clientHeight) {
      nav.classList.remove('fournil-nologo-nav');
    } else {
      nav.classList.add('fournil-nologo-nav');
    }
  });
</script>
<script src="{{ .Site.BaseURL }}js/leaflet.js"></script>
<script src="{{ .Site.BaseURL }}js/fournil-map.js"></script>
{{ end }}

{{ define "fournil-nav-classes" }} fournil-nologo-nav{{ end }}

{{ define "header" }}
<div id="fournil-header" class="header">
  <div class="fournil-logo-bio">
    <span>
      <img src="{{ .Site.BaseURL }}img/AB.svg" alt="logo AB" onerror="this.src='{{ .Site.BaseURL }}img/AB.png'">
    </span>
    <span>
      <img src="{{ .Site.BaseURL }}img/EU_Organic.svg" alt="logo bio EU" onerror="this.src='{{ .Site.BaseURL }}img/EU_Organic.png'">
    </span>
  </div>
  <div class="fournil-logo">
    <img class="fournil-logo-img" src="{{ .Site.BaseURL }}img/logo_pain_transparent.png" alt="logo">
    {{ partial "address.html" . }}
  </div>
</div>
{{ end}}

{{ define "main" }}
<div class="vertical-align">
  <div class="banner">
    {{ .Content }}
    {{ partial "address.html" . }}
    <div id="fournilmap"></div>
  </div>
</div>
{{ end }}