hugosoucycc

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

commit 5ef63bf453ab552b7bd5e84818ed0c64283e0dcf
parent 0e6b2d03d5839e3748fdd25640ce657a3e4eb6cd
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Sun,  6 Nov 2016 19:31:41 -0500

Clean template files.

Diffstat:
Mtemplates/mustache/curriculum-vitae.mustache | 5+++--
Mtemplates/mustache/default-index.mustache | 3++-
Mtemplates/mustache/default.mustache | 2++
Dtemplates/mustache/feed/feed-entry.mustache | 10----------
Mtemplates/mustache/feed/feed.mustache | 2+-
Mtemplates/mustache/index.mustache | 1+
Mtemplates/mustache/note-index.mustache | 7++++---
Mtemplates/mustache/note.mustache | 5+----
Atemplates/mustache/partials/bottom-script.mustache | 14++++++++++++++
Mtemplates/mustache/partials/head.mustache | 7+++----
Mtemplates/mustache/partials/nav.mustache | 2+-
11 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/templates/mustache/curriculum-vitae.mustache b/templates/mustache/curriculum-vitae.mustache @@ -2,7 +2,7 @@ <body class="cv" id="cv"> {{> partials/nav.button.mustache }} - + <header class="cv__banner"> <div class="layout"> <h1 class="cv__title"> @@ -31,6 +31,7 @@ </div> </main> - {{> partials/nav.mustache }} + {{> partials/nav.mustache }} + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/default-index.mustache b/templates/mustache/default-index.mustache @@ -2,7 +2,7 @@ <body id="list" class="list"> {{> partials/nav.button.mustache }} - + <main> <div class="layout"> $body$ @@ -16,5 +16,6 @@ </main> {{> partials/nav.mustache }} + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/default.mustache b/templates/mustache/default.mustache @@ -20,5 +20,7 @@ </address> </footer> </article> + + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/feed/feed-entry.mustache b/templates/mustache/feed/feed-entry.mustache @@ -1,10 +0,0 @@ -<entry> - <title>$title$</title> - <link href="$url$" /> - <updated>$date$T$datetime$</updated> - - <author> - <name>{{ SITE_AUTHOR }}</name> - <email>{{ SITE_AUTHOR_EMAIL }}</email> - </author> -</entry> diff --git a/templates/mustache/feed/feed.mustache b/templates/mustache/feed/feed.mustache @@ -7,5 +7,5 @@ <updated>{{ NOW_DATE }}T{{ NOW_DATETIME }}</updated> $body$ - <!-- End of the feed --> + <!-- End of the feed --> </feed> diff --git a/templates/mustache/index.mustache b/templates/mustache/index.mustache @@ -34,5 +34,6 @@ </address> </footer> </div> + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/note-index.mustache b/templates/mustache/note-index.mustache @@ -2,11 +2,11 @@ <body id="note" class="note"> {{> partials/nav.button.mustache }} - + <main> <div class="layout"> $body$ - + <ol class="note__list"> $for(include-after)$ $include-after$ @@ -15,6 +15,7 @@ </div> </main> - {{> partials/nav.mustache }} + {{> partials/nav.mustache }} + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/note.mustache b/templates/mustache/note.mustache @@ -51,9 +51,6 @@ </article> </main> - {{> partials/nav.mustache }} - - <!-- <script src="{{ BASE_URL }}/js/vendor/atomic.min.js"></script> - <script src="{{ BASE_URL }}/js/script.js"></script> --> + {{> partials/bottom-script.mustache }} </body> </html> diff --git a/templates/mustache/partials/bottom-script.mustache b/templates/mustache/partials/bottom-script.mustache @@ -0,0 +1,14 @@ +<script id="cuttingTheMustard"> + var cuttingTheMustard = ('querySelector' in document); + var bottomjs; + + if (cuttingTheMustard) { + bottomjs = document.createElement('script'); + bottomjs.src = '{{ BASE_URL }}/js/script.min.js'; + bottomjs.id = 'bottomjs'; + + document.body.appendChild(bottomjs); + document.querySelector('html').classList.remove('no-js'); + document.querySelector('html').classList.add('js'); + } +</script> diff --git a/templates/mustache/partials/head.mustache b/templates/mustache/partials/head.mustache @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="{{ SITE_LANGUAGE }}"> +<html class="no-js" lang="{{ SITE_LANGUAGE }}"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> @@ -20,10 +20,9 @@ <link rel="me" href="https://github.com/hs0ucy" /> <link rel="me" href="sms:+15819966481" /> - <link href="{{ BASE_URL }}/feed.note.atom.xml" type="application/atom+xml" rel="alternate" title="Feed des notes" /> - <link href="{{ BASE_URL }}/feed.txt.atom.xml" type="application/atom+xml" rel="alternate" title="Feed des textes" /> + <link href="{{ BASE_URL }}/feed.atom.xml" type="application/atom+xml" rel="alternate" title="Feed de tous les contenus" /> - <meta name="robots" content="noindex, nofollow" /> + <meta name="robots" content="index, follow" /> <meta name="description" content="{{ SITE_DESCRIPTION }}" /> <meta name="author" content="{{ SITE_AUTHOR }}" /> <meta name="generator" content="{{ SITE_GENERATOR }}" /> diff --git a/templates/mustache/partials/nav.mustache b/templates/mustache/partials/nav.mustache @@ -20,7 +20,7 @@ </a> </li> <li class="nav__item"> - <a class="nav__link" href="{{ BASE_URL }}/file/curriculum-vitae"> + <a class="nav__link" href="{{ BASE_URL }}/file/curriculum-vitae.html"> Curriculum vitae </a> </li>