hero.html 1.48 KB
Newer Older
Renon's avatar
Renon committed
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
{{ $baseurl := .Site.BaseURL }}
<h1 class="site-title">
  <span class="base05">[</span>
  <span class="base08">F</span><span class="base09">A</span><span class="base0a">M</span><span class="base0b">E</span>
  <span class="base05">]</span>
  <span class="base0c">le</span>
  <span class="base0d">site</span>
</h1>

<div class="hero explain">
<h1 class="definition">
  <span class="expr base08">Fanfare</span>
  <span class="expr base09">À</span>
  <span class="expr base0a">Manif</span>
  <span class="expr base0b">Engagée</span>
</h1>
<br>
<br>
<br>
{{ with .Site.GetPage "/présentation" }}
  <h1><a class="path" href='{{ .RelPermalink }}'>Pardon ?</a></h1>
{{ end }}
</div>

<script>

var sigle = [
  ["Fanfare","À","Manif","Engagée"],
  ["Festoyeurs","Avinés contre","Machines","Écervelées"],
  ["Fanfare","Activiste pour","Mirlitons","Entêtés"],
  ["Fanfare","d'Action","Militante et","Enjouée"],
  ["Festin","Aléatoire de","Musiciens","Énervés"],
  ]

function choseOne(sigle) {

  var len = sigle.length;
  var index = Math.floor(Math.random() * len);
  var spans = document.getElementsByClassName("expr");
  var explain = sigle[index];

  for (i = 0; i < 4; i++) {
    spans[i].innerHTML = explain[i];
  }
}

choseOne(sigle);
</script>

<!--
  <span class="base05"># _</span>
  <div class="hero-logo">
  <img src="{{ "img/base16-eighties.svg" | relURL }}">
  </div>

  <div style="text-align: center;">
  Add your own "<code>layouts/partials/hero.html</code>" to replace this text.
  </div>
-->