php-basics/.phpdoc/template/components/topnav.html.twig

31 lines
1.0 KiB
Twig
Raw Normal View History

2024-02-05 15:45:33 +01: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>