semi working darkmode

This commit is contained in:
2025-08-16 21:44:29 +02:00
parent 68b7b81741
commit 57a7b0e68f
7 changed files with 928 additions and 456 deletions

View File

@@ -1,11 +1,12 @@
<!doctype html>
<html lang="en">
<html lang="en" class="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Quick Problem Platform</title>
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
</head>
<style>
/* Popout explanation */
#rankingExplanation {
@@ -34,7 +35,12 @@
<body>
<div class="wrap">
<header>
<h1>Quick Problem Platform</h1>
<div class="header-content">
<h1>Quick Problem Platform</h1>
<button id="darkModeToggle" class="dark-mode-toggle" title="Toggle dark mode">
<span class="dark-mode-icon"></span>
</button>
</div>
</header>
<div class="content" id="contentContainer">
<!-- Problems -->
@@ -45,7 +51,7 @@
<h2 style="margin-bottom:6px;font-size:1.1rem">Problems</h2>
<div id="problemsContainer">
{% for folder, description, test_code, difficulty in problems %}
<div class="problem-item" data-name="{{ folder.replace('_',' ').title() }}" data-desc="{{ description }}">
<div class="problem-item" data-name="{{ folder.replace('_',' ').title() }}" data-desc="{{ description }}" data-difficulty="{{ difficulty|lower }}">
<a href="/problem/{{ folder }}">{{ folder.replace('_',' ').title() }}</a>
<span class="difficulty" data-difficulty="{{ difficulty|lower }}">{{ difficulty }}</span>
</div>
@@ -53,6 +59,11 @@
<div class="problem-item">No problems yet.</div>
{% endfor %}
</div>
<div class="pagination-controls" id="problemsPagination">
<button class="pagination-btn" id="problemsPrevBtn" disabled>← Previous</button>
<span class="pagination-info" id="problemsPaginationInfo">Page 1 of 1</span>
<button class="pagination-btn" id="problemsNextBtn" disabled>Next →</button>
</div>
</section>
<!-- Leaderboard -->
@@ -131,6 +142,6 @@
</section>
</div>
</div>
<script src="./script.js"></script>
<script src="{{ url_for('static', filename='script.js') }}"></script>
</body>
</html>
</html>