From 752d0330b726a41bec63476a6266e722a59a03a7 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 7 Jun 2020 21:06:10 +0800 Subject: [PATCH] Remove invalid links from categories page. (#79) To pass the HTML-Proofer test. --- tabs/categories.md | 58 +++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/tabs/categories.md b/tabs/categories.md index 3ee13ec..b6c2382 100644 --- a/tabs/categories.md +++ b/tabs/categories.md @@ -8,6 +8,9 @@ title: Categories # MIT License --- +{% assign HEAD_PREFIX = "h_" %} +{% assign LIST_PREFIX = "l_" %} + {% assign sort_categories = site.categories | sort %} {% for category in sort_categories %} @@ -32,41 +35,48 @@ title: Categories
-
+
- {% if sub_categories_size > 0 %} - - {% else %} - - {% endif %} - {{ category_name }} + {% if sub_categories_size > 0 %} + + {% else %} + + {% endif %} + + {{ category_name }} + + {% assign top_posts_size = site.categories[category_name] | size %} - - {% if sub_categories_size > 0 %} - {{ sub_categories_size }} - {% if sub_categories_size > 1 %}categories{% else %}category{% endif %}, - {% endif %} - {{ top_posts_size }} - post{% if top_posts_size > 1 %}s{% endif %} - + + {% if sub_categories_size > 0 %} + {{ sub_categories_size }} + {% if sub_categories_size > 1 %}categories{% else %}category{% endif %}, + {% endif %} + {{ top_posts_size }} + post{% if top_posts_size > 1 %}s{% endif %} + - - {% if sub_categories_size > 0%} - - {% else %} - - {% endif %} - + {% if sub_categories_size > 0%} + + + + {% else %} + + + + {% endif %}
{% if sub_categories_size > 0 %} -
+
    {% for sub_category in sub_categories %}