Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2 Fix Dark Mode toggle button text not updating after mode switch" #5

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
venv/
Binary file modified DevDocsHub/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified DevDocsHub/__pycache__/settings.cpython-311.pyc
Binary file not shown.
Binary file modified DevDocsHub/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file modified DevDocsHub/__pycache__/wsgi.cpython-311.pyc
Binary file not shown.
Binary file modified Docs/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified Docs/__pycache__/admin.cpython-311.pyc
Binary file not shown.
Binary file modified Docs/__pycache__/apps.cpython-311.pyc
Binary file not shown.
Binary file modified Docs/__pycache__/models.cpython-311.pyc
Binary file not shown.
Binary file modified Docs/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file modified Docs/__pycache__/views.cpython-311.pyc
Binary file not shown.
Binary file modified Docs/migrations/__pycache__/0001_initial.cpython-311.pyc
Binary file not shown.
Binary file modified Docs/migrations/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
21 changes: 17 additions & 4 deletions Docs/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@
border-color: #777;
color: #fff;
}
.btn{
text-decoration: none;
color:#008080;
font-size: large;
}
.btn:hover{
border-bottom: 2px solid #008080;
}

@media (max-width: 600px) {
header h1 {
Expand Down Expand Up @@ -232,10 +240,15 @@ <h2>Tutorials & Guides</h2>
<button class="dark-mode-toggle" onclick="toggleDarkMode()">Dark Mode</button>

<script>
// Toggle dark mode function
function toggleDarkMode() {
document.body.classList.toggle('dark-mode');
}
function toggleDarkMode() {
document.body.classList.toggle('dark-mode');
const button = document.querySelector('.dark-mode-toggle');
if (document.body.classList.contains('dark-mode')) {
button.textContent = "Light Mode";
} else {
button.textContent = "Dark Mode";
}
}
</script>
</body>
</html>
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Django==5.0.6
asgiref==3.8.1
Django==5.1.1
sqlparse==0.5.1
tzdata==2024.2
Loading