{#
macros/navigation.html - Navigation component macros for APEP.
Import with: {% from "apep/macros/navigation.html" import header_banner, nav, footer_nav, lang_switch %}
Macros:
header_banner(company_name, subtitle, url)
nav(items, variant, flying, top_offset)
footer_nav(links, variant)
lang_switch(current_lang, langs)
CSS dependency: nav.css, footer-nav.css, lang-switch.css (loaded via ApepLoader)
Author: sora7672
#}
{% from "apep/macros/helper.html" import alert %}
{#
Renders a site header banner with a company name and optional subtitle.
When url is provided the entire banner becomes a clickable anchor.
@param company_name {string} - company or site name displayed as the main text
@param subtitle {string} - small muted text below the name. Optional.
@param url {string} - when set, wraps the banner in an tag. Optional.
#}
{% macro header_banner(company_name, subtitle=None, url=None) %}
{% if not company_name %}
{{ alert("header_banner: company_name is required", "Pass a non-empty string as the first argument.") }}
{% else %}
{% if url %}