mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-16 07:50:16 +02:00
[CHANGE] Auth menu for public pages
This commit is contained in:
parent
dd3ef41396
commit
f8fbbb5ba7
@ -1,5 +1,5 @@
|
||||
{% load static %}
|
||||
|
||||
<div class="align-items-center text-center">
|
||||
<img src="{% static 'allianceauth/images/auth-logo.svg' %}" width="128px" height="128px" alt="{{ SITE_NAME }}">
|
||||
{% include "bundles/image-auth-logo.html" %}
|
||||
</div>
|
||||
|
@ -1,10 +1,12 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% load evelinks %}
|
||||
{% load theme_tags %}
|
||||
|
||||
<div style="z-index:5;" class="w100 d-flex flex-column justify-content-center align-items-center text-center pb-2 border-top border-secondary">
|
||||
<div style="z-index:5;" class="w100 d-flex flex-column justify-content-center align-items-center text-center pb-2 border-top border-secondary {% if not user.is_authenticated %}position-absolute bottom-0 w-100{% endif %}">
|
||||
<div class="d-flex mb-0 w-100 bg-dark text-light">
|
||||
<div class="p-2 position-relative m-2">
|
||||
{% if user.is_authenticated %}
|
||||
{% with request.user.profile.main_character as main %}
|
||||
<img class="rounded-circle" src="{{ main.character_id|character_portrait_url:64 }}" alt="{{ main.character_name }}">
|
||||
<img class="rounded-circle position-absolute bottom-0 start-0" src="{{ main.corporation_logo_url_32 }}" alt="{{ main.corporation_name }}">
|
||||
@ -14,8 +16,12 @@
|
||||
<img class="rounded-circle position-absolute bottom-0 end-0" src="{{ main.faction_logo_url_32 }}" alt="{{ main.faction_name }}">
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% include "bundles/image-auth-logo.html" with logo_width="64px" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="align-self-center text-start">
|
||||
{% if user.is_authenticated %}
|
||||
{% with request.user.profile.main_character as main %}
|
||||
<h5 class="m-0">{{ main.character_name }}</h5>
|
||||
<p class="m-0 small">{{ main.corporation_name }}</p>
|
||||
@ -25,6 +31,9 @@
|
||||
<p class="m-0 small">{{ main.faction_name }}</p>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<h5 class="m-0">{{ SITE_NAME }}</h5>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ms-auto dropup">
|
||||
<button type="button" class="h-100 btn" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div class="col-auto px-0">
|
||||
<div class="collapse collapse-horizontal" tabindex="-1" id="sidebar">
|
||||
<div style="width: 350px;">
|
||||
<div class="nav-padding navbar-dark bg-dark text-light px-0 d-flex flex-column overflow-hidden vh-100">
|
||||
<div class="nav-padding navbar-dark bg-dark text-light px-0 d-flex flex-column overflow-hidden vh-100 {% if not user.is_authenticated %}position-relative{% endif %}">
|
||||
{% if user.is_authenticated %}
|
||||
<ul style="z-index:5;" id="sidebar-menu" class="navbar-nav flex-column mb-auto overflow-auto pt-2">
|
||||
<li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
|
||||
@ -17,8 +17,10 @@
|
||||
|
||||
{% sorted_menu_items %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% include 'menu/menu-logo.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'menu/menu-user.html' %}
|
||||
</div>
|
||||
</div>
|
||||
|
3
allianceauth/templates/bundles/image-auth-logo.html
Normal file
3
allianceauth/templates/bundles/image-auth-logo.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% load static %}
|
||||
|
||||
<img src="{% static 'allianceauth/images/auth-logo.svg' %}" width="{{ logo_width|default:"128px" }}" height="{% if logo_height %}{{ logo_ }}{% else %}{{ logo_width|default:"128px" }}{% endif %}" alt="{{ SITE_NAME }}">
|
Loading…
x
Reference in New Issue
Block a user