better large screen handling

This commit is contained in:
Patrick Jentsch 2024-04-30 16:21:23 +02:00
parent 543276d766
commit 43b38b2216
3 changed files with 13 additions and 10 deletions

View File

@ -14,19 +14,16 @@
{# right items #} {# right items #}
{# shown on large devices #} {# shown on large devices #}
<!--
<ul class="right hide-on-med-and-down" style="height: 100%;"> <ul class="right hide-on-med-and-down" style="height: 100%;">
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
{# avatar, username and email #} {# avatar, username and email #}
{# shown for authenticated users #} {# shown for authenticated users #}
{# <li style="height: 100%;"> <li style="height: 100%;">
<a href="#!" class="dropdown-trigger no-autoinit" data-target="nav-more-dropdown" id="nav-more-dropdown-trigger" style="height: 100%;"> <a href="#!" class="dropdown-trigger no-autoinit" data-target="nav-more-dropdown" id="nav-more-dropdown-trigger" style="height: 100%;">
<img src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt="" class="left circle py-3 mr-1" style="height: 100%;"> <img src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt="" class="left circle py-3 mr-1" style="height: 100%;">
{{ current_user.username }} ({{ current_user.email }}) {{ current_user.username }} ({{ current_user.email }})
</a> </a>
</li> #} </li>
<li {% if request.path == url_for('settings.settings') %}class="active"{% endif %}><a href="{{ url_for('settings.settings') }}"><i class="material-icons left">settings</i>Settings</a></li>
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons left">logout</i>Log out</a></li>
{% else %} {% else %}
{# log in and register items #} {# log in and register items #}
{# shown for unauthenticated users on all devices #} {# shown for unauthenticated users on all devices #}
@ -34,15 +31,14 @@
<li {% if request.path == url_for('auth.register') %}class="active"{% endif %}><a href="{{ url_for('auth.register') }}"><i class="material-icons left">assignment</i>Register</a></li> <li {% if request.path == url_for('auth.register') %}class="active"{% endif %}><a href="{{ url_for('auth.register') }}"><i class="material-icons left">assignment</i>Register</a></li>
{% endif %} {% endif %}
</ul> </ul>
-->
</div> </div>
</nav> </nav>
</div> </div>
{# {% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<ul class="dropdown-content" id="nav-more-dropdown"> <ul class="dropdown-content" id="nav-more-dropdown">
<li><a href="{{ url_for('settings.settings') }}"><i class="material-icons left">settings</i>Settings</a></li> <li><a href="{{ url_for('settings.settings') }}"><i class="material-icons left">settings</i>Settings</a></li>
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons left">logout</i>Log out</a></li> <li><a href="{{ url_for('auth.logout') }}"><i class="material-icons left">logout</i>Log out</a></li>
</ul> </ul>
{% endif %} #} {% endif %}

View File

@ -1,6 +1,7 @@
<ul class="sidenav sidenav-fixed" id="sidenav"> <ul class="sidenav sidenav-fixed" id="sidenav">
{# user view #} {# user view #}
<li> {# shown for small/medium devices #}
<li class="hide-on-large-only">
<div class="user-view"> <div class="user-view">
<div class="background primary-color"></div> <div class="background primary-color"></div>
<a><img class="circle" src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt=""></a> <a><img class="circle" src="{{ url_for('users.user_avatar', user_id=current_user.id) }}" alt=""></a>
@ -9,6 +10,11 @@
</div> </div>
</li> </li>
{# fake-navbar #}
{# shown for large devices #}
<li class="primary-color z-depth-1 hide-on-med-and-down" style="height: 64px;">
</li>
{# general items #} {# general items #}
{# {% if current_user.can('USE_API') %} {# {% if current_user.can('USE_API') %}
<li> <li>

View File

@ -9,8 +9,9 @@ services:
- "./app:/home/nopaque/app" - "./app:/home/nopaque/app"
- "./boot.sh:/home/nopaque/boot.sh" - "./boot.sh:/home/nopaque/boot.sh"
- "./config.py:/home/nopaque/config.py" - "./config.py:/home/nopaque/config.py"
- "./docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh" - "./docker-nopaque-entrypoint.sh:/usr/local/bin/docker-nopaque-entrypoint.sh"
- "./migrations:/home/nopaque/migrations" - "./migrations:/home/nopaque/migrations"
- "./requirements.freezed.txt:/home/nopaque/requirements.freezed.txt"
- "./requirements.txt:/home/nopaque/requirements.txt" - "./requirements.txt:/home/nopaque/requirements.txt"
- "./tests:/home/nopaque/tests" - "./tests:/home/nopaque/tests"
- "./wsgi.py:/home/nopaque/wsgi.py" - "./wsgi.py:/home/nopaque/wsgi.py"