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:
2020-05-27 04:24:58 +02:00
parent 6ded711dd5
commit 06f67f4f32
25 changed files with 7075 additions and 342 deletions

View 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>