1
0
Fork 0
yinghong-massage.de/templates/partials/nav.tera.html

54 lines
2.4 KiB
HTML
Raw Normal View History

2022-10-24 23:11:48 +00:00
{% set image = resize_image(path="images/background/nav_background.jpg", height=750, op="fit_height") %}
2022-11-06 19:54:49 +00:00
<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)">
2022-10-29 09:57:43 +00:00
<div class="container-xxl text-white pb-2 pt-2 ps-4 pe-4">
2022-10-24 23:11:48 +00:00
<h1 style="font-weight: bold;">{{ config.title }}</h1>
<h5>{{ config.extra.address }}</h5>
</div>
</div>
</div>
2022-11-06 19:54:49 +00:00
<nav class="navbar navbar-expand-lg"
style="background-image: linear-gradient({{ config.extra.primary_color }}, 25%, white)">
2022-10-24 14:35:18 +00:00
<div class="container-xxl">
2022-10-24 23:11:48 +00:00
<a class="navbar-brand grow-on-hover" href="/">
2022-10-24 14:35:18 +00:00
<!-- 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") %}
2022-11-06 19:54:49 +00:00
<img src="{{ image.url }}"
{% set actual_height = 70 %}
{% set actual_width = logo_width_to_height_ratio * actual_height | int %}
width="{{ actual_width }}"
height="{{ actual_height }}"/>
2022-10-24 14:35:18 +00:00
</a>
2022-11-06 19:54:49 +00:00
<button class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation">
2022-10-24 14:35:18 +00:00
<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 %}
2022-10-29 19:14:35 +00:00
<li class="nav-item">
2022-11-06 19:54:49 +00:00
<a class="nav-link" href="{{ menu_item.url }}">
<button class="btn btn-outline-success" type="button">{{ menu_item.name }}</button>
2022-10-29 19:14:35 +00:00
</a>
</li>
2022-10-24 14:35:18 +00:00
{% endfor %}
</ul>
</div>
</div>
</nav>