From 47729c71a9d7ff12ee16d66a23e5b38ccf865215 Mon Sep 17 00:00:00 2001
From: Rushil Umaretiya <rushilwiz@gmail.com>
Date: Wed, 21 Sep 2022 00:14:52 -0400
Subject: [PATCH] feat: fixed dark mode

---
 hunt/apps/main/views.py        |  4 +---
 hunt/manage.py                 | 22 ----------------------
 hunt/templates/main/index.html |  3 +++
 3 files changed, 4 insertions(+), 25 deletions(-)
 delete mode 100755 hunt/manage.py

diff --git a/hunt/apps/main/views.py b/hunt/apps/main/views.py
index 1fced73..c28f10c 100644
--- a/hunt/apps/main/views.py
+++ b/hunt/apps/main/views.py
@@ -34,9 +34,7 @@ def index(request):
                     challenges_dict[c.id] = [c, "available"]
             categories_dict[category.id] = [category, challenges_dict]
         
-        logger.debug(f"user is {request.user.username} with mode {request.user.dark_mode}")
-        
-        return render(request, "main/index.html", context={"categories": categories_dict,"data": data, dark_mode: request.user.dark_mode})
+        return render(request, "main/index.html", context={"categories": categories_dict,"data": data, "dark_mode": request.user.dark_mode})
     else:
         return redirect(reverse("main:overview"))
 
diff --git a/hunt/manage.py b/hunt/manage.py
deleted file mode 100755
index 563e834..0000000
--- a/hunt/manage.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python
-"""Django's command-line utility for administrative tasks."""
-import os
-import sys
-
-
-def main():
-    """Run administrative tasks."""
-    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hunt.settings')
-    try:
-        from django.core.management import execute_from_command_line
-    except ImportError as exc:
-        raise ImportError(
-            "Couldn't import Django. Are you sure it's installed and "
-            "available on your PYTHONPATH environment variable? Did you "
-            "forget to activate a virtual environment?"
-        ) from exc
-    execute_from_command_line(sys.argv)
-
-
-if __name__ == '__main__':
-    main()
diff --git a/hunt/templates/main/index.html b/hunt/templates/main/index.html
index ac41f13..9a1841a 100644
--- a/hunt/templates/main/index.html
+++ b/hunt/templates/main/index.html
@@ -65,6 +65,7 @@
     
     
     {% if dark_mode %}
+    <style>
         body {
             background: #1B2430
         }
@@ -88,10 +89,12 @@
         h1 {
             color: lightgray
         }
+    </style>
     {% endif %}
 {% endblock %}
 
 {% block main %}
+
     <div id="hoco-scores">
         <div class="score-box">
             <div class="class">{{ data.0.0 }}</div>