Use on_card parameter to decide to show the cards or not

This commit is contained in:
BernatBC 2024-02-19 08:15:08 +01:00
parent 14ad60c956
commit 7bc0fd2227
2 changed files with 2 additions and 1 deletions

View file

@ -81,7 +81,6 @@ window.addEventListener('DOMContentLoaded', () => {
const templateDefinition = document.getElementById('search-result-template').innerHTML
// replace values
function tagsHTML() {
if (!params.tags) return '';
const tags = value.item.tags;
let string = '<ul style="padding-left: 0;">';
tags.forEach((t) => {string += '<li class="rounded"><a href="/tags/' + t.toLowerCase() + '/" class="btn btn-sm btn-info">' + t + "</a></li>"});

View file

@ -46,9 +46,11 @@
<h5 class="card-title">${title}</h5>
<p class="card-text post-summary">${summary}</p>
</a>
{{ if site.Params.features.tags.on_card }}
<div class="tags">
${tags}
</div>
{{ end }}
</div>
<div class="card-footer">
<span class="float-left">${date}</span>