aboutsummaryrefslogtreecommitdiff
path: root/layouts/index.html
blob: 26cbec8111f0bcabec52d6896dedf2b27390c4c7 (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
51
52
53
{{ define "head" }}
<link href="{{ "css/leaflet.css" | relURL }}" 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="{{ "js/leaflet.js" | relURL }}"></script>
<script src="{{ "js/jquery.min.js" | relURL }}"></script>
<script src="{{ "js/util.js" | relURL }}"></script>
<script src="{{ "js/dropdown.js" | relURL }}"></script>
<script src="{{ "js/fournil-map.js" | relURL }}"></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="{{ "img/AB.svg" | relURL }}" alt="logo AB" onerror="this.src='{{ "img/AB.png" | relURL }}'">
    </span>
    <span>
      <img src="{{ "img/EU_Organic.svg" | relURL }}" alt="logo bio EU" onerror="this.src='{{ "img/EU_Organic.png" | relURL }}'">
    </span>
  </div>
  <div class="fournil-logo">
    <img class="fournil-logo-img" src="{{ "img/logo_pain_transparent.png" | relURL }}" 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 }}