♻️ refactor: add target_attribute macro

This commit is contained in:
2025-04-28 16:11:01 +07:00
parent cbb52d74a4
commit 74abf0aac6
5 changed files with 15 additions and 15 deletions

View File

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