mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Very initial work at togglable darktheme.
Dammit @alexdaniel654 just when I had my scope creep kinda under control. It'll be v. nice to have though...!
This commit is contained in:
31
users/templates/partials/navbar_user.html
Normal file
31
users/templates/partials/navbar_user.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<li class="nav-item dropdown" id="user">
|
||||
{% if user.is_authenticated %}
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Hi {{ user.first_name }}
|
||||
</a>
|
||||
<ul class="dropdown-menu p-3" id="userdropdown">
|
||||
<li class="media">
|
||||
<a href="{% url 'profile_detail' %}">
|
||||
<img src="{{ request.user.profile_picture }}" class="media-object"/>
|
||||
<div class="media-body">
|
||||
<b>{{ request.user.first_name }} {{ request.user.last_name }}</b>
|
||||
<p class="muted">{{ request.user.email }}</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="darkSwitch" />
|
||||
<label class="custom-control-label" for="darkSwitch">Dark Mode</label>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'logout' %}" class="btn btn-primary align"><i class="fas fa-sign-out-alt"></i> Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="nav-link" href="{% url 'login' %}">
|
||||
Login
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
Reference in New Issue
Block a user