hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit 9a2c3bdb7284dc5940689fe7dbc4c8789c7084f8
parent e0df48b641b344c9ec01b61e981774ae4672fdb1
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Wed, 28 Jun 2017 15:41:02 -0400

Add script template tag around the buttons of the navigation

Diffstat:
Mtemplates/mustache/partials/nav.button.mustache | 28+++++++++++++++-------------
Mtemplates/mustache/partials/nav.close.mustache | 24+++++++++++++-----------
2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/templates/mustache/partials/nav.button.mustache b/templates/mustache/partials/nav.button.mustache @@ -1,14 +1,16 @@ -<div class="layout"> - <a class="nav-button" href="#menu"> - <span class="nav-button__text"> - Menu <span class="visuallyhidden">principal</span> - </span> +<script id="navButtonTpl" type="text/tpl"> + <div class="layout"> + <a class="nav-button" href="#menu"> + <span class="nav-button__text"> + Menu <span class="visuallyhidden">principal</span> + </span> - <span class="nav-button__burger"> - <svg class="nav-button__burger__ico" fill="#fff" height="50" viewBox="0 0 24 24" width="50" xmlns="http://www.w3.org/2000/svg"> - <path d="M0 0h24v24H0z" fill="none"/> - <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/> - </svg> - </span> - </a> -</div> + <span class="nav-button__burger"> + <svg class="nav-button__burger__ico" fill="#fff" height="50" viewBox="0 0 24 24" width="50" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/> + </svg> + </span> + </a> + </div> +</script> diff --git a/templates/mustache/partials/nav.close.mustache b/templates/mustache/partials/nav.close.mustache @@ -1,12 +1,14 @@ -<a class="nav__close" href="#" role="button"> - <span class="nav__close__text"> - Fermer <span class="visuallyhidden">le menu</span> - </span> +<script id="navCloseTpl" type="text/tpl"> + <a class="nav__close" href="#" role="button"> + <span class="nav__close__text"> + Fermer <span class="visuallyhidden">le menu</span> + </span> - <span class="nav__x"> - <svg class="nav__x__ico" fill="currentColor" height="50" viewBox="0 0 24 24" width="50" xmlns="http://www.w3.org/2000/svg"> - <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/> - <path d="M0 0h24v24H0z" fill="none"/> - </svg> - </span> -</a> + <span class="nav__x"> + <svg class="nav__x__ico" fill="currentColor" height="50" viewBox="0 0 24 24" width="50" xmlns="http://www.w3.org/2000/svg"> + <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/> + <path d="M0 0h24v24H0z" fill="none"/> + </svg> + </span> + </a> +</script>