hscc

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

commit 6c9c0b21583f4c7db000c737eead678017d9e8b2
parent dea3d82dcc9ac71687e5f6b1a0975c5bb74c65ea
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Tue,  5 Oct 2021 21:04:08 -0400

Add data attributes and an header element

Diffstat:
Mtemplates/archives.html | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/templates/archives.html b/templates/archives.html @@ -2,7 +2,7 @@ <%- content %> <% if archives_children then %> - <ul class="archives-list"> + <ul class="archives-list" data-js-archives="list"> <% local years_keys = {} %> <% for k in pairs(archives_children) do table.insert(years_keys, k) end %> @@ -11,9 +11,12 @@ <!-- année --> <% for _, year in ipairs(years_keys) do %> <li class="archives-list__year"> - <h2 id="y<%= year -%>"> - <time><%= year -%></time> - </h2> + <header data-js-archives="header"> + <h2 id="y<%= year -%>" data-js-archives="year"> + <span class="visuallyhidden">Année </span> + <time><%= year -%></time> + </h2> + </header> <% local months_keys = {} %> <% for k in pairs(archives_children[year]) do table.insert(months_keys, k) end %> <% table.sort(months_keys) %>