hscc

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

commit d2646b92d344c9bed78a8554dd249bd44da8eb16
parent b48fff8c88fc6b0dd92aaeaeb5c942dc5260b0b8
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Wed,  9 Dec 2020 21:58:00 -0500

Change templates

Diffstat:
Mtemplates/feed.xml.html | 1+
Mtemplates/layout.html | 78++++++++++++++++++++++++++++++++++++++++--------------------------------------
Mtemplates/navigation.html | 4+++-
Mtemplates/posttypes/reply.html | 28+++++++++++++++++++++++++---
Mtemplates/publications.html | 11++++++++++-
5 files changed, 79 insertions(+), 43 deletions(-)

diff --git a/templates/feed.xml.html b/templates/feed.xml.html @@ -15,6 +15,7 @@ <uri><%- author.uri -%></uri> </author> + <% table.sort(children, function(a , b) return tonumber(a.time_created) > tonumber(b.time_created) end) %> <% for i, child in ipairs(children) do %> <entry> <title><%- child.title -%></title> diff --git a/templates/layout.html b/templates/layout.html @@ -2,57 +2,59 @@ <html lang="<%= language -%>"> <%- head %> <% local posttype = posttype or 'default' %> - <body class="layout <%- template or posttype -%>" id="t"> + <body class="<%- template or posttype -%>" id="t"> <svg height="0" style="position:absolute" viewBox="0 0 80 20" width="0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <symbol id="ico_note" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 2h18v14h-2v2h-2v-2h-2v2h2v2h-2v2H3V2zm2 2v16h8v-6h6V4H5z" fill="currentColor"/></symbol> - <symbol id="ico_bookmark" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 2H6v2h12v16h-2v-2h-2v-2h-4v2H8v2H6V2H4v20h4v-2h2v-2h4v2h2v2h4V2h-2z" fill="currentColor"/></symbol> - <symbol id="ico_nav" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6h16v2H4V6zm0 5h16v2H4v-2zm16 5H4v2h16v-2z" fill="currentColor"/></symbol> - <symbol id="ico_chevron_left" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 5v2h-2V5h2zm-4 4V7h2v2h-2zm-2 2V9h2v2h-2zm0 2H8v-2h2v2zm2 2v-2h-2v2h2zm0 0h2v2h-2v-2zm4 4v-2h-2v2h2z" fill="currentColor"/></symbol> - <symbol id="ico_corner_down_left" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 16H8v2H6v-2H4v-2h2v-2h2v2h10V4h2v12h-2zM8 12v-2h2v2H8zm0 6v2h2v-2H8z" fill="currentColor"/></symbol> + <symbol id="ico_bookmark" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 2H6v2h12v16h-2v-2h-2v-2h-4v2H8v2H6V2H4v20h4v-2h2v-2h4v2h2v2h4V2h-2z" fill="currentColor"/></symbol> + <symbol id="ico_nav" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6h16v2H4V6zm0 5h16v2H4v-2zm16 5H4v2h16v-2z" fill="currentColor"/></symbol> + <symbol id="ico_chevron_left" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 5v2h-2V5h2zm-4 4V7h2v2h-2zm-2 2V9h2v2h-2zm0 2H8v-2h2v2zm2 2v-2h-2v2h2zm0 0h2v2h-2v-2zm4 4v-2h-2v2h2z" fill="currentColor"/></symbol> + <symbol id="ico_corner_down_left" width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 16H8v2H6v-2H4v-2h2v-2h2v2h10V4h2v12h-2zM8 12v-2h2v2H8zm0 6v2h2v-2H8z" fill="currentColor"/></symbol> </svg> + <a class="go-to-nav visuallyhidden--lg focusable" href="#n"> <svg class="ico" height="24" role="image" width="24"><use href="#ico_nav"></use></svg> <span class="visuallyhidden--to-lg">Aller à la </span>navigation </a> - <a class="go-to-content visuallyhidden focusable" href="#m">Aller au contenu</a> - <main class="main" id="m"> - <%- post %> - </main> + <div class="layout"> + <main class="main" id="m"> + <%- post %> + </main> - <%- navigation -%> + <%- navigation -%> - <footer class="footer-banner"> - <div class="footer-banner__wrapper"> - <nav> - <a - <% if rellink == '/archives.html' then %> - aria-current="page" - <% end %> - href="/archives.html">Archives</a> - | - <a - <% if rellink == '/abonnement.html' then %> - aria-current="page" - <% end %> - href="/abonnement.html">Me suivre</a> - </nav> + <footer class="footer-banner"> + <div class="footer-banner__wrapper"> + <nav> + <a + <% if rellink == '/archives.html' then %> + aria-current="page" + <% end %> + href="/archives.html">Archives</a> + | + <a + <% if rellink == '/abonnement.html' then %> + aria-current="page" + <% end %> + href="/abonnement.html">Me suivre</a> + </nav> - <div> - <a href="https://xn--sr8hvo.ws/%F0%9F%94%83%E2%9B%8E%F0%9F%98%9F/previous">←</a> - IndieWeb Webring 🕸💍 - <a href="https://xn--sr8hvo.ws/%F0%9F%94%83%E2%9B%8E%F0%9F%98%9F/next">→</a> - </div> + <div> + <a href="https://xn--sr8hvo.ws/%F0%9F%94%83%E2%9B%8E%F0%9F%98%9F/previous">←</a> + IndieWeb Webring 🕸💍 + <a href="https://xn--sr8hvo.ws/%F0%9F%94%83%E2%9B%8E%F0%9F%98%9F/next">→</a> + </div> - <div> - <a - href="https://creativecommons.org/licenses/by/2.5/ca/deed.fr" - rel="external license" - title="Licence Creative Commons, Attribution 2.5 Canada. Lien externe">CC BY 2.5 CA</a>&nbsp;| - <time><%= os.date('%Y') -%></time> + <div> + <a + href="https://creativecommons.org/licenses/by/2.5/ca/deed.fr" + rel="external license" + title="Licence Creative Commons, Attribution 2.5 Canada. Lien externe">CC BY 2.5 CA</a>&nbsp;| + <time><%= os.date('%Y') -%></time> + </div> </div> - </div> - </footer> + </footer> + </div> </body> </html> diff --git a/templates/navigation.html b/templates/navigation.html @@ -24,7 +24,9 @@ aria-current="page" <% end %> class="nav__link" - href="/file/curriculum-vitae.html">CV</a> + href="/file/curriculum-vitae.html"> + <abbr title="Curriculum Vitae">CV</abbr> + </a> </li> </ol> </nav> diff --git a/templates/posttypes/reply.html b/templates/posttypes/reply.html @@ -1,11 +1,11 @@ <article class="h-entry hentry"> - <small> + <small class="hentry__posttype"> <svg class="ico" height="24" width="24" role="image"><use href="#ico_corner_down_left"></use></svg> - En réponse à <cite><a href="<%- url -%>" class="u-in-reply-to" rel="external"><%- url -%></a></cite>. + <span>En réponse à </span><cite><a href="<%- url -%>" class="u-in-reply-to" rel="external"><%- url -%></a></cite>. </small> <blockquote class="h-cite hcite"> - <div class="e-content"><%= replyto -%></div> + <%- replyto -%> </blockquote> <div class="e-content p-name p-content"> @@ -32,4 +32,26 @@ </a> </div> </footer> + + <a + aria-hidden="true" + class="visuallyhidden" + href="https://brid.gy/publish/mastodon"></a> + <a + aria-hidden="true" + class="visuallyhidden" + href="https://fed.brid.gy/"></a> + + <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> </article> diff --git a/templates/publications.html b/templates/publications.html @@ -27,9 +27,18 @@ <h2 class="visuallyhidden"> <%= child.date -%> @ <%= child.datetime -%> </h2> + <% elseif child.posttype == 'reply' then %> + <small class="hentry__posttype"> + <svg class="ico" height="24" width="24" role="image"><use href="#ico_corner_down_left"></use></svg> + <span>En réponse à </span><cite><a href="<%- url -%>" class="u-in-reply-to" rel="external"><%- child.url -%></a></cite>. + </small> + + <blockquote class="h-cite hcite"> + <%- child.replyto -%> + </blockquote> <% else %> <h2 class="visuallyhidden"> - <%= child.date -%> @ <%= child.datetime -%> + <%= child.title -%> </h2> <% end %>