Done base
This commit is contained in:
parent
561c595e4e
commit
17b2305a3d
4 changed files with 37 additions and 88 deletions
|
@ -33,10 +33,10 @@ email = "yinghong-yang@protonmail.com"
|
||||||
name = "Startseite"
|
name = "Startseite"
|
||||||
url = "/"
|
url = "/"
|
||||||
[[extra.menu_items]]
|
[[extra.menu_items]]
|
||||||
name = "Unser Angebot"
|
name = "Angebot"
|
||||||
url = "/angebot"
|
url = "/angebot"
|
||||||
[[extra.menu_items]]
|
[[extra.menu_items]]
|
||||||
name = "Terminvereinbarung"
|
name = "Termin"
|
||||||
url = "/termin"
|
url = "/termin"
|
||||||
|
|
||||||
# Footer
|
# Footer
|
||||||
|
|
|
@ -28,28 +28,47 @@
|
||||||
|
|
||||||
{% block styles %}{% endblock %}
|
{% block styles %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body class="flex flex-col p-3 mx-auto max-w-screen-lg min-h-screen text-lg">
|
<body class="flex flex-col mx-auto min-h-screen text-lg">
|
||||||
<header class="flex gap-x-2 items-center px-5 mb-3 text-base font-light bg-gray-100 rounded-full sm:gap-x-4">
|
<header class="flex flex-col">
|
||||||
<a class="p-0.5 transition duration-500 hover:scale-110"
|
{% set image = resize_image(path="images/background/nav_background.jpg", height=750, op="fit_height") %}
|
||||||
href="{{ get_url(path='/') | safe }}">
|
<div class="flex content-end flex-wrap"
|
||||||
<img class="object-contain w-14 h-14 rounded"
|
style="background-image: url('{{ image.url }}');
|
||||||
src="{{ get_url(path='images/logo.svg') | safe }}" />
|
background-position: center;
|
||||||
</a>
|
height: 40vh;
|
||||||
|
background-size: cover">
|
||||||
|
<div class="w-full mb-3" style="background-color: rgba(0, 0, 0, 0.6)">
|
||||||
|
<div class="text-white py-2 px-4 mx-auto max-w-screen-2xl">
|
||||||
|
<h1>{{ config.title }}</h1>
|
||||||
|
<h5>{{ config.extra.address }}</h5>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<nav class="flex gap-x-2 items-center sm:gap-x-4">
|
<div class="w-full pt-3"
|
||||||
{% for menu_item in config.extra.menu_items %}
|
style="background-image: linear-gradient({{ config.extra.primary_color }}, 15%, white)">
|
||||||
<a class="p-1 no-underline transition duration-500 hover:scale-105"
|
<div class="flex gap-x-2 items-center px-3 mb-3 sm:gap-x-4 max-w-screen-2xl mx-auto">
|
||||||
href="{{ menu_item.url | safe }}">{{ menu_item.name }}</a>
|
<a class="p-0.5 transition duration-500 hover:scale-110"
|
||||||
{% endfor %}
|
href="{{ get_url(path='/') | safe }}">
|
||||||
</nav>
|
<img class="object-contain w-16 h-16 rounded"
|
||||||
|
src="{{ get_url(path='images/logo.svg') | safe }}" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<nav class="flex gap-x-3 items-center sm:gap-x-4">
|
||||||
|
{% for menu_item in config.extra.menu_items %}
|
||||||
|
<a class="no-underline transition duration-150 hover:bg-green-700 hover:text-white outline rounded outline-1 outline-green-700 text-green-700 px-2 py-1"
|
||||||
|
href="{{ menu_item.url | safe }}">{{ menu_item.name }}</a>
|
||||||
|
{% endfor %}
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="leading-relaxed">
|
<main class="leading-relaxed max-w-screen-2xl mx-auto">
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="pt-6 pb-2 mt-auto">
|
<footer class="pt-6 pb-3 mt-auto sm:mx-2">
|
||||||
<nav class="flex flex-col gap-y-2 justify-around py-2 text-center bg-gray-100 rounded sm:flex-row sm:rounded-full">
|
<nav class="flex flex-col gap-y-3 justify-around py-3 text-center bg-gray-200 sm:flex-row sm:rounded-full">
|
||||||
{% for footer_item in config.extra.footer_items %}
|
{% for footer_item in config.extra.footer_items %}
|
||||||
<a class="text-sm no-underline" href="{{ footer_item.url | safe }}">{{ footer_item.name }}</a>
|
<a class="text-sm no-underline" href="{{ footer_item.url | safe }}">{{ footer_item.name }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
<div class="container-xxl">
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
{% for footer_item in config.extra.footer_items %}
|
|
||||||
<div class="col-sm p-1">
|
|
||||||
<a href="{{ footer_item.url }}" style="text-decoration: none;">
|
|
||||||
<span class="underline-on-hover"
|
|
||||||
style="color: {{ config.extra.secondary_color }}">{{ footer_item.name }}</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
</div>
|
|
|
@ -1,54 +0,0 @@
|
||||||
{% 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 pb-2 pt-2 ps-4 pe-4">
|
|
||||||
<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({{ config.extra.primary_color }}, 25%, white)">
|
|
||||||
<div class="container-xxl">
|
|
||||||
<a class="navbar-brand grow-on-hover"
|
|
||||||
href="{{ get_url(path='/') | safe }}">
|
|
||||||
<!-- 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 }}"
|
|
||||||
{% 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 %}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{{ menu_item.url }}">
|
|
||||||
<button class="btn btn-outline-success" type="button">{{ menu_item.name }}</button>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
Loading…
Reference in a new issue