summaryrefslogtreecommitdiff
path: root/layouts/index.html
blob: 209861fd0e4114b3684e82ebb342dcb71f2d2afc (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{{ define "head" }}
<link rel="stylesheet" type="text/css" href="{{ "css/ferme-map.min.css" | relURL }}">
<link rel="stylesheet" type="text/css" href="{{ "css/aos.min.css" | relURL }}">
{{ end }}

{{ define "footer" }}
<script>
  window.addEventListener("scroll", function(){
    if (document.getElementById("ferme-top-arrow").parentNode.scrollHeight < window.innerHeight + window.scrollY) {
      document.getElementById("ferme-top-arrow").style.bottom = "-100%";
    } else {
      document.getElementById("ferme-top-arrow").style.bottom = "0";
    }
  }, { passive: true });
</script>
<script>
  var longitude = {{ .Site.Params.longitude }}
  var latitude = {{ .Site.Params.latitude }}
</script>
<script src="{{ "js/ferme-map.min.js" | relURL }}"></script>
<script src="{{ "js/aos.min.js" | relURL }}"></script>
<script>
  AOS.init({
    easing: "ease-out",
    duration: 800,
  });
</script>
{{ end }}

{{ define "ferme-nav-classes" }}{{ end }}

{{ define "ferme-header-classes" }} ferme-header-with-logo{{ end }}

{{ define "header-logo" }}
<div id="ferme-header-logo" class="header">
  <div class="ferme-logo-bio">
    <div class="ferme-logo-bio-np">
      <img src="{{ "img/logo_np.svg" | relURL }}" alt="logo Nature & Progrès" onerror="this.src='{{ "img/logo_np.png" | relURL }}'">
    </div>
    <div class="ferme-logo-bio-eu">
      <img src="{{ "img/EU_Organic.svg" | relURL }}" alt="logo bio EU" onerror="this.src='{{ "img/EU_Organic.png" | relURL }}'">
    </div>
  </div>
  <div class="ferme-logo">
    <a href="{{ .Site.BaseURL | relURL }}">
      <img class="ferme-logo-img" src="{{ "img/logo_ferme.svg" | relURL }}" alt="logo ferme" onerror="this.src='{{ "img/logo_ferme.png" | relURL }}'">
    </a>
  </div>
</div>
{{ end }}

{{ define "banner" }}
<div class="ferme-banner">
  <div class="ferme-banner-wrapper">
  </div>
</div>
<div id="ferme-top-arrow" class="ferme-top-arrow-container ferme-hidden-on-mobile">
  <a href="#le-projet-en-deux-mots">
    <i class="bi-arrow-down-circle-fill ferme-top-arrow"></i>
  </a>
</div>
{{ end }}

{{ define "main" }}
<div class="ferme-content">
  {{ range sort (where .Site.RegularPages "Type" "homepage") "Path" }}
  <div class="ferme-section">
    <h1 class="ferme-title" id="{{ .Title | urlize }}">{{ .Title }}</h1>
    {{ .Content }}
  </div>
  {{ end }}
  {{ .Content }}
</div>
<div class="ferme-section ferme-no-right-padding-on-desktop">
  <h1 id="contact" class="ferme-title">Contact</h1>
  <div class="ferme-columns">
    <div class="ferme-column is-one-third">
      {{ partial "address.html" . }}
    </div>
    <div class="ferme-column is-two-thirds ferme-map-column">
      <div id="fermemap"></div>
    </div>
  </div>
</div>
{{ end }}