implement header links

This commit is contained in:
ghost 2024-01-13 02:00:09 +02:00
parent 7caf84a9f9
commit 13292efe29
5 changed files with 26 additions and 22 deletions

View file

@ -18,15 +18,25 @@
{% block header_container %}
<header>
{% block header_content %}
<a href="{{ path('main_index') }}">
<svg version="1.1" width="20" height="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 364.707 364.707" enable-background="new 0 0 364.707 364.707" xml:space="preserve">
<path fill="currentColor" d="M223.864,272.729l-38.608-97.848l-56.603,89.184H93.166l79.052-127.654l-8.875-25.229h-30.781V81.12h52.691l60.521,153.899l26.608-8.668l8.867,29.813L223.864,272.729z"/>
<path fill="none" stroke="currentColor" stroke-width="34" d="M337.623,182.198c0,85.579-69.363,154.934-154.934,154.934c-85.571,0-154.936-69.354-154.936-154.934c0-85.569,69.363-154.933,154.936-154.933C268.259,27.265,337.623,96.629,337.623,182.198z"/>
</svg>
</a>
<h1 class="text-align-right padding-right-36-px">
{{ app.name }}
</h1>
<div class="float-left">
{% if 'main_index' == request.get('_route') %}
{{ 'Home' | trans }}
{% else %}
<a href="{{ path('main_index') }}">{{ 'Home' | trans }}</a>
{% endif %}
{% for link in app.links | split(',') %}
{% set a = link | split('|') %}
{% if a.0 is defined and a.1 is defined %}
&bull;
<a href="{{ a.1 }}" target="_blank">{{ a.0 }}</a>
{% endif %}
{% endfor %}
</div>
<div class="float-right">
<strong>
{{ app.name }}
</strong>
</div>
{% endblock %}
</header>
{% endblock %}