Loading dark theme if selected on load.

This commit is contained in:
Samuel Clay 2020-06-25 14:57:31 -04:00
parent b7874de600
commit 3bae1582df
2 changed files with 7 additions and 2 deletions

View file

@ -104,6 +104,7 @@ def dashboard(request, **kwargs):
statistics = MStatistics.all()
social_profile = MSocialProfile.get_user(user.pk)
custom_styling = MCustomStyling.get_user(user.pk)
preferences = json.decode(user.profile.preferences)
if not user.is_active:
url = "https://%s%s" % (Site.objects.get_current().domain,
@ -114,6 +115,7 @@ def dashboard(request, **kwargs):
return {
'user_profile' : user.profile,
'preferences' : preferences,
'feed_count' : feed_count,
'custom_styling' : custom_styling,
'account_images' : range(1, 4),

View file

@ -36,9 +36,12 @@
{% endif %}
{% endblock %}
{% block bodyclass %}NB-body-main{% endblock %}
{% block content %}
{% block bodyclass %}
NB-body-main
{% if preferences.theme == "dark" %}NB-dark{% endif %}
{% endblock %}
{% block content %}
<h1 class="NB-splash-heading">NewsBlur</h1>
<h2 class="NB-splash-heading">- The best stories from your friends and favorite blogs, all in one place.</h2>