commit bd3465f0d3bc2f500f4b1edb27aaa0298bdbc34e
parent 254a2aa7d5c3b48941589fc0f3e241e1060e0974
Author: Hugo Soucy <hugo@soucy.cc>
Date: Mon, 27 Sep 2021 18:55:17 -0400
Add clickable keywords
Diffstat:
4 files changed, 52 insertions(+), 7 deletions(-)
diff --git a/templates/posttypes/article.html b/templates/posttypes/article.html
@@ -11,6 +11,16 @@
<%- content %>
</div>
+ <% if keywords then %>
+ <ul class="hentry__categories">
+ <% for i, keyword in ipairs(keywords) do %>
+ <li>
+ <a class="p-category" href="/tg.html#<%- keyword:gsub("%s+", "-") -%>" rel="tag"><%- keyword -%></a>
+ </li>
+ <% end %>
+ </ul>
+ <% end %>
+
<footer class="hentry__footer">
<div>
<a class="u-url" href="<%- permalink -%>">#</a>
@@ -22,8 +32,8 @@
<% if posse then %>
Voir sur
<% for k, v in pairs(posse) do %>
- <a class="u-syndication" href="<%- v -%>" rel="syndication external"><%- k -%></a>,
- <% end %>
+ <a class="u-syndication" href="<%- v -%>" rel="syndication external"><%- k -%></a>,
+ <% end %>
<% end %>
</div>
diff --git a/templates/posttypes/bookmark.html b/templates/posttypes/bookmark.html
@@ -21,7 +21,7 @@
<ul class="hentry__categories">
<% for i, keyword in ipairs(keywords) do %>
<li>
- <em class="p-category"><%- keyword -%></em>
+ <a class="p-category" href="/tg.html#<%- keyword:gsub("%s+", "-") -%>" rel="tag"><%- keyword -%></a>
</li>
<% end %>
</ul>
diff --git a/templates/posttypes/note.html b/templates/posttypes/note.html
@@ -7,9 +7,34 @@
<%= title -%>
</h1>
- <div class="p-name e-content">
- <%- content -%>
- </div>
+ <% if citeurl then %>
+ <blockquote class="p-name e-content">
+ <div>
+ <%- content -%>
+ </div>
+ <% if cite then %>
+ <footer>
+ <cite class="h-cite">
+ <a class="u-url p-author" href="<%- citeurl -%>" rel="external"><%- cite -%></a>
+ </cite>
+ </footer>
+ <% end %>
+ </blockquote>
+ <% else %>
+ <div class="p-name e-content">
+ <%- content -%>
+ </div>
+ <% end %>
+
+ <% if keywords then %>
+ <ul class="hentry__categories">
+ <% for i, keyword in ipairs(keywords) do %>
+ <li>
+ <a class="p-category" href="/tg.html#<%- keyword:gsub("%s+", "-") -%>" rel="tag"><%- keyword -%></a>
+ </li>
+ <% end %>
+ </ul>
+ <% end %>
<footer class="hentry__footer">
<div>
diff --git a/templates/posttypes/reply.html b/templates/posttypes/reply.html
@@ -8,12 +8,22 @@
<%- content %>
</div>
+ <% if keywords then %>
+ <ul class="hentry__categories">
+ <% for i, keyword in ipairs(keywords) do %>
+ <li>
+ <a class="p-category" href="/tg.html#<%- keyword:gsub("%s+", "-") -%>" rel="tag"><%- keyword -%></a>
+ </li>
+ <% end %>
+ </ul>
+ <% end %>
+
<footer class="hentry__footer">
<div>
Publié le <time class="dt-published" datetime="<%= date -%>T<%= datetime -%>"><%= date -%></time>,
par <a class="p-author author h-card" href="<%= author.uri -%>" rel="author"><i><%= author.name -%></i><img alt="" class="u-photo visuallyhidden" src="http://assets.soucy.cc/images/hugosoucy/favicon/hs-autoportrait-2010-nb-favion-32x32.png"/></a>.
<% if tonumber(os.date('%Y%m%d%H%M%S', time_modification)) > tonumber(time_created) then %>
- Mise à jour <time class="dt-updated"><%= os.date('%Y-%m-%d %H:%M:%S', time_modification) -%></time>.
+ Mise à jour <time class="dt-updated"><%= os.date('%Y-%m-%d %H:%M:%S', time_modification) -%></time>.
<% end %>
</div>