From 00ba61c9bb476782944363fc9297c95559d48f29 Mon Sep 17 00:00:00 2001 From: Matthias Mair <matmair@live.de> Date: Tue, 9 Nov 2021 00:19:27 +0100 Subject: [PATCH] conditional rendering --- _includes/functions.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/functions.html b/_includes/functions.html index dc66a7c1..c8b808fa 100644 --- a/_includes/functions.html +++ b/_includes/functions.html @@ -1,8 +1,8 @@ <section class="cm-gray-2 body-font"> <div class="container px-5 py-24 mx-auto"> <div class="flex flex-col text-center w-full mb-20"> - <h1 class="sm:text-3xl text-2xl font-medium title-font mb-4 cm-gray-1">{{ include.data.title }}</h1> - <p class="lg:w-2/3 mx-auto leading-relaxed text-base">{{ include.data.text }}</p> + {% if include.data.title %}<h1 class="sm:text-3xl text-2xl font-medium title-font mb-4 cm-gray-1">{{ include.data.title }}</h1>{% endif %} + {% if include.data.text %}<p class="lg:w-2/3 mx-auto leading-relaxed text-base">{{ include.data.text }}</p>{% endif %} {% if include.data.link %} <a class="text-secondary inline-flex items-center justify-center" href="{% include link.html item=include.data.link %}">Learn More {% include learn_more.html %}</a> {% endif %}