mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
♻️ refactor: add "target_attribute" macro (#515)
Co-authored-by: Óscar <welpo@users.noreply.github.com>
This commit is contained in:
parent
221e245671
commit
f47cefd42b
5 changed files with 15 additions and 15 deletions
11
templates/macros/target_attribute.html
Normal file
11
templates/macros/target_attribute.html
Normal 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 %}
|
Loading…
Add table
Add a link
Reference in a new issue