From 106e4b0d6efb042a728155f6fba8308d03104c0e Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Fri, 12 Jan 2024 10:14:19 +0100 Subject: [PATCH] Enable blank target in nav links --- config.toml | 2 +- templates/macros.html | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/config.toml b/config.toml index 2d4f7b3..70790c4 100644 --- a/config.toml +++ b/config.toml @@ -17,5 +17,5 @@ nav = [ {title = "Personál", path = "/personal/"}, {title = "Galerie", path = "/galerie/"}, {title = "Kontakt", path = "/kontakt/"}, - {title = "Přihlášky", path = "https://is.kocandaci.cz", external = true} + {title = "Přihlášky", path = "https://is.kocandaci.cz", external = true, target_blank = true} ] diff --git a/templates/macros.html b/templates/macros.html index 3c7aa66..02d87c1 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -1,10 +1,13 @@ {% macro nav_items() %} {% for item in config.extra.nav %} +
  • {{ item.title }}
  • - {% else %} -
  • {{ item.title }}
  • + class="external" href="{{ item.path }}" {% endif %} + {% if item.target_blank %} + target="_blank" + {% endif %} + href="{{ item.path }}">{{ item.title }} {% endfor %} {% endmacro %}