mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-16 12:06:21 +01:00
BS5 Theme
This commit is contained in:
7
allianceauth/menu/templates/menu/menu-block.html
Normal file
7
allianceauth/menu/templates/menu/menu-block.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% for data in menu_items %}
|
||||
{% if data.items|length > 0 %}
|
||||
{% include "menu/menu-item-bs5.html" with item=data %}
|
||||
{% else %}
|
||||
{{ data.render }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
32
allianceauth/menu/templates/menu/menu-item-bs5.html
Normal file
32
allianceauth/menu/templates/menu/menu-item-bs5.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% load i18n %}
|
||||
{% load navactive %}
|
||||
{% if not item.hide %}
|
||||
<li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
|
||||
<i class="nav-link {{ item.classes }} fa-fw align-self-center me-3 {% if item.navactive %}{% navactive request item.navactive|join:' ' %}{% endif %}" {% if item.items|length %} type="button" data-bs-toggle="collapse" data-bs-target="#id-{{ item.text|slugify }}" aria-expanded="false" aria-controls="" {% endif %}></i>
|
||||
<a class="nav-link flex-fill align-self-center" {% if item.items|length %} type="button" data-bs-toggle="collapse" data-bs-target="#id-{{ item.text|slugify }}" aria-expanded="false" aria-controls="" {% endif %}
|
||||
href="{% if item.url_name %}{% url item.url_name %}{% else %}{{ item.url }}{% endif %}">
|
||||
{% translate item.text %}
|
||||
</a>
|
||||
{% if item.count >= 1 %}
|
||||
<span class="badge bg-primary rounded-pill m-2 align-self-center {% if item.items|length == 0 %}me-4{% endif %}">
|
||||
{{ item.count }}
|
||||
</span>
|
||||
{% elif item.url %}
|
||||
<span class="pill m-2 me-4 align-self-center fas fa-external-link-alt"></span>
|
||||
{% endif %}
|
||||
{% if item.items|length > 0 %}
|
||||
<span class="pill m-2 me-4 align-self-center fas fa-solid fa-chevron-down"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#id-{{ item.text|slugify }}"
|
||||
aria-expanded="false"
|
||||
aria-controls=""></span>
|
||||
<!--<hr class="m-0 w-100">-->
|
||||
<ul class="collapse ps-1 w-100 border-start rounded-start border-light border-3" id="id-{{ item.text|slugify }}">
|
||||
{% for sub_item in item.items %}
|
||||
{{ sub_item.render }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% load i18n %}
|
||||
{% load navactive %}
|
||||
{% load auth_notifications %}
|
||||
<li class="nav-item {% navactive request 'notifications:' %}"
|
||||
id="menu_item_notifications">
|
||||
<a class="nav-link"
|
||||
href="{% url 'notifications:list' %}">
|
||||
<span class="fa">
|
||||
{% with unread_count=request.user|user_unread_notification_count %}
|
||||
<i
|
||||
class="fas fa-bell{% if unread_count %} text-danger{% endif %}"
|
||||
></i>
|
||||
{% endwith %}
|
||||
</span>
|
||||
<span class="d-lg-none d-md-inline m-2">
|
||||
{% translate "Notifications" %}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
51
allianceauth/menu/templates/menu/menu-user.html
Normal file
51
allianceauth/menu/templates/menu/menu-user.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{% 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">
|
||||
|
||||
{% if request.user.profile.main_character %}
|
||||
{% with request.user.profile.main_character as main %}
|
||||
<div class="p-2 position-relative m-2">
|
||||
<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 }}"/>
|
||||
{% if main.alliance_id %}
|
||||
<img class="rounded-circle position-absolute bottom-0 end-0" src="{{ main.alliance_logo_url_32 }}" alt="{{ main.alliance_name }}"/>
|
||||
{% elif main.faction_id %}
|
||||
<img class="rounded-circle position-absolute bottom-0 end-0" src="{{ main.faction_logo_url_32 }}" alt="{{ main.faction_name }}"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h5>{{ main.character_name }}</h5>
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<img class="rounded-circle m-2" src="{{ 1|character_portrait_url:32 }}" alt="{% translate 'No Main Character!' %}"/>
|
||||
<h5>{% translate "No Main Character!" %}</h5>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
{% theme_select %}
|
||||
{% endif %}
|
||||
<div class="btn-group m-2">
|
||||
<button type="button" class="btn btn-secondary p-1">
|
||||
{% include "public/lang_select.html" %}
|
||||
</button>
|
||||
{% if user.is_superuser %}
|
||||
<a role="button" class="btn btn btn-secondary d-flex"
|
||||
href="{% url 'admin:index' %}"
|
||||
bs-data-toggle="button">
|
||||
<span class="align-self-center">{% translate "Admin" %}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="btn-group m-2">
|
||||
<a role="button" class="btn btn-info" href="{% url 'authentication:token_management' %}" alt="Token Management"><i class="fa-solid fa-user-lock fa-fw"></i></a>
|
||||
{% if user.is_superuser %}
|
||||
<a role="button" class="btn btn-info" href="https://allianceauth.readthedocs.io/" alt="Alliance Auth Documentation"><i class="fa-solid fa-book fa-fw"></i></a>
|
||||
<a role="button" class="btn btn-info" href="https://discord.gg/fjnHAmk" alt="Alliance Auth Discord"><i class="fa-brands fa-discord fa-fw"></i></a>
|
||||
<a role="button" class="btn btn-info" href="https://gitlab.com/allianceauth/allianceauth" alt="Alliance Auth Git"><i class="fa-brands fa-gitlab fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a role="button" class="btn btn-danger" href="{% url 'logout' %}" alt="{% translate 'Sign Out' %}"><i class="fa-solid fa-right-from-bracket fa-fw"></i></a>
|
||||
{% else %}
|
||||
<a role="button" class="btn btn-success" href="{% url 'authentication:login' %}" alt="{% translate 'Sign In' %}"> <i class="fa-solid fa-right-to-bracket fa-fw"></i></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
21
allianceauth/menu/templates/menu/sortable-side-menu.html
Normal file
21
allianceauth/menu/templates/menu/sortable-side-menu.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% load i18n %}
|
||||
{% load navactive %}
|
||||
{% load menu_items %}
|
||||
<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 auth-logo" >
|
||||
<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">
|
||||
<i class="nav-link fas fa-tachometer-alt fa-fw align-self-center me-3 {% navactive request 'authentication:dashboard' %}"></i>
|
||||
<a class="nav-link flex-fill align-self-center" href="{% url 'authentication:dashboard' %}">
|
||||
{% translate "Dashboard" %}
|
||||
</a>
|
||||
</li>
|
||||
{% sorted_menu_items %}
|
||||
</ul>
|
||||
{% include 'menu/menu-user.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user