feat: add footer, header and improve layout

This commit is contained in:
Konstantin 2024-03-01 11:55:17 +01:00
parent 72bf6bffb8
commit 6fd74833a3
17 changed files with 305 additions and 30 deletions

View file

@ -0,0 +1,24 @@
{% load navigation_tags %}
<footer>
<p>Built with Wagtail</p>
{% with linkedin_url=settings.base.NavigationSettings.linkedin_url github_url=settings.base.NavigationSettings.github_url mastodon_url=settings.base.NavigationSettings.mastodon_url %}
{% if linkedin_url or github_url or mastodon_url %}
<p>
Follow me on:
{% if github_url %}
<a href="{{ github_url }}">GitHub</a>
{% endif %}
{% if linkedin_url %}
<a href="{{ linkedin_url }}">Twitter</a>
{% endif %}
{% if mastodon_url %}
<a href="{{ mastodon_url }}">Mastodon</a>
{% endif %}
</p>
{% endif %}
{% endwith %}
{% get_footer_text %}
</footer>

View file

@ -0,0 +1,16 @@
{% load wagtailcore_tags navigation_tags wagtailuserbar %}
<header>
{# Add this: #}
<a href="#main" class="skip-link">Skip to content</a>
{% get_site_root as site_root %}
<nav>
<p>
<a href="{% pageurl site_root %}">{{ site_root.title }}</a> |
{% for menuitem in site_root.get_children.live.in_menu %}
<a href="{% pageurl menuitem %}">{{ menuitem.title }}</a>{% if not forloop.last %} | {% endif %}
{% endfor %}
</p>
</nav>
{% wagtailuserbar "top-right" %}
</header>