hscc

Soure code of <https://hugo.soucy.cc>.
git clone git://soucy.cc/hscc.git
Log | Files | Refs

commit 90348de48382c6a87bc8c9e0113132b8d6cb38f5
parent 86057536b320b5ec66df2487ac418229dee477e0
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sun, 26 Sep 2021 10:38:53 -0400

Update templates

Diffstat:
Mtemplates/curriculum-vitae.html | 14++++++--------
Mtemplates/default-index.html | 20+++++++++-----------
Mtemplates/feed.xml.html | 17++++++++---------
Mtemplates/footer.html | 2+-
Mtemplates/index.html | 6++----
Mtemplates/navigation.html | 9++++++---
Mtemplates/posttypes/note-index.html | 17++++++++---------
Mtemplates/publications.html | 46++++++++++++++++++++++------------------------
8 files changed, 62 insertions(+), 69 deletions(-)

diff --git a/templates/curriculum-vitae.html b/templates/curriculum-vitae.html @@ -87,13 +87,11 @@ <h2>Profil</h2> <div class="p-summary" property="dc:description"> - <p>Je suis un <strong>développeur web front-end</strong>, spécialisé en <strong>accessibilité web</strong>, - qui a deux décennies d'expérience dans le milieu des - technologies de l'information.</p> + <p>Je suis un <strong title="et intégrateur web">développeur web front-end</strong> spécialisé en <strong title="WCAG, WAI-ARIA">accessibilité web</strong> + possédant deux décennies d'expérience.</p> - <p>J'excelle à programmer des <strong>interfaces robustes</strong> et - <strong>performantes</strong> qui je l'espère, plaisent aux personnes qui - les utilisent.</p> + <p>J'excelle à programmer des <strong>interfaces robustes</strong>, <strong title="responsive web design">réactives</strong>, <strong>performantes</strong> et + esthétiques. </div> </section> @@ -301,7 +299,7 @@ <ul class="p-summary" property="cv:jobDescription"> <li>Planifier et concevoir la refonte du site Web de l'entreprise.</li> <li>Donner des formations en micro-informatique et en création de site Web.</li> - <li>Rédiger des document de formation.</li> + <li>Rédiger des documents de formation.</li> <li>Soutenir techniquement la clientèle.</li> </ul> </dd> @@ -342,7 +340,7 @@ <ul class="p-summary" property="cv:jobDescription"> <li>Concevoir des sites Web.</li> <li>Produire des documents destinés à l'impression.</li> - <li>Donner des formations en microinformatique.</li> + <li>Donner des formations en micro-informatique.</li> <li>Créer des documents de formation.</li> <li>Soutenir techniquement la clientèle.</li> </ul> diff --git a/templates/default-index.html b/templates/default-index.html @@ -2,16 +2,14 @@ <div class="e-content"> <%- content %> </div> - <% if list then %> - <ol> - <% table.sort(list, function(a , b) return tonumber(site[a].time_created) > tonumber(site[b].time_created) end) %> - - <% for i, child in ipairs(list) do %> - <li> - <a href="<%= site[child].rellink -%>"><%= site[child].title -%></a> &mdash; - <time class="dt-published" datetime="<%= site[child].date -%>T<%= site[child].datetime -%>"><%= site[child].date -%></time> - </li> - <% end %> - </ol> + <% if children then %> + <ol> + <% for _, child in pairs(children) do %> + <li> + <a href="<%= child.rellink -%>"><%= child.title -%></a> &mdash; + <time class="dt-published" datetime="<%= child.date -%>T<%= child.datetime -%>"><%= child.date -%></time> + </li> + <% end %> + </ol> <% end %> </article> diff --git a/templates/feed.xml.html b/templates/feed.xml.html @@ -15,17 +15,16 @@ <uri><%- author.uri -%></uri> </author> - <% if list then %> - <% table.sort(list, function(a , b) return tonumber(site[a].time_created) > tonumber(site[b].time_created) end) %> - <% for i, child in ipairs(list) do %> + <% if children then %> + <% for _, child in ipairs(children) do %> <entry> - <title><%- site[child].title -%></title> - <id><%- site[child].id -%></id> - <link href="<%= site[child].permalink -%>" hreflang="<%= site[child].language -%>" rel="alternate" type="text/html" /> - <published><%= site[child].date -%>T<%= site[child].datetime -%>Z</published> - <updated><%- os.date('%Y-%m-%dT%H:%M:%S', site[child].time_modification) -%>Z</updated> + <title><%- child.title -%></title> + <id><%- child.id -%></id> + <link href="<%= child.permalink -%>" hreflang="<%= child.language -%>" rel="alternate" type="text/html" /> + <published><%= child.date -%>T<%= child.datetime -%>Z</published> + <updated><%- os.date('%Y-%m-%dT%H:%M:%S', child.time_modification) -%>Z</updated> <content type="html"> - <%= site[child].content -%> + <%= child.content -%> </content> </entry> <% end %> diff --git a/templates/footer.html b/templates/footer.html @@ -10,7 +10,7 @@ src="/icon.white.svg" width="20px" /></a> | <a href="/biscuits.html">Ce site sans biscuit</a> - <a href="https://1mb.club/" rel="external">qui ne drainera pas votre batterie</a> est propulsé par <a href="https://luarocks.org/modules/hs0ucy/satelito" rel="external">Satelito</a>. | + <a href="https://1mb.club/" rel="external">qui ne drainera pas votre batterie</a> est propulsé par <a href="https://luarocks.org/modules/hs0ucy/satelito" rel="external">Satelito</a>, un générateur de site statique écrit en Lua. | <a href="https://creativecommons.org/licenses/by-sa/2.5/ca/deed.fr" rel="external license" diff --git a/templates/index.html b/templates/index.html @@ -1,12 +1,10 @@ -<% local inspect = require 'inspect' %> -<% table.sort(list, function(a , b) return tonumber(site[a].time_created) > tonumber(site[b].time_created) end) %> <%- content -%> <aside class="main__aside"> <small>Dernière publication</small> <p> <a - href="<%= site[list[1]].rellink %>"> - <%- site[list[1]].title -%> + href="<%= children[1].rellink %>"> + <%- children[1].title -%> </a> </p> </aside> diff --git a/templates/navigation.html b/templates/navigation.html @@ -5,7 +5,7 @@ <ol class="nav__list"> <li class="nav__item"> <a - <% if rellink == '' then %> + <% if rellink == '/' then %> aria-current="page" <% end %> class="nav__link" @@ -14,7 +14,7 @@ </li> <li class="nav__item"> <a - <% if rellink == os.date('%Y')..'/' then %> + <% if rellink == '/'..os.date('%Y')..'/' then %> aria-current="page" <% end %> class="nav__link" @@ -64,8 +64,11 @@ </li> <li class="nav__item"> <a + <% if rellink == '/now.html' then %> + aria-current="page" + <% end %> class="nav__link" - href="#t">Retour en-haut</a> + href="/now.html">Maintenant</a> </li> </ol> </div> diff --git a/templates/posttypes/note-index.html b/templates/posttypes/note-index.html @@ -3,14 +3,13 @@ <%- content %> </div> <% if children then %> - <ol> - <% table.sort(children, function(a , b) return tonumber(a.time_created) > tonumber(b.time_created) end) %> - <% for i, child in ipairs(children) do %> - <li> - <a href="<%= child.rellink -%>"><%= child.title -%></a> &mdash; - <time class="dt-published" datetime="<%= child.date -%>T<%= child.datetime -%>"><%= child.date -%></time> - </li> - <% end %> - </ol> + <ol> + <% for _, child in ipairs(children) do %> + <li> + <a href="<%= child.rellink -%>"><%= child.title -%></a> &mdash; + <time class="dt-published" datetime="<%= child.date -%>T<%= child.datetime -%>"><%= child.date -%></time> + </li> + <% end %> + </ol> <% end %> </article> diff --git a/templates/publications.html b/templates/publications.html @@ -1,13 +1,11 @@ <article class="h-feed hfeed"> <%- content %> - <% if list then %> + <% if children then %> <ol class="hfeed__entries"> - <% table.sort(list, function(a , b) return tonumber(site[a].time_created) > tonumber(site[b].time_created) end) %> - - <% for i, child in ipairs(list) do %> - <li class="h-entry hentry<% if site[child].posttype == 'note' then %> as-note<% end %>"> - <% if site[child].posttype == 'bookmark' then %> + <% for _, child in ipairs(children) do %> + <li class="h-entry hentry<% if child.posttype == 'note' then %> as-note<% end %>"> + <% if child.posttype == 'bookmark' then %> <small class="hentry__posttype"> <svg class="ico" height="24" width="24" role="image"><use href="#ico_bookmark"></use></svg> Marque-page @@ -15,49 +13,49 @@ <h2 class="p-name"> <a class="u-bookmark-of h-cite" - href="<%= site[child].url %>" + href="<%= child.url %>" rel="external"> - <%- site[child].title -%> + <%- child.title -%> </a> </h2> - <% elseif site[child].posttype == 'note' then %> + <% elseif child.posttype == 'note' then %> <small class="hentry__posttype"> <svg class="ico" height="24" width="24" role="image"><use href="#ico_note"></use></svg> Note </small> <h2 class="visuallyhidden"> - <%= site[child].title -%> + <%= child.title -%> </h2> - <% elseif site[child].posttype == 'reply' then %> + <% 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="<%- site[child].url -%>" class="u-in-reply-to" rel="external"><%- site[child].url -%></a></cite>. + <span>En réponse à </span><cite><a href="<%- child.url -%>" class="u-in-reply-to" rel="external"><%- child.url -%></a></cite>. </small> - <% elseif site[child].posttype == 'article' then %> + <% elseif child.posttype == 'article' then %> <small class="hentry__posttype"> <svg class="ico" height="24" width="24" role="image"><use href="#ico_article"></use></svg> Texte </small> - <h2 class="p-name"><%= site[child].title -%></h2> + <h2 class="p-name"><%= child.title -%></h2> - <% if site[child].summary then %> - <p class="p-content"><%- site[child].summary -%></p> + <% if child.summary then %> + <p class="p-content"><%- child.summary -%></p> <% end %> <% else %> <h2 class="visuallyhidden"> - <%= site[child].title -%> + <%= child.title -%> </h2> <% end %> - <% if not site[child].summary then %> - <div class="e-content<% if site[child].posttype == 'note' then %> p-name<% end %>"><%- site[child].content -%></div> + <% if not child.summary then %> + <div class="e-content<% if child.posttype == 'note' then %> p-name<% end %>"><%- child.content -%></div> <% end %> <footer class="hentry__footer"> - <% if site[child].keywords and site[child].posttype == 'bookmark' then %> + <% if child.keywords and child.posttype == 'bookmark' then %> <ul class="hentry__categories"> - <% for i, keyword in ipairs(site[child].keywords) do %> + <% for i, keyword in ipairs(child.keywords) do %> <li> <em class="p-category"><%- keyword -%></em> </li> @@ -65,9 +63,9 @@ </ul> <% end %> <div> - Publié le <a class="u-url" href="<%= site[child].rellink -%>"> - <time class="dt-published" datetime="<%= site[child].date -%>T<%= site[child].datetime -%>"><%= site[child].date -%></time></a>. - <span class="visuallyhidden">Par <em class="p-author author h-card"><%= site[child].author.name -%></em>.</span> + Publié le <a class="u-url" href="<%= child.rellink -%>"> + <time class="dt-published" datetime="<%= child.date -%>T<%= child.datetime -%>"><%= child.date -%></time></a>. + <span class="visuallyhidden">Par <em class="p-author author h-card"><%= child.author.name -%></em>.</span> </div> </footer> </li>