publications.html (3737B)
1 <link 2 href="/css/hfeed.min.css" 3 media="screen" 4 rel="stylesheet"/> 5 <article class="h-feed hfeed"> 6 <header class="hfeed__header"> 7 <%- content %> 8 </header> 9 10 <div class="hfeed__infos"> 11 <small><%= #children -%> entrée(s)</small> 12 <nav> 13 <% local year = tonumber(date:sub(1,4)) %> 14 <% local year_next = (year + 1) %> 15 <% local year_prev = (year - 1) %> 16 17 <% if year > 2020 then %> 18 <a href="/<%= year_prev -%>" rel="prev"><small><%= year_prev -%></small></a> 19 <% end %> 20 21 <% if year < tonumber(os.date('%Y')) then %> 22 <a href="/<%= year_next -%>" rel="next"><small><%= year_next -%></small></a> 23 <% end %> 24 </nav> 25 </div> 26 27 <% if children then %> 28 <ol class="hfeed__entries" reversed=""> 29 <% for i = 1, #children do %> 30 <li class="h-entry hentry<% if children[i].posttype == 'note' then %> as-note<% end %>"> 31 <% if children[i].posttype == 'bookmark' then %> 32 <small class="hentry__posttype"> 33 <svg class="ico" height="24" width="24" role="image"><use href="#ico_bookmark"></use></svg> 34 Marque-page 35 </small> 36 <h2 class="p-name"> 37 <a class="u-url" href="<%= children[i].rellink -%>" rel="bookmark"><%= children[i].title -%></a> 38 </h2> 39 <% elseif children[i].posttype == 'note' then %> 40 <small class="hentry__posttype"> 41 <svg class="ico" height="24" width="24" role="image"><use href="#ico_note"></use></svg> 42 Note 43 </small> 44 <h2 class="visuallyhidden"> 45 <%= children[i].title -%> 46 </h2> 47 <% elseif children[i].posttype == 'reply' then %> 48 <small class="hentry__posttype"> 49 <svg class="ico" height="24" width="24" role="image"><use href="#ico_corner_down_left"></use></svg> 50 <span>En réponse à </span><cite><a href="<%- children[i].url -%>" class="u-in-reply-to" rel="external"><%- children[i].url -%></a></cite>. 51 </small> 52 <% elseif children[i].posttype == 'article' then %> 53 <small class="hentry__posttype"> 54 <svg class="ico" height="24" width="24" role="image"><use href="#ico_article"></use></svg> 55 Texte 56 </small> 57 58 <h2 class="p-name"> 59 <a class="u-url" href="<%= children[i].rellink -%>" rel="bookmark"><%= children[i].title -%></a> 60 </h2> 61 <% else %> 62 <h2 class="visuallyhidden"> 63 <%= children[i].title -%> 64 </h2> 65 <% end %> 66 67 <% if children[i].summary then %> 68 <p class="p-content"><%- children[i].summary -%></p> 69 <% else %> 70 <div class="e-content<% if children[i].posttype == 'note' then %> p-name<% end %>"><%- children[i].content -%></div> 71 <% end %> 72 73 <footer class="hentry__footer"> 74 <div> 75 <% if children[i].posttype == 'article' 76 or children[i].posttype == 'bookmark' then %> 77 Publié le <time class="dt-published" datetime="<%= children[i].date -%>T<%= children[i].datetime -%>"><%= children[i].date -%></time>. 78 <% else %> 79 Publié le <a class="u-url" href="<%= children[i].rellink -%>" rel="bookmark"> 80 <time class="dt-published" datetime="<%= children[i].date -%>T<%= children[i].datetime -%>"><%= children[i].date -%></time></a>. 81 <% end %> 82 <span class="visuallyhidden">Par <em class="p-author author h-card"><%= children[i].author.name -%></em>.</span> 83 </div> 84 </footer> 85 </li> 86 <% end %> 87 </ol> 88 <% end %> 89 </article>