hugo.soucy.cc

The personnal website source code of Hugo Soucy. Creates from an homebrewed static website generator (Ferron).
Log | Files | Refs

commit 2cfbf95de2648e8ffa6f3c6d411169ff548e8396
parent 6b85a2c57d6443ec43986ee1479f6329a0f755bc
Author: Hugo Soucy <hsoucy@kronostechnologies.com>
Date:   Tue, 22 Jan 2019 15:21:02 -0500

Update the metas and templates for the new nav mecanism

Diffstat:
Mcontent/a-propos.json | 18++++++++++--------
Mcontent/albums-preferes.lua | 2+-
Mcontent/ce-site-web-explique-markdown.json | 15+++++++--------
Mcontent/file/curriculum-vitae.json | 18++++++++++--------
Mcontent/file/index.json | 13++++++-------
Mcontent/index.json | 18+++++++++++-------
Mcontent/note/index.json | 16++++++++--------
Mcontent/txt/index.lua | 1+
Mtemplates/partials/head.mustache | 115++++++++++++++++++++++++++++++++++++++++---------------------------------------
Mtemplates/partials/nav.mustache | 82++++++++++++++++++++++++++++---------------------------------------------------
10 files changed, 141 insertions(+), 157 deletions(-)

diff --git a/content/a-propos.json b/content/a-propos.json @@ -1,8 +1,11 @@ { - "date":"2017-03-16", - "datetime":"00:00:00", - "id":"tag:hugo.soucy.cc,2017-03-16:2017/03/a-propos", - "shortlink":"25", - "template":"default", - "title":"À propos de ce site Web" -}- \ No newline at end of file + "date":"2017-03-16", + "datetime":"00:00:00", + "id":"tag:hugo.soucy.cc,2017-03-16:2017/03/a-propos", + "shortlink":"25", + "template":"default", + "title":"À propos de ce site Web", + "navigation": { + "label": "À propos", + } +} diff --git a/content/albums-preferes.lua b/content/albums-preferes.lua @@ -4,5 +4,5 @@ return { id = "tag = hugo.soucy.cc,2017-03-19 = 2017/03/albums-preferes", shortlink = "22", template = "default", - title = "Mes albums préférés" + title = "Mes albums préférés", } diff --git a/content/ce-site-web-explique-markdown.json b/content/ce-site-web-explique-markdown.json @@ -1,8 +1,8 @@ { - "date":"2017-10-09", - "datetime":"00:00:00", - "id":"tag:hugo.soucy.cc,2017-10-09:2017/10/ce-site-web-explique-markdown", - "shortlink":"t", - "template":"default", - "title":"Ce site Web expliqué : Le markdown" -}- \ No newline at end of file + "date":"2017-10-09", + "datetime":"00:00:00", + "id":"tag:hugo.soucy.cc,2017-10-09:2017/10/ce-site-web-explique-markdown", + "shortlink":"t", + "template":"default", + "title":"Ce site Web expliqué : Le markdown", +} diff --git a/content/file/curriculum-vitae.json b/content/file/curriculum-vitae.json @@ -1,8 +1,11 @@ { - "date":"2014-01-01", - "datetime":"00:00:00", - "id":"tag:hugo.soucy.cc,2014-01-01:2014/01/curriculum-vitae", - "shortlink":"3n", - "template":"curriculum-vitae", - "title":"Curriculum vitae de Hugo Soucy, développeur Web frontend" -}- \ No newline at end of file + "date":"2014-01-01", + "datetime":"00:00:00", + "id":"tag:hugo.soucy.cc,2014-01-01:2014/01/curriculum-vitae", + "shortlink":"3n", + "template":"curriculum-vitae", + "title":"Curriculum vitae de Hugo Soucy, développeur Web frontend", + "navigation": { + "label": "Curriculum vitae", + } +} diff --git a/content/file/index.json b/content/file/index.json @@ -1,7 +1,7 @@ { - "date":"0000-00-00", - "datetime":"12:22:16", - "template":"default-index", - "title":"Documents", - "feed":false -}- \ No newline at end of file + "date":"0000-00-00", + "datetime":"12:22:16", + "template":"default-index", + "title":"Documents", + "feed":false, +} diff --git a/content/index.json b/content/index.json @@ -1,7 +1,12 @@ { - "date":"0000-00-00", - "datetime":"00:00:00", - "id":"tag:hugo.soucy.cc,0000-00-00:0000/00/index", - "template":"index", - "title":"Hugo Soucy, développeur Web frontend qui habite la ville de Québec, et ceci est sa page Web" -}- \ No newline at end of file + "date":"0000-00-00", + "datetime":"00:00:00", + "id":"tag:hugo.soucy.cc,0000-00-00:0000/00/index", + "template":"index", + "title":"Hugo Soucy, développeur Web frontend qui habite la ville de Québec, et ceci est sa page Web", + "navigation": { + "attributes": ["rel=\"index\""], + "label": "Accueil", + "order": 1 + } +} diff --git a/content/note/index.json b/content/note/index.json @@ -1,8 +1,9 @@ { - "date":"0000-00-00", - "datetime":"11:26:54", - "permalink":"/note", - "template":"note-index", - "title":"Notes", - "length":50 -}- \ No newline at end of file + "date":"0000-00-00", + "datetime":"11:26:54", + "permalink":"/note", + "template":"note-index", + "title":"Notes", + "length":50, + "navigation": {}, +} diff --git a/content/txt/index.lua b/content/txt/index.lua @@ -3,6 +3,7 @@ return { datetime = "12:22:16", template = "default-index", title = "Textes", + navigation = {}, filter = function(self) return #self.entries end, diff --git a/templates/partials/head.mustache b/templates/partials/head.mustache @@ -1,67 +1,68 @@ <head> - <meta charset="utf-8" /> - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta charset="utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> - <title>{{ title }} &mdash; {{ site.domainname }}</title> - <base href="{{{ site.baseurl }}}"/> - <link href="{{{ site.baseurl }}}/css/styles.min.css" rel="stylesheet" /> - <!-- Feed Atom --> - <link href="{{{ site.baseurl }}}/feed.atom.xml" - rel="alternate" - title="Fil de tous les contenus de hugo.soucy.cc" - type="application/atom+xml" /> - <link href="{{{ site.baseurl }}}/note/feed.atom.xml" - rel="alternate" - title="Fil des notes" - type="application/atom+xml" /> - <link href="{{{ site.baseurl }}}/txt/feed.atom.xml" - rel="alternate" - title="Fil des textes" - type="application/atom+xml" /> - <!-- Feed RSS 2 --> - <link href="{{{ site.baseurl }}}/feed.rss2.xml" - rel="alternate" - title="Fil RSS 2 de tous les contenus de hugo.soucy.cc" - type="application/rss+xml" /> - <link href="{{{ site.baseurl }}}/note/feed.rss2.xml" - rel="alternate" - title="Fil RSS 2 des notes" - type="application/rss+xml" /> - <link href="{{{ site.baseurl }}}/txt/feed.rss2.xml" - rel="alternate" - title="Fil RSS 2 des textes" - type="application/rss+xml" /> + <title>{{ title }} &mdash; {{ site.domainname }}</title> + <base href="{{{ site.baseurl }}}"/> + <link href="{{{ site.baseurl }}}/css/styles.min.css" rel="stylesheet" /> + <!-- Feed Atom --> + <link href="{{{ site.baseurl }}}/feed.atom.xml" + rel="alternate" + title="Fil de tous les contenus de hugo.soucy.cc" + type="application/atom+xml" /> + <link href="{{{ site.baseurl }}}/note/feed.atom.xml" + rel="alternate" + title="Fil des notes" + type="application/atom+xml" /> + <link href="{{{ site.baseurl }}}/txt/feed.atom.xml" + rel="alternate" + title="Fil des textes" + type="application/atom+xml" /> + <!-- Feed RSS 2 --> + <link href="{{{ site.baseurl }}}/feed.rss2.xml" + rel="alternate" + title="Fil RSS 2 de tous les contenus de hugo.soucy.cc" + type="application/rss+xml" /> + <link href="{{{ site.baseurl }}}/note/feed.rss2.xml" + rel="alternate" + title="Fil RSS 2 des notes" + type="application/rss+xml" /> + <link href="{{{ site.baseurl }}}/txt/feed.rss2.xml" + rel="alternate" + title="Fil RSS 2 des textes" + type="application/rss+xml" /> - <!-- Switchboard is a WebSub hub --> - <link href="https://hugo.soucy.cc/" rel="self"/> - <!-- <link href="https://switchboard.p3k.io/" rel="hub"/> --> - <!-- Webmentions --> - <link href="https://webmention.herokuapp.com/api/webmention" rel="webmention" /> - <link href="https://webmention.io/hugo.soucy.cc/webmention" rel="webmention" /> + <!-- Switchboard is a WebSub hub --> + <link href="https://hugo.soucy.cc/" rel="self" /> + <link href="https://switchboard.p3k.io/" rel="hub"> + <!-- Webmentions --> + <link href="https://webmention.herokuapp.com/api/webmention" rel="webmention" /> + <link href="https://webmention.io/hugo.soucy.cc/webmention" rel="webmention" /> + <link href="https://webmention.io/hugo.soucy.cc/xmlrpc" rel="pingback" /> - {{# site.author.relme }} - <link rel="me" href="{{{ . }}}" /> - {{/ site.author.relme }} + {{# site.author.relme }} + <link rel="me" href="{{{ . }}}" /> + {{/ site.author.relme }} - <link href="https://assets.soucy.cc/images/hugosoucy/favicon/hs-autoportrait-2010-nb-favion-32x32.png" rel="icon" type="image/png" /> - <link href="{{{ permalink }}}" hreflang="{{ site.language }}" rel="canonical" /> - {{# shortlink }} - <link href="{{{ site.url }}}/{{{ shortlink }}}" - hreflang="{{ site.language }}" - rel="shortlink" - type="text/html"/> - {{/ shortlink }} + <link href="https://assets.soucy.cc/images/hugosoucy/favicon/hs-autoportrait-2010-nb-favion-32x32.png" rel="icon" type="image/png" /> + <link href="{{{ permalink }}}" hreflang="{{ site.language }}" rel="canonical" /> + {{# shortlink }} + <link href="{{{ site.url }}}/{{{ shortlink }}}" + hreflang="{{ site.language }}" + rel="shortlink" + type="text/html"/> + {{/ shortlink }} - <meta name="robots" content="index, follow" /> - <meta name="author" content="{{ site.author.name }}" /> - <meta name="generator" content="{{ site.metas.generator }}" /> + <meta name="robots" content="index, follow" /> + <meta name="author" content="{{ site.author.name }}" /> + <meta name="generator" content="{{ site.metas.generator }}" /> - {{# description }} - <meta name="description" content="{{ description }}" /> - {{/ description }} + {{# description }} + <meta name="description" content="{{ description }}" /> + {{/ description }} - <meta name="keywords" content="{{# keywords }}{{ . }}, {{/ keywords }}" /> + <meta name="keywords" content="{{# keywords }}{{ . }}, {{/ keywords }}" /> - <meta name="google-site-verification" content="-JraS76m4WZOftgNjizPIzRPC0MkCNNfxmPV4MGkJsc" /> + <meta name="google-site-verification" content="-JraS76m4WZOftgNjizPIzRPC0MkCNNfxmPV4MGkJsc" /> </head> diff --git a/templates/partials/nav.mustache b/templates/partials/nav.mustache @@ -1,59 +1,35 @@ <nav class="nav"> - <div class="nav__panel" id="menu" tabindex="0"> - <div class="nav__panel__content layout"> - <h2 class="visuallyhidden">Navigation</h2> + <div class="nav__panel" id="menu" tabindex="0"> + <div class="nav__panel__content layout"> + <h2 class="visuallyhidden">Navigation</h2> - <ul class="nav__list" role="menubar"> - <li class="nav__item"> - <a class="nav__link" href="{{{ site.baseurl }}}" rel="index"> - Retour à l'accueil - </a> - </li> - <li class="nav__item"> - <a class="nav__link" href="{{{ site.baseurl }}}/note"> - Notes - </a> - </li> - <li class="nav__item"> - <a class="nav__link" href="{{{ site.baseurl }}}/txt"> - Textes - </a> - </li> - <li class="nav__item"> - <a class="nav__link" href="{{{ site.baseurl }}}/file/curriculum-vitae.html"> - Curriculum vitae - </a> - </li> - <li class="nav__item"> - <a class="nav__link" href="{{{ site.baseurl }}}/a-propos.html"> - À propos - </a> - </li> - <li class="nav__item"> - <a class="nav__link" href="{{{ site.baseurl }}}/feed.atom.xml"> - Flux Atom - </a> - </li> - </ul> - </div> + <ul class="nav__list" role="menubar"> + {{# navigation }} + <li class="nav__item"> + <a class="nav__link" + href="{{{ location }}}" {{# attributes }}{{{ . }}}{{/ attributes }}>{{ label }}</a> + </li> + {{/ navigation }} + </ul> + </div> - <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> + <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> - </script> + <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> - <script id="navTrapTpl" type="text/tpl"> - <button class="nav__trap visuallyhidden">Focus Trap</button> - </script> - </div> + <script id="navTrapTpl" type="text/tpl"> + <button class="nav__trap visuallyhidden">Focus Trap</button> + </script> + </div> </nav>