From 77e23d492d8b4e8c327d86df3dbd2e383a0223a3 Mon Sep 17 00:00:00 2001 From: Tom Hodson Date: Fri, 8 Jul 2022 11:11:06 +0100 Subject: [PATCH] don't show empty CV topics --- cv.html | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/cv.html b/cv.html index 35a8fc8..272138b 100644 --- a/cv.html +++ b/cv.html @@ -9,30 +9,33 @@ redirect_from: or have a look at my blog. Click any item for a little more detail.

{% for topic in site.data.cv_topics %} + {% assign work = site.cv_entries | where:'type', topic.id %} + {% if work.size > 0 %}

{{topic.name}}

Expand all
- {% assign work = site.cv_entries | where:'type', topic.id %} + {% for entry in work %} -
- -
-

{{entry.title}}

- {{entry.location}} -
-
-
-
- {{entry.alt}} -
-
- {{entry.excerpt}} - {% if entry.read_more %}Read more.{% endif %} -
-
-
+
+ +
+

{{entry.title}}

+ {{entry.location}} +
+
+
+
+ {{entry.alt}} +
+
+ {{entry.excerpt}} + {% if entry.read_more %}Read more.{% endif %} +
+
+
{% endfor %} + {% endif %} {% endfor %}