Rename link_target macro to get_target

This commit is contained in:
Fidel Ramos 2019-10-30 22:03:01 +00:00
parent 2455759bd8
commit f0e999a68a
No known key found for this signature in database
GPG key ID: 64490E0A752C21C4

View file

@ -108,7 +108,7 @@
<nav> <nav>
<ul class="list"> <ul class="list">
{# Open links in new window depending on the LINKS_IN_NEW_TAB setting #} {# Open links in new window depending on the LINKS_IN_NEW_TAB setting #}
{% macro link_target(link) -%} {% macro get_target(link) -%}
{% if LINKS_IN_NEW_TAB not in ('no', 'none', false, 0, 'external') or (LINKS_IN_NEW_TAB == "external" and not link.startswith("/") and not link.startswith(SITEURL)) %} {% if LINKS_IN_NEW_TAB not in ('no', 'none', false, 0, 'external') or (LINKS_IN_NEW_TAB == "external" and not link.startswith("/") and not link.startswith(SITEURL)) %}
target="_blank" target="_blank"
{% endif %} {% endif %}
@ -119,12 +119,12 @@
{%- endif %} {%- endif %}
{% if DISPLAY_PAGES_ON_MENU %} {% if DISPLAY_PAGES_ON_MENU %}
{% for page in pages %} {% for page in pages %}
<li><a {{ link_target(SITEURL) }} href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li> <li><a {{ get_target(SITEURL) }} href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></li>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% for name, link in LINKS %} {% for name, link in LINKS %}
<li><a {{ link_target(link) }} href="{{ link }}" >{{ name }}</a></li> <li><a {{ get_target(link) }} href="{{ link }}" >{{ name }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
</nav> </nav>