♻️ refactor: add "target_attribute" macro

This commit is contained in:
tzinm 2025-04-14 17:48:07 +02:00
parent 2d68b40e14
commit f29db5c843
5 changed files with 15 additions and 15 deletions

View file

@ -0,0 +1,11 @@
{% macro target_attribute(new_tab=false) %}
{%- set blank_target = "" -%}
{%- if new_tab -%}
{%- set blank_target = "target=_blank" -%}
{%- endif -%}
{{ blank_target }}
{% endmacro target_attribute %}