From 347dcec3bcb3efbeb88d56bae1af9054560c6989 Mon Sep 17 00:00:00 2001 From: Arnas Udovicius Date: Mon, 22 Aug 2022 07:07:42 +0300 Subject: [PATCH] all files count, zero tag count not display --- templates/en/index.gmi | 2 +- templates/macros.tpl | 2 +- templates/sgs/index.gmi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/en/index.gmi b/templates/en/index.gmi index eca5d13..cb42cb5 100644 --- a/templates/en/index.gmi +++ b/templates/en/index.gmi @@ -25,4 +25,4 @@ Main themes are spreaded by categories. Each file may have tags what can filter {% for file in lastFiles %} {{ text_url(lang, file) }} {% endfor %} {% endif %} -=> /en/f all texts +=> /en/f all texts ({{ tree.Files|length }}) diff --git a/templates/macros.tpl b/templates/macros.tpl index 4742fc1..eb40dd9 100644 --- a/templates/macros.tpl +++ b/templates/macros.tpl @@ -1,5 +1,5 @@ {% macro category_url(lang, path, category, count) export %}=> /{{ lang }}/f/{{ path }} šŸŒæ {{ category }}{% if count %} ({{ count }}){% endif %} {% endmacro %} -{% macro tag_url(lang, tag, count) export %}=> /{{ lang }}/t/{{ tag }} šŸ· {{ tag }} ({{ count }}) {% endmacro %} +{% macro tag_url(lang, tag, count) export %}=> /{{ lang }}/t/{{ tag }} šŸ· {{ tag }}{% if count %} ({{ count }}){% endif %} {% endmacro %} {% macro text_url(lang, file) export %}=> /{{ lang }}/f/{{ file.CategoriesAsUrl() }}/{{ file.Id }}/{{ file.GmiName() }} āœ’ {{ file.Description }} ({{ file.Created }}) {% endmacro %} diff --git a/templates/sgs/index.gmi b/templates/sgs/index.gmi index ea8fb7e..4e860cd 100644 --- a/templates/sgs/index.gmi +++ b/templates/sgs/index.gmi @@ -25,4 +25,4 @@ Pagrindėnės temas paskėrstiĢ„tas par kateguorėjės. Kuožnos fails gal turie {% for file in lastFiles %} {{ text_url(lang, file) }} {% endfor %} {% endif %} -=> /sgs/f vėsė straipsneĢ„ +=> /sgs/f vėsė straipsneĢ„ ({{ tree.Files|length }})