hugosoucycc

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

commit eca9a54dcdccd7f7b653b8300c8113e4bc704476
parent d282286168f9ea69f495fcff8c9fb4b6282bf64c
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Thu, 15 Jun 2017 15:23:16 -0400

Add the menu and bottom script in template

+ Change mustache var names.

Diffstat:
Mtemplates/mustache/curriculum-vitae.mustache | 7+++++--
Mtemplates/mustache/default-index.mustache | 19+++++++++++--------
Mtemplates/mustache/default.mustache | 3+++
Mtemplates/mustache/index.mustache | 3+++
Mtemplates/mustache/note-index.inc.mustache | 47+++++++++++++++++++++++++++++++++++------------
Dtemplates/mustache/note.inc.mustache | 23-----------------------
Mtemplates/mustache/note.mustache | 126++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Mtemplates/mustache/partials/head.mustache | 14+++++++-------
8 files changed, 138 insertions(+), 104 deletions(-)

diff --git a/templates/mustache/curriculum-vitae.mustache b/templates/mustache/curriculum-vitae.mustache @@ -2,11 +2,14 @@ <body class="cv" id="cv"> {{> partials/nav.button.mustache }} - + <main class="cv__main"> <div class="layout"> {{ main_content }} </div> - </main> + </main> + + {{> partials/nav.mustache }} + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/default-index.mustache b/templates/mustache/default-index.mustache @@ -3,14 +3,17 @@ <body id="list" class="list"> {{> partials/nav.button.mustache }} - <main> - <div class="layout"> - {{ main_content }} + <main> + <div class="layout"> + {{ main_content }} - <ol class="list__list"> - {{ list_items }} - </ol> - </div> - </main> + <ol class="list__list"> + {{ list_items }} + </ol> + </div> + </main> + + {{> partials/nav.mustache }} + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/default.mustache b/templates/mustache/default.mustache @@ -23,5 +23,8 @@ </address> </footer> </article> + + {{> partials/nav.mustache }} + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/index.mustache b/templates/mustache/index.mustache @@ -26,5 +26,8 @@ </address> </footer> </div> + + {{> partials/nav.mustache }} + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/note-index.inc.mustache b/templates/mustache/note-index.inc.mustache @@ -1,15 +1,38 @@ <li class="note__item h-entry hentry as-note"> - {{> note.inc.mustache }} + {{# citeurl_tpl }} + <blockquote class="note__blockquote p-name e-content"> + <div class="note__blockquote__quote"> + {{ content }} + </div> + {{# cite_tpl }} + <footer class="note__blockquote__footer"> + &mdash; + <cite class="note__blockquote__cite h-cite"> + <a class="u-url p-author" href="{{ citeurl_tpl }}" rel="external nofollow"> + {{ cite_tpl }} + </a> + </cite> + </footer> + {{/ cite_tpl }} + </blockquote> + {{/ citeurl_tpl }} - <footer class="note__footer"> - Publié le - <a class="note__link u-url u-uid u-syndication" - {{# permalink }} - href="{{ permalink }}" - {{/ permalink }} - rel="syndication"> - <time class="dt-published dt-updated" {{# datetime }}datetime="{{ date }}T{{ datetime }}"{{/ datetime }}>{{ date }}</time> - </a>. - <span class="visuallyhidden">par <em class="p-author author h-card">{{ SITE_AUTHOR }}</em></span> - </footer> + {{^ citeurl_tpl }} + <div class="note__blocknote p-name e-content"> + {{ content }} + </div> + {{/ citeurl_tpl }} + + + <footer class="note__footer"> + Publié le + <a class="note__link u-url u-uid u-syndication" + {{# permalink }} + href="{{ permalink }}" + {{/ permalink }} + rel="syndication"> + <time class="dt-published dt-updated" {{# datetime }}datetime="{{ date }}T{{ datetime }}"{{/ datetime }}>{{ date }}</time> + </a>. + <span class="visuallyhidden">par <em class="p-author author h-card">{{ SITE_AUTHOR }}</em></span> + </footer> </li> diff --git a/templates/mustache/note.inc.mustache b/templates/mustache/note.inc.mustache @@ -1,23 +0,0 @@ -{{# citeurl }} - <blockquote class="note__blockquote p-name e-content"> - <div class="note__blockquote__quote"> - {{ content }} - </div> - {{# cite }} - <footer class="note__blockquote__footer"> - &mdash; - <cite class="note__blockquote__cite h-cite"> - <a class="u-url p-author" href="{{ citeurl }}" rel="external nofollow"> - {{ cite }} - </a> - </cite> - </footer> - {{/ cite }} - </blockquote> -{{/ citeurl }} - -{{^ citeurl }} - <div class="note__blocknote p-name e-content"> - {{ content }} - </div> -{{/ citeurl }} diff --git a/templates/mustache/note.mustache b/templates/mustache/note.mustache @@ -1,60 +1,82 @@ {{> partials/head.mustache }} <body id="note" class="note"> - <main> - <article class="layout h-entry hentry as-note"> - <div class="layout__vcenter"> - <h1 class="visuallyhidden">{{ title }}</h1> - - {{# replyto }} - <p> - <a class="note__link u-in-reply-to" - href="{{ replyto }}" - rel="in-reply-to">En réponse à {{ replyto }}.</a><br/> - </p> - {{/ replyto }} - - {{> note.inc.mustache }} - - <footer class="note__footer"> - {{# permalink }} - <a class="note__link u-url u-uid u-syndication bookmark" - href="{{ permalink }}" - rel="bookmark">#</a> - {{/ permalink }} - - Publié le <time class="dt-published" {{# datetime }}datetime="{{ date }}T{{ datetime }}"{{/ datetime }}>{{ date }}</time> - par - <a class="p-author author h-card" href="{{ BASE_URL }}#hs" rel="author"> - <i>{{ SITE_AUTHOR }}</i> - <img alt="" - class="u-photo visuallyhidden" - src="http://assets.soucy.cc/images/hugosoucy/favicon/hs-autoportrait-2010-nb-favion-32x32.png"/> - </a> - {{# modified }} et modifié le <time class="dt-updated">{{ modified }}</time>{{/ modified }}. - <br/>&crarr; <a href="{{ BASE_URL }}/note">Retourner aux notes</a>. - </footer> - - <aside class="webmention-herokuapp"> - <script id="webmention-hosted"> - (function () { - var sn = document.createElement("script"), s = document.getElementsByTagName("script")[0], url; - url = document.querySelectorAll ? document.querySelectorAll("link[rel~=canonical]") : false; - url = url && url[0] ? url[0].href : false; - sn.type = "text/javascript"; sn.async = true; - sn.src = "//webmention.herokuapp.com/api/embed?url=" + encodeURIComponent(url || window.location); - s.parentNode.insertBefore(sn, s); - }()); - </script> - </aside> + <main> + <article class="layout h-entry hentry as-note"> + <div class="layout__vcenter"> + <h1 class="visuallyhidden">{{ title }}</h1> + + {{# replyto }} + <p> + <a class="note__link u-in-reply-to" + href="{{ replyto }}" + rel="in-reply-to">En réponse à {{ replyto }}.</a><br/> + </p> + {{/ replyto }} + + {{# citeurl_tpl }} + <blockquote class="note__blockquote p-name e-content"> + <div class="note__blockquote__quote"> + {{ main_content }} </div> + {{# cite_tpl }} + <footer class="note__blockquote__footer"> + &mdash; + <cite class="note__blockquote__cite h-cite"> + <a class="u-url p-author" href="{{ citeurl_tpl }}" rel="external nofollow"> + {{ cite_tpl }} + </a> + </cite> + </footer> + {{/ cite_tpl }} + </blockquote> + {{/ citeurl_tpl }} + + {{^ citeurl_tpl }} + <div class="note__blocknote p-name e-content"> + {{ main_content }} + </div> + {{/ citeurl_tpl }} + + <footer class="note__footer"> + {{# permalink }} + <a class="note__link u-url u-uid u-syndication bookmark" + href="{{ permalink }}" + rel="bookmark">#</a> + {{/ permalink }} + + Publié le <time class="dt-published" {{# datetime }}datetime="{{ date }}T{{ datetime }}"{{/ datetime }}>{{ date }}</time> + par + <a class="p-author author h-card" href="{{ BASE_URL }}#hs" rel="author"> + <i>{{ SITE_AUTHOR }}</i> + <img alt="" + class="u-photo visuallyhidden" + src="http://assets.soucy.cc/images/hugosoucy/favicon/hs-autoportrait-2010-nb-favion-32x32.png"/> + </a> + {{# modified }} et modifié le <time class="dt-updated">{{ modified }}</time>{{/ modified }}. + <br/>&crarr; <a href="{{ BASE_URL }}/note">Retourner aux notes</a>. + </footer> + + <aside class="webmention-herokuapp"> + <script id="webmention-hosted"> + (function () { + var sn = document.createElement("script"), s = document.getElementsByTagName("script")[0], url; + url = document.querySelectorAll ? document.querySelectorAll("link[rel~=canonical]") : false; + url = url && url[0] ? url[0].href : false; + sn.type = "text/javascript"; sn.async = true; + sn.src = "//webmention.herokuapp.com/api/embed?url=" + encodeURIComponent(url || window.location); + s.parentNode.insertBefore(sn, s); + }()); + </script> + </aside> + </div> - {{# bridgy }} - <a class="visuallyhidden" href="https://brid.gy/publish/twitter"></a> - {{/ bridgy }} - </article> - </main> + {{# bridgy }} + <a class="visuallyhidden" href="https://brid.gy/publish/twitter"></a> + {{/ bridgy }} + </article> + </main> - {{> partials/bottom-script.mustache }} + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/partials/head.mustache b/templates/mustache/partials/head.mustache @@ -12,12 +12,12 @@ <meta name="author" content="{{ SITE_AUTHOR }}" /> <meta name="generator" content="{{ SITE_GENERATOR }}" /> - - {{# description }} - <meta name="description" content="{{ description }}" /> - {{/ description }} - {{# keywords }} - <meta name="keywords" content="{{ keywords }}" /> - {{/ keywords }} + {{# description_loc }} + <meta name="description" content="{{ description_loc }}" /> + {{/ description_loc }} + + {{# keywords_loc }} + <meta name="keywords" content="{{ keywords_loc }}" /> + {{/ keywords_loc }} </head>