Handle navbar alignment thank to Bulma helper classes

This commit is contained in:
Joachim 2021-12-17 17:30:14 +01:00
parent f300104c4d
commit ce0e2eb61a

View file

@ -36,7 +36,7 @@
<a class="navbar-item" href="/"> <a class="navbar-item" href="/">
<img class="image logo" src="{% if site.logo_small %}{% get_media_prefix %}{{ site.logo_small }}{% else %}{% static "images/logo-small.png" %}{% endif %}" alt="{% blocktrans with site_name=site.name %}{{ site_name }} home page{% endblocktrans %}"> <img class="image logo" src="{% if site.logo_small %}{% get_media_prefix %}{{ site.logo_small }}{% else %}{% static "images/logo-small.png" %}{% endif %}" alt="{% blocktrans with site_name=site.name %}{{ site_name }} home page{% endblocktrans %}">
</a> </a>
<form class="navbar-item column" action="{% url 'search' %}"> <form class="navbar-item column is-align-items-start pt-5" action="{% url 'search' %}">
<div class="field has-addons"> <div class="field has-addons">
<div class="control"> <div class="control">
{% if user.is_authenticated %} {% if user.is_authenticated %}
@ -56,25 +56,22 @@
</div> </div>
</form> </form>
<div role="button" tabindex="0" class="navbar-burger pulldown-menu" data-controls="main_nav" aria-expanded="false"> <button type="button" tabindex="0" class="navbar-burger pulldown-menu my-4" data-controls="main_nav" aria-expanded="false">
<div class="navbar-item mt-3"> <i class="icon icon-dots-three-vertical" aria-hidden="true"></i>
<div class="icon icon-dots-three-vertical" title="{% trans 'Main navigation menu' %}">
<span class="is-sr-only">{% trans "Main navigation menu" %}</span> <span class="is-sr-only">{% trans "Main navigation menu" %}</span>
</div> </button>
</div>
</div>
</div> </div>
<div class="navbar-menu" id="main_nav"> <div class="navbar-menu" id="main_nav">
<div class="navbar-start"> <div class="navbar-start">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<a href="/#feed" class="navbar-item"> <a href="/#feed" class="navbar-item mt-3 py-0">
{% trans "Feed" %} {% trans "Feed" %}
</a> </a>
<a href="{% url 'lists' %}" class="navbar-item"> <a href="{% url 'lists' %}" class="navbar-item mt-3 py-0">
{% trans "Lists" %} {% trans "Lists" %}
</a> </a>
<a href="{% url 'discover' %}" class="navbar-item"> <a href="{% url 'discover' %}" class="navbar-item mt-3 py-0">
{% trans "Discover" %} {% trans "Discover" %}
</a> </a>
{% endif %} {% endif %}
@ -82,7 +79,7 @@
<div class="navbar-end"> <div class="navbar-end">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-item mt-3 py-0 has-dropdown is-hoverable">
<a <a
href="{{ request.user.local_path }}" href="{{ request.user.local_path }}"
class="navbar-link pulldown-menu" class="navbar-link pulldown-menu"
@ -141,7 +138,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="navbar-item"> <div class="navbar-item mt-3 py-0">
<a href="{% url 'notifications' %}" class="tags has-addons"> <a href="{% url 'notifications' %}" class="tags has-addons">
<span class="tag is-medium"> <span class="tag is-medium">
<span class="icon icon-bell" title="{% trans 'Notifications' %}"> <span class="icon icon-bell" title="{% trans 'Notifications' %}">
@ -159,7 +156,7 @@
</a> </a>
</div> </div>
{% else %} {% else %}
<div class="navbar-item"> <div class="navbar-item pt-5 pb-0">
{% if request.path != '/login' and request.path != '/login/' %} {% if request.path != '/login' and request.path != '/login/' %}
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">