Skip to content

Commit 827e07f

Browse files
committed
Changed the sun icon svg
1 parent 3a93a83 commit 827e07f

File tree

3 files changed

+38
-9
lines changed

3 files changed

+38
-9
lines changed

tcf_core/context_processors.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@ def history_cookies(request):
4646
def searchbar_context(request):
4747
"""Provide context for the search bar."""
4848
latest_semester = Semester.latest()
49-
recent_semesters = Semester.objects.filter(
50-
number__gte=latest_semester.number - 50 # 50 = 5 years * 10 semesters
51-
).order_by("-number")
49+
# recent_semesters = Semester.objects.filter(
50+
# number__gte=latest_semester.number - 50 # 50 = 5 years * 10 semesters
51+
# ).order_by("-number")
52+
53+
if latest_semester:
54+
recent_semesters = Semester.objects.filter(
55+
number__gte=latest_semester.number - 50 # 50 = 5 years * 10 semesters
56+
).order_by("-number")
57+
else:
58+
recent_semesters = Semester.objects.none()
5259

5360
# Get saved filters from the session (or use defaults)
5461
saved_filters = request.session.get("search_filters", {})

tcf_website/templates/base/navbar.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,21 @@
5050

5151
<!-- Dark Mode Toggle Button -->
5252
<button id="darkModeToggle" class="nav-link" style="top: 10px; right: 10px; z-index: 1000;">
53-
<svg id="sunIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 580" width="1.5em" height="1.5em" fill="currentColor">
54-
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
55-
<path d="M375.7 19.7c-1.5-8-6.9-14.7-14.4-17.8s-16.1-2.2-22.8 2.4L256 61.1 173.5 4.2c-6.7-4.6-15.3-5.5-22.8-2.4s-12.9 9.8-14.4 17.8l-18.1 98.5L19.7 136.3c-8 1.5-14.7 6.9-17.8 14.4s-2.2 16.1 2.4 22.8L61.1 256 4.2 338.5c-4.6 6.7-5.5 15.3-2.4 22.8s9.8 13 17.8 14.4l98.5 18.1 18.1 98.5c1.5 8 6.9 14.7 14.4 17.8s16.1 2.2 22.8-2.4L256 450.9l82.5 56.9c6.7 4.6 15.3 5.5 22.8 2.4s12.9-9.8 14.4-17.8l18.1-98.5 98.5-18.1c8-1.5 14.7-6.9 17.8-14.4s2.2-16.1-2.4-22.8L450.9 256l56.9-82.5c4.6-6.7 5.5-15.3 2.4-22.8s-9.8-12.9-17.8-14.4l-98.5-18.1L375.7 19.7zM269.6 110l65.6-45.2 14.4 78.3c1.8 9.8 9.5 17.5 19.3 19.3l78.3 14.4L402 242.4c-5.7 8.2-5.7 19 0 27.2l45.2 65.6-78.3 14.4c-9.8 1.8-17.5 9.5-19.3 19.3l-14.4 78.3L269.6 402c-8.2-5.7-19-5.7-27.2 0l-65.6 45.2-14.4-78.3c-1.8-9.8-9.5-17.5-19.3-19.3L64.8 335.2 110 269.6c5.7-8.2 5.7-19 0-27.2L64.8 176.8l78.3-14.4c9.8-1.8 17.5-9.5 19.3-19.3l14.4-78.3L242.4 110c8.2 5.7 19 5.7 27.2 0zM256 368a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM192 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/>
56-
</svg>
53+
<!-- <svg id="sunIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 580" width="1.5em" height="1.5em" fill="currentColor"> -->
54+
<!-- !Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. -->
55+
<!-- <path d="M375.7 19.7c-1.5-8-6.9-14.7-14.4-17.8s-16.1-2.2-22.8 2.4L256 61.1 173.5 4.2c-6.7-4.6-15.3-5.5-22.8-2.4s-12.9 9.8-14.4 17.8l-18.1 98.5L19.7 136.3c-8 1.5-14.7 6.9-17.8 14.4s-2.2 16.1 2.4 22.8L61.1 256 4.2 338.5c-4.6 6.7-5.5 15.3-2.4 22.8s9.8 13 17.8 14.4l98.5 18.1 18.1 98.5c1.5 8 6.9 14.7 14.4 17.8s16.1 2.2 22.8-2.4L256 450.9l82.5 56.9c6.7 4.6 15.3 5.5 22.8 2.4s12.9-9.8 14.4-17.8l18.1-98.5 98.5-18.1c8-1.5 14.7-6.9 17.8-14.4s2.2-16.1-2.4-22.8L450.9 256l56.9-82.5c4.6-6.7 5.5-15.3 2.4-22.8s-9.8-12.9-17.8-14.4l-98.5-18.1L375.7 19.7zM269.6 110l65.6-45.2 14.4 78.3c1.8 9.8 9.5 17.5 19.3 19.3l78.3 14.4L402 242.4c-5.7 8.2-5.7 19 0 27.2l45.2 65.6-78.3 14.4c-9.8 1.8-17.5 9.5-19.3 19.3l-14.4 78.3L269.6 402c-8.2-5.7-19-5.7-27.2 0l-65.6 45.2-14.4-78.3c-1.8-9.8-9.5-17.5-19.3-19.3L64.8 335.2 110 269.6c5.7-8.2 5.7-19 0-27.2L64.8 176.8l78.3-14.4c9.8-1.8 17.5-9.5 19.3-19.3l14.4-78.3L242.4 110c8.2 5.7 19 5.7 27.2 0zM256 368a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM192 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/> -->
56+
<!-- </svg> -->
57+
<svg id="sunIcon" viewBox="0 0 24 24" width="1.3em" height="1.3em" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
58+
<circle cx="12" cy="12" r="5"/>
59+
<line x1="12" y1="1" x2="12" y2="3"/>
60+
<line x1="12" y1="21" x2="12" y2="23"/>
61+
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
62+
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
63+
<line x1="1" y1="12" x2="3" y2="12"/>
64+
<line x1="21" y1="12" x2="23" y2="12"/>
65+
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
66+
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
67+
</svg>
5768
<svg id="moonIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" width="1.3em" height="1.3em" fill="currentColor">
5869
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
5970
<path d="M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"/>

