psr-15/.phpdoc/template/components/topnav.html.twig

31 lines
1.0 KiB
Twig
Raw Permalink Normal View History

2024-07-11 17:52:26 +02:00
{%
set topMenu = {
"menu": [
{ "iconClass": "fab fa-php", "url": "https://packagist.org/packages/opencultureconsulting/basics"},
{ "iconClass": "fab fa-github", "url": "https://github.com/opencultureconsulting/php-basics"}
]
}
%}
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
{% for key,menu in topMenu|default([]) %}
{% for menuitem in menu %}
<li class="phpdocumentor-topnav__menu-item -{{ key }}">
<a href="{{ menuitem.url }}">
<span>
{% if menuitem.icon %}
<i class="fab fa-{{ menuitem.icon }}">{{ menuitem.icon }}</i>
{% endif %}
{% if menuitem.iconClass %}
<i class="{{ menuitem.iconClass }}"></i>
{% endif %}
{{ menuitem.name }}
</span>
</a>
</li>
{% endfor %}
{% endfor %}
</ul>
</nav>