commit a7312e4e515098d71d19a0566c057528072d31ad
parent a2b78d0ec9050dcf8ffa4ae1febef41126b99197
Author: Hugo Soucy <hugo@soucy.cc>
Date: Tue, 6 Jun 2017 21:56:16 -0400
Convert mustache/pandoc templates in mustache templates only
Diffstat:
5 files changed, 70 insertions(+), 107 deletions(-)
diff --git a/templates/mustache/default.mustache b/templates/mustache/default.mustache
@@ -9,7 +9,6 @@
<footer>
<address class="layout">
<hr/>
-
<p>
<a class="u-url u-uid u-syndication" href="#" rel="bookmark">#</a>
diff --git a/templates/mustache/note-index.inc.mustache b/templates/mustache/note-index.inc.mustache
@@ -1,31 +1,14 @@
<li class="note__item h-entry hentry as-note">
- $if(citeurl)$
- <blockquote class="note__blockquote p-name e-content">
- <div class="note__blockquote__quote">$body$</div>
- $if(cite)$
- <footer class="note__blockquote__footer">
- —
- <cite class="note__blockquote__cite">
- <a href="$citeurl$" rel="external nofollow">
- $cite$
- </a>
- </cite>
- </footer>
- $endif$
- </blockquote>
- $else$
- <div class="note__blocknote p-name e-content">
- $body$
- </div>
- $endif$
+ {{> note.inc.mustache }}
+
<footer class="note__footer">
Publié le
<a class="note__link u-url u-uid u-syndication"
- $if(url)$
- href="$url$"
- $endif$
+ {{# permalink }}
+ href="{{ permalink }}"
+ {{/ permalink }}
rel="syndication">
- <time class="dt-published dt-updated" $if(datetime)$datetime="$date$T$datetime$"$endif$>$date$</time>
+ <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>
diff --git a/templates/mustache/note-index.mustache b/templates/mustache/note-index.mustache
@@ -1,21 +1,19 @@
{{> partials/head.mustache }}
<body id="note" class="note">
- {{> partials/nav.button.mustache }}
+ {{> partials/nav.button.mustache }}
- <main>
- <div class="layout">
- $body$
+ <main class="note__main">
+ <div class="layout">
+ {{ main_content }}
- <ol class="note__list">
- $for(include-after)$
- $include-after$
- $endfor$
- </ol>
- </div>
- </main>
+ <ol class="note__list">
+ {{ list_items }}
+ </ol>
+ </div>
+ </main>
- {{> partials/nav.mustache }}
- {{> partials/bottom-script.mustache }}
+ {{> partials/nav.mustache }}
+ {{> partials/bottom-script.mustache }}
</body>
</html>
diff --git a/templates/mustache/note.mustache b/templates/mustache/note.mustache
@@ -1,77 +1,60 @@
{{> 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>
+ <main>
+ <article class="layout h-entry hentry as-note">
+ <div class="layout__vcenter">
+ <h1 class="visuallyhidden">{{ title }}</h1>
- $if(replyto)$
- <p>
- <a class="note__link u-in-reply-to"
- href="$replyto$"
- rel="in-reply-to">En réponse à $replyto$.</a><br/>
- </p>
- $endif$
+ {{# replyto }}
+ <p>
+ <a class="note__link u-in-reply-to"
+ href="{{ replyto }}"
+ rel="in-reply-to">En réponse à {{ replyto }}.</a><br/>
+ </p>
+ {{/ replyto }}
- $if(citeurl)$
- <blockquote class="note__blockquote p-name e-content">
- <div class="note__blockquote__quote">$body$</div>
- $if(cite)$
- <footer class="note__blockquote__footer">
- —
- <cite class="note__blockquote__cite h-cite">
- <a class="u-url p-author" href="$citeurl$" rel="external nofollow">
- $cite$
- </a>
- </cite>
- </footer>
- $endif$
- </blockquote>
- $else$
- <div class="note__blocknote p-name e-content">
- $body$
- </div>
- $endif$
+ {{> note.inc.mustache }}
- <footer class="note__footer">
- $if(permalink)$
- <a class="note__link u-url u-uid u-syndication bookmark"
- href="$permalink$"
- rel="bookmark">#</a>
- $endif$
+ <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" $if(datetime)$datetime="$date$T$datetime$"$endif$>$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>
- $if(modified)$et modifié le <time class="dt-updated">$modified$</time>$endif$.
- <br/>↵ <a href="{{ BASE_URL }}/note">Retourner aux notes</a>.
- </footer>
+ 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/>↵ <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>
- $if(bridgy)$
- <a class="visuallyhidden" href="https://brid.gy/publish/twitter"></a>
- $endif$
- </article>
- </main>
+ <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>
- {{> partials/bottom-script.mustache }}
+ {{# bridgy }}
+ <a class="visuallyhidden" href="https://brid.gy/publish/twitter"></a>
+ {{/ bridgy }}
+ </article>
+ </main>
+
+ {{> partials/bottom-script.mustache }}
</body>
</html>
diff --git a/templates/mustache/partials/head.mustache b/templates/mustache/partials/head.mustache
@@ -13,11 +13,11 @@
<meta name="author" content="{{ SITE_AUTHOR }}" />
<meta name="generator" content="{{ SITE_GENERATOR }}" />
- {{# has_description }}
+ {{# description }}
<meta name="description" content="{{ description }}" />
- {{/ has_description }}
+ {{/ description }}
- {{# has_keywords }}
+ {{# keywords }}
<meta name="keywords" content="{{ keywords }}" />
- {{/ has_keywords }}
+ {{/ keywords }}
</head>