tcf_website/templates/landing/landing.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,20 @@ <h4 class="text-tcf-indigo ml-2">theCourseForum</h4>
6262

6363
<!-- Dark Mode Toggle Button -->
6464
<button id="darkModeToggle" style="top: 10px; right: 10px; z-index: 1000;">
65-
<svg id="sunIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="24" height="24" fill="currentColor">
65+
<!-- <svg id="sunIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="24" height="24" fill="currentColor"> -->
6666
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->
67-
<path d="M375.7 19.7c-1.5-8-6.9-14.7-14.4-17.8s-16.1-2.2-22.8 2.4L256 61.1 173.5 4.2c-6.7-4.6-15.3-5.5-22.8-2.4s-12.9 9.8-14.4 17.8l-18.1 98.5L19.7 136.3c-8 1.5-14.7 6.9-17.8 14.4s-2.2 16.1 2.4 22.8L61.1 256 4.2 338.5c-4.6 6.7-5.5 15.3-2.4 22.8s9.8 13 17.8 14.4l98.5 18.1 18.1 98.5c1.5 8 6.9 14.7 14.4 17.8s16.1 2.2 22.8-2.4L256 450.9l82.5 56.9c6.7 4.6 15.3 5.5 22.8 2.4s12.9-9.8 14.4-17.8l18.1-98.5 98.5-18.1c8-1.5 14.7-6.9 17.8-14.4s2.2-16.1-2.4-22.8L450.9 256l56.9-82.5c4.6-6.7 5.5-15.3 2.4-22.8s-9.8-12.9-17.8-14.4l-98.5-18.1L375.7 19.7zM269.6 110l65.6-45.2 14.4 78.3c1.8 9.8 9.5 17.5 19.3 19.3l78.3 14.4L402 242.4c-5.7 8.2-5.7 19 0 27.2l45.2 65.6-78.3 14.4c-9.8 1.8-17.5 9.5-19.3 19.3l-14.4 78.3L269.6 402c-8.2-5.7-19-5.7-27.2 0l-65.6 45.2-14.4-78.3c-1.8-9.8-9.5-17.5-19.3-19.3L64.8 335.2 110 269.6c5.7-8.2 5.7-19 0-27.2L64.8 176.8l78.3-14.4c9.8-1.8 17.5-9.5 19.3-19.3l14.4-78.3L242.4 110c8.2 5.7 19 5.7 27.2 0zM256 368a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM192 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/>
67+
<!-- <path d="M375.7 19.7c-1.5-8-6.9-14.7-14.4-17.8s-16.1-2.2-22.8 2.4L256 61.1 173.5 4.2c-6.7-4.6-15.3-5.5-22.8-2.4s-12.9 9.8-14.4 17.8l-18.1 98.5L19.7 136.3c-8 1.5-14.7 6.9-17.8 14.4s-2.2 16.1 2.4 22.8L61.1 256 4.2 338.5c-4.6 6.7-5.5 15.3-2.4 22.8s9.8 13 17.8 14.4l98.5 18.1 18.1 98.5c1.5 8 6.9 14.7 14.4 17.8s16.1 2.2 22.8-2.4L256 450.9l82.5 56.9c6.7 4.6 15.3 5.5 22.8 2.4s12.9-9.8 14.4-17.8l18.1-98.5 98.5-18.1c8-1.5 14.7-6.9 17.8-14.4s2.2-16.1-2.4-22.8L450.9 256l56.9-82.5c4.6-6.7 5.5-15.3 2.4-22.8s-9.8-12.9-17.8-14.4l-98.5-18.1L375.7 19.7zM269.6 110l65.6-45.2 14.4 78.3c1.8 9.8 9.5 17.5 19.3 19.3l78.3 14.4L402 242.4c-5.7 8.2-5.7 19 0 27.2l45.2 65.6-78.3 14.4c-9.8 1.8-17.5 9.5-19.3 19.3l-14.4 78.3L269.6 402c-8.2-5.7-19-5.7-27.2 0l-65.6 45.2-14.4-78.3c-1.8-9.8-9.5-17.5-19.3-19.3L64.8 335.2 110 269.6c5.7-8.2 5.7-19 0-27.2L64.8 176.8l78.3-14.4c9.8-1.8 17.5-9.5 19.3-19.3l14.4-78.3L242.4 110c8.2 5.7 19 5.7 27.2 0zM256 368a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM192 256a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/> -->
68+
<!-- </svg> -->
69+
<svg id="sunIcon" viewBox="0 0 24 24" width="1.3em" height="1.3em" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
70+
<circle cx="12" cy="12" r="5"/>
71+
<line x1="12" y1="1" x2="12" y2="3"/>
72+
<line x1="12" y1="21" x2="12" y2="23"/>
73+
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
74+
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
75+
<line x1="1" y1="12" x2="3" y2="12"/>
76+
<line x1="21" y1="12" x2="23" y2="12"/>
77+
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
78+
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
6879
</svg>
6980
<svg id="moonIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" width="1.3em" height="1.3em" fill="currentColor">
7081
<!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.-->

0 commit comments

Comments
 (0)