commit 78831aedbbac2f5d1d16b28a4cc9ed83d360e8ec
parent 9faaaeaf052d9b29582bd7b2ff5f8738cb80f292
Author: Hugo Soucy <hugo@soucy.cc>
Date: Mon, 5 Jun 2017 19:37:30 -0400
Modify and adapt the mustaches templates
Diffstat:
8 files changed, 83 insertions(+), 139 deletions(-)
diff --git a/templates/mustache/curriculum-vitae.mustache b/templates/mustache/curriculum-vitae.mustache
@@ -1,15 +1,10 @@
{{> partials/head.mustache }}
<body class="cv" id="cv">
- {{> partials/nav.button.mustache }}
-
<main class="cv__main">
<div class="layout">
- $body$
+ {{ main_content }}
</div>
- </main>
-
- {{> partials/nav.mustache }}
- {{> partials/bottom-script.mustache }}
+ </main>
</body>
</html>
diff --git a/templates/mustache/default-index.inc.mustache b/templates/mustache/default-index.inc.mustache
@@ -1,8 +1,9 @@
<li class="list__item h-entry hentry">
- <a class="list__link dt-published dt-updated u-url u-uid like-h2"
- href="$url$"
- rel="permalink">
- $title$
- </a> —
- <time class="value" $if(datetime)$datetime="$date$T$datetime$"$endif$>$date$</time>
+ <a class="list__link dt-published dt-updated u-url u-uid like-h2"
+ href="{{ permalink }}"
+ rel="permalink">
+ {{ title }}
+ </a> —
+
+ <time class="dt-published" datetime="{{ date }}T{{ datetime }}">{{ date }}</time>
</li>
diff --git a/templates/mustache/default-index.mustache b/templates/mustache/default-index.mustache
@@ -1,21 +1,14 @@
{{> partials/head.mustache }}
-<body id="list" class="list">
- {{> partials/nav.button.mustache }}
-
+<body id="list" class="list">
<main>
<div class="layout">
- $body$
+ {{ main_content }}
<ol class="list__list">
- $for(include-after)$
- $include-after$
- $endfor$
+ {{ list_items }}
</ol>
</div>
- </main>
-
- {{> partials/nav.mustache }}
- {{> partials/bottom-script.mustache }}
+ </main>
</body>
</html>
diff --git a/templates/mustache/default.mustache b/templates/mustache/default.mustache
@@ -1,50 +1,26 @@
{{> partials/head.mustache }}
-<body id="single">
- {{> partials/nav.button.mustache }}
-
- <article class="h-entry hentry">
- <div class="layout e-content p-name single">
- <!-- Pandoc var -->
- $body$
- </div>
+<body id="single">
+ <article class="h-entry hentry">
+ <div class="layout e-content p-name single">
+ {{ main_content }}
+ </div>
- {{> partials/nav.mustache }}
+ <footer>
+ <address class="layout">
+ <hr/>
- <footer>
- <address class="layout">
- <hr/>
- <p>
- <a class="note__link u-url u-uid u-syndication" href="$permalink$" rel="bookmark">#</a>
- Créé à {{ SITE_AUTHOR_LOCALITY }} le
- <time class="dt-published" $if(datetime)$datetime="$date$T$datetime$"$endif$>$date$</time> par
+ <p>
+ <a class="u-url u-uid u-syndication" href="#" rel="bookmark">#</a>
- <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>.
+ Créé à {{ SITE_AUTHOR_LOCALITY }} le <time class="dt-published" datetime="{{ date }}T{{ datetime }}">{{ date }}</time> par
- $if(modified)$Modifié le <time class="dt-updated">$modified$</time>.$endif$
- </p>
- </address>
- </footer>
+ <a class="p-author author" href="{{ BASE_URL }}#hs" rel="author"><i>{{ SITE_AUTHOR }}</i></a>.
- <aside>
- <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>
- </article>
-
- {{> partials/bottom-script.mustache }}
+ Modifié le <time class="dt-updated">{{ modified }}</time>.
+ </p>
+ </address>
+ </footer>
+ </article>
</body>
</html>
diff --git a/templates/mustache/feed/feed-entry.mustache b/templates/mustache/feed/feed-entry.mustache
@@ -1,6 +1,9 @@
<entry>
<title>{{ field_title }}</title>
- <id>{{ field_id }}</id>
- <link href="{{ field_permalink }}" hreflang="{{ SITE_LANGUAGE }}" rel="alternate" />
- <updated>{{ field_date}}T{{ field_datetime }}Z</updated>
+ <link href="{{ field_permalink }}" />
+ <updated>{{ field_date}}T{{ field_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
@@ -2,14 +2,10 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Flux Atom de {{ SITE_DOMAINNAME }}</title>
<subtitle>{{ SITE_DESCRIPTION }}</subtitle>
- <id>tag:hugo.soucy.cc,2014-02-19:hs0ucy</id>
- <link href="{{ BASE_URL }}/feed.atom.xml" rel="self" type="application/atom+xml"/>
- <link href="{{ BASE_URL }}" rel="alternate" />
- <updated>{{ NOW_DATE }}T{{ NOW_DATETIME }}Z</updated>
- <author>
- <name>{{ SITE_AUTHOR }}</name>
- <email>{{ SITE_AUTHOR_EMAIL }}</email>
- </author>
-
- $body$
+ <link href="{{ SITE_URL }}/feed.atom.xml" rel="self" />
+ <link href="{{ SITE_URL }}" />
+ <updated>{{ NOW_DATE }}T{{ NOW_DATETIME }}</updated>
+
+ {{ main_content }}
+ <!-- End of the feed -->
</feed>
diff --git a/templates/mustache/index.mustache b/templates/mustache/index.mustache
@@ -1,39 +1,28 @@
{{> partials/head.mustache }}
-<body id="index" prefix="foaf: http://xmlns.com/foaf/0.1/ dc: http://purl.org/dc/terms/">
- {{> partials/nav.button.mustache }}
-
- <div class="h-card" id="hs" resource="#hs" typeof="Person" vocab="http://schema.org/">
- <header>
- <div class="layout">
- <h1 class="logo p-name" property="name">{{ SITE_AUTHOR }}</h1>
- <h2 class="visuallyhidden p-job-title" property="jobTitle">{{ SITE_AUTHOR_TITLE }}</h2>
- <a class="u-url visuallyhidden" href="{{ BASE_URL }}" rel="me">{{ BASE_URL }}</a>
- </div>
- </header>
+<body id="index">
+ <div>
+ <header>
+ <div class="layout">
+ <h1 class="logo">{{ SITE_AUTHOR }}</h1>
+ <h2>{{ SITE_AUTHOR_TITLE }}</h2>
+
+ <a class="u-url visuallyhidden" href="{{ SITE_URL }}" rel="me">{{ SITE_URL }}</a>
+ </div>
+ </header>
- <main>
- <div class="layout">
- <!-- Pandoc var -->
- $body$
- </div>
- </main>
+ <main>
+ <div class="layout">
+ {{ main_content }}
+ </div>
+ </main>
- {{> partials/nav.index.mustache }}
-
-
- <footer>
- <address class="layout">
- <hr/>
- Vous pouvez communiquer avec moi par courriel à
- l'adresse <a href="mailto:{{ SITE_AUTHOR_EMAIL }}" rel="me">
- <span class="u-email" property="email">{{ SITE_AUTHOR_EMAIL }}</span></a>;
- sinon vous pouvez également vous connecter au canal <abbr title="Inter Relay Chat">IRC</abbr>
- <a href="irc://#htmlquebec@irc.freenode.net/">#htmlquebec</a> sur Freenode pour
- me parler en direct.
- </address>
- </footer>
- </div>
- {{> partials/bottom-script.mustache }}
+ <footer>
+ <address class="layout">
+ <hr/>
+ My email address is <a href="mailto:{{ SITE_AUTHOR_EMAIL }}" rel="me">{{ SITE_AUTHOR_EMAIL }}</a>.
+ </address>
+ </footer>
+ </div>
</body>
</html>
diff --git a/templates/mustache/partials/head.mustache b/templates/mustache/partials/head.mustache
@@ -1,32 +1,23 @@
<!DOCTYPE html>
-<html class="no-js" lang="{{ SITE_LANGUAGE }}">
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
+<html lang="{{ SITE_LANGUAGE }}">
+ <head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
- <title>$pagetitle$ — {{ SITE_DOMAINNAME }}</title>
+ <title>{{ page_title }} — {{ SITE_DOMAINNAME }}</title>
- <link rel="stylesheet" href="{{ BASE_URL }}/css/styles.min.css" />
- <link rel="webmention" href="https://webmention.herokuapp.com/api/webmention" />
- <link rel="me" href="http://shr.soucy.cc/" />
- <link rel="me" href="https://bandcamp.com/hs0ucy" />
- <link rel="me" href="https://framasphere.org/u/hs0ucy" />
- <link rel="me" href="http://twitter.com/hs0ucy" />
- <link rel="me" href="https://github.com/hs0ucy" />
- <link rel="me" href="sms:+15819966481" />
- <link href="http://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" />
- <link href="{{ BASE_URL }}/feed.atom.xml" rel="alternate" title="Feed de tous les contenus" type="application/atom+xml" />
+ <link rel="stylesheet" href="{{ BASE_URL }}/css/styles.css" />
+ <link href="{{ BASE_URL }}/feed.atom.xml" type="application/atom+xml" rel="alternate" title="Feed Atom" />
- <meta name="robots" content="index, follow" />
- <meta name="author" content="{{ SITE_AUTHOR }}" />
- <meta name="generator" content="{{ SITE_GENERATOR }}" />
- $if(description)$
- <meta name="description" content="$description$" />
- $endif$
- $if(keywords)$
- <meta name="keywords" content="$for(keywords)$$keywords$$sep$,$endfor$" />
- $endif$
- <meta name="google-site-verification" content="-JraS76m4WZOftgNjizPIzRPC0MkCNNfxmPV4MGkJsc" />
- </head>
+ <meta name="author" content="{{ SITE_AUTHOR }}" />
+ <meta name="generator" content="{{ SITE_GENERATOR }}" />
+
+ {{# has_description }}
+ <meta name="description" content="{{ description }}" />
+ {{/ has_description }}
+
+ {{# has_keywords }}
+ <meta name="keywords" content="{{ keywords }}" />
+ {{/ has_keywords }}
+ </head>