91 lines
4.1 KiB
HTML
91 lines
4.1 KiB
HTML
{% set image = resize_image(path="images/background/nav_background.jpg", height=750, op="fit_height") %}
|
|
<div
|
|
class="d-flex align-content-end flex-wrap"
|
|
style="
|
|
background-image: url('{{ image.url }}');
|
|
background-position: center;
|
|
height: 40vh;
|
|
background-size: cover;
|
|
"
|
|
>
|
|
<div class="container-fluid mb-3" style="background-color: rgba(0, 0, 0, 0.6);">
|
|
<div class="container-xxl text-white p-3">
|
|
<h1 style="font-weight: bold;">{{ config.title }}</h1>
|
|
<h5>{{ config.extra.address }}</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<nav class="navbar navbar-expand-lg" style="background-image: linear-gradient(rgba(0, 0, 0, 0.6), 8%, {{ config.extra.primary_color }}, white);">
|
|
<div class="container-xxl">
|
|
<a class="navbar-brand grow-on-hover" href="/">
|
|
<!-- Use heigher resize_height for better resolution -->
|
|
{% set resize_height = 85 %}
|
|
{% set logo_meta = get_image_metadata(path=config.extra.logo_path) %}
|
|
{% set logo_width_to_height_ratio = logo_meta.width / logo_meta.height %}
|
|
{% set resize_width = logo_width_to_height_ratio * resize_height | int %}
|
|
{% set image = resize_image(path=config.extra.logo_path, width=resize_width, height=resize_height, op="fill") %}
|
|
<img
|
|
src="{{ image.url }}"
|
|
alt="Startseite"
|
|
{% set actual_height = 70 %}
|
|
{% set actual_width = logo_width_to_height_ratio * actual_height | int %}
|
|
width="{{ actual_width }}"
|
|
height="{{ actual_height }}"
|
|
/>
|
|
</a>
|
|
|
|
<button
|
|
class="navbar-toggler"
|
|
type="button"
|
|
data-bs-toggle="collapse"
|
|
data-bs-target="#navbarNav"
|
|
aria-controls="navbarNav"
|
|
aria-expanded="false"
|
|
aria-label="Toggle navigation"
|
|
>
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav">
|
|
{% for menu_item in config.extra.menu_items %}
|
|
{% if menu_item.url %}
|
|
<!-- Single item, not a category -->
|
|
<li class="nav-item">
|
|
<a
|
|
class="nav-link"
|
|
href="{{ menu_item.url }}"
|
|
>
|
|
<span class="underline-on-hover" style="color: {{ config.extra.secondary_color }}; font-size: 17px;">
|
|
{{ menu_item.name }}
|
|
</span>
|
|
</a>
|
|
</li>
|
|
{% else %}
|
|
<!-- Category with multiple subitems -->
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<font color="{{ config.extra.secondary_color }}">
|
|
{{ menu_item.name }}
|
|
</font>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
{% for link in menu_item.links %}
|
|
<li>
|
|
<a
|
|
class="dropdown-item"
|
|
href="{{ link.url }}"
|
|
>
|
|
<font color="{{ config.extra.secondary_color }}">
|
|
{{ link.name }}
|
|
</font>
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|