hugosoucycc

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

commit b69fa6e56b15fa0f911aafd061fa1eb881d9df83
parent 248b474c1413e0e2e842cf213cb491224bbfa37c
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sat,  9 Jul 2016 15:17:20 -0400

Add the navigation on all pages.

Diffstat:
Mtemplates/mustache/curriculum-vitae.mustache | 17+++++++++++------
Mtemplates/mustache/default.mustache | 5++++-
Mtemplates/mustache/index.mustache | 2++
Mtemplates/mustache/note-index.mustache | 4+++-
Mtemplates/mustache/note.mustache | 2++
Atemplates/mustache/partials/nav.close.mustache | 9+++++++++
Atemplates/mustache/partials/nav.index.mustache | 27+++++++++++++++++++++++++++
Atemplates/mustache/partials/nav.mustache | 32++++++++++++++++++++++++++++++++
Atemplates/mustache/partials/nav.open.mustache | 13+++++++++++++
9 files changed, 103 insertions(+), 8 deletions(-)

diff --git a/templates/mustache/curriculum-vitae.mustache b/templates/mustache/curriculum-vitae.mustache @@ -1,8 +1,8 @@ {{> partials/head.mustache }} <body class="cv" id="cv"> - <div class="layout"> - <header class="cv__banner" role="banner"> + <header class="cv__banner" role="banner"> + <div class="layout"> <h1 class="cv__title"> <span class="visuallyhidden">Curriculum vitæ de</span> <span class="logo">{{ SITE_AUTHOR }},</span> @@ -14,9 +14,11 @@ Téléphone: <a href="tel:+1{{ SITE_AUTHOR_PHONE }}">{{ SITE_AUTHOR_PHONE }}</a><br> Courriel: <a href="mailto:{{ SITE_AUTHOR_EMAIL }}">{{ SITE_AUTHOR_EMAIL }}</a> </p> - </header> + </div> + </header> - <main class="cv__main"> + <main class="cv__main"> + <div class="layout"> $body$ <div class="cv__list"> @@ -24,7 +26,10 @@ $include-after$ $endfor$ </div> - </main> - </div> + </div> + </main> + + {{> partials/nav.mustache }} + </div> </body> </html> diff --git a/templates/mustache/default.mustache b/templates/mustache/default.mustache @@ -5,7 +5,10 @@ <article class="single"> <!-- Pandoc var --> $body$ - </article> + </article> + </div> + + {{> partials/nav.mustache }} </body> </html> diff --git a/templates/mustache/index.mustache b/templates/mustache/index.mustache @@ -20,6 +20,8 @@ </div> </main> + {{> partials/nav.index.mustache }} + <hr/> <footer> diff --git a/templates/mustache/note-index.mustache b/templates/mustache/note-index.mustache @@ -11,6 +11,8 @@ $endfor$ </div> </div> - </main> + </main> + + {{> partials/nav.mustache }} </body> </html> diff --git a/templates/mustache/note.mustache b/templates/mustache/note.mustache @@ -32,5 +32,7 @@ </div> </article> </main> + + {{> partials/nav.mustache }} </body> </html> diff --git a/templates/mustache/partials/nav.close.mustache b/templates/mustache/partials/nav.close.mustache @@ -0,0 +1,9 @@ +<a class="nav__close" href="#" role="button"> + <span class="nav__close__text"> + Fermer <span class="visuallyhidden">le menu</span> + </span> + + <span class="nav__x"> + <i class="nav__x__ico"></i> + </span> +</a> diff --git a/templates/mustache/partials/nav.index.mustache b/templates/mustache/partials/nav.index.mustache @@ -0,0 +1,27 @@ +<nav class="nav"> + {{> nav.open.mustache }} + + <div class="nav__panel" id="menu" tabindex="0"> + <div class="nav__panel__content layout"> + <ul class="nav__list" role="menubar"> + <li class="nav__item"> + <a class="nav__link" href="{{ BASE_URL }}/note"> + Notes + </a> + </li> + <li class="nav__item"> + <a class="nav__link" href="{{ BASE_URL }}/txt"> + Textes + </a> + </li> + <li class="nav__item"> + <a class="nav__link" href="{{ BASE_URL }}/file/curriculum-vitae"> + Curriculum vitae + </a> + </li> + </ul> + </div> + + {{> nav.close.mustache }} + </div> +</nav> diff --git a/templates/mustache/partials/nav.mustache b/templates/mustache/partials/nav.mustache @@ -0,0 +1,32 @@ +<nav class="nav"> + {{> nav.open.mustache }} + + <div class="nav__panel" id="menu" tabindex="0"> + <div class="nav__panel__content layout"> + <ul class="nav__list" role="menubar"> + <li class="nav__item"> + <a class="nav__link" href="{{ BASE_URL }}" rel="index"> + Page d'accueil + </a> + </li> + <li class="nav__item"> + <a class="nav__link" href="{{ BASE_URL }}/note"> + Notes + </a> + </li> + <li class="nav__item"> + <a class="nav__link" href="{{ BASE_URL }}/txt"> + Textes + </a> + </li> + <li class="nav__item"> + <a class="nav__link" href="{{ BASE_URL }}/file/curriculum-vitae"> + Curriculum vitae + </a> + </li> + </ul> + </div> + + {{> nav.close.mustache }} + </div> +</nav> diff --git a/templates/mustache/partials/nav.open.mustache b/templates/mustache/partials/nav.open.mustache @@ -0,0 +1,13 @@ +<h2 class="visuallyhidden">Navigation</h2> + +<div class="layout"> + <a class="nav__button" href="#menu"> + <span class="nav__button__text"> + Menu <span class="visuallyhidden">principal</span> + </span> + + <span class="nav__burger"> + <i class="nav__burger__ico"></i> + </span> + </a> +</div>