Update templates/index.html
Browse files- templates/index.html +123 -0
templates/index.html
CHANGED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Pomodoro Timer</title>
|
| 7 |
+
<link rel="stylesheet" href="/static/css/style.css">
|
| 8 |
+
<link rel="manifest" href="/manifest.json">
|
| 9 |
+
<script src="https://hammerjs.github.io/dist/hammer.min.js"></script>
|
| 10 |
+
</head>
|
| 11 |
+
<body>
|
| 12 |
+
<div id="login-form">
|
| 13 |
+
<h2>Login</h2>
|
| 14 |
+
<input type="text" id="username" placeholder="Username">
|
| 15 |
+
<input type="password" id="password" placeholder="Password">
|
| 16 |
+
<button onclick="login()">Login</button>
|
| 17 |
+
<p>Don't have an account? <a href="#" onclick="showRegisterForm()">Register</a></p>
|
| 18 |
+
</div>
|
| 19 |
+
|
| 20 |
+
<div id="register-form" style="display: none;">
|
| 21 |
+
<h2>Register</h2>
|
| 22 |
+
<input type="text" id="reg-username" placeholder="Username">
|
| 23 |
+
<input type="password" id="reg-password" placeholder="Password<button onclick="register()">Register</button>
|
| 24 |
+
<p>Already have an account? <a href="#" onclick="showLoginForm()">Login</a></p>
|
| 25 |
+
</div>
|
| 26 |
+
|
| 27 |
+
<div id="main-content" style="display: none;">
|
| 28 |
+
<div class="grid-container">
|
| 29 |
+
<div class="grid-item" id="timer-container">
|
| 30 |
+
<h2 id="session-type">Work</h2>
|
| 31 |
+
<div id="timer">25:00</div>
|
| 32 |
+
<button class="button" onclick="startTimer()">Start</button>
|
| 33 |
+
<button class="button" onclick="pauseTimer()">Pause</button>
|
| 34 |
+
<button class="button" onclick="resetTimer()">Reset</button>
|
| 35 |
+
</div>
|
| 36 |
+
|
| 37 |
+
<div class="grid-item" id="task-manager">
|
| 38 |
+
<h2>Task Manager</h2>
|
| 39 |
+
<input type="text" id="task-input" placeholder="Add a new task">
|
| 40 |
+
<button onclick="addTask()">Add Task</button>
|
| 41 |
+
<ul id="task-list"></ul>
|
| 42 |
+
</div>
|
| 43 |
+
|
| 44 |
+
<div class="grid-item" id="statistics">
|
| 45 |
+
<h2>Statistics</h2>
|
| 46 |
+
<p>Total Sessions: <span id="total-sessions">0</span></p>
|
| 47 |
+
<p>Total Work Time: <span id="total-work-time">0h 0m</span></p>
|
| 48 |
+
<p>Average Rating: <span id="average-rating">0.00</span></p>
|
| 49 |
+
<p>Current Streak: <span id="streak">0</span></p>
|
| 50 |
+
</div>
|
| 51 |
+
</div>
|
| 52 |
+
|
| 53 |
+
<div id="settings">
|
| 54 |
+
<h2>Settings</h2>
|
| 55 |
+
<label>
|
| 56 |
+
<input type="checkbox" id="sound-enabled" checked>
|
| 57 |
+
Enable Sound
|
| 58 |
+
</label>
|
| 59 |
+
<label>
|
| 60 |
+
<input type="checkbox" id="dark-mode">
|
| 61 |
+
Dark Mode
|
| 62 |
+
</label>
|
| 63 |
+
<label>
|
| 64 |
+
<input type="checkbox" id="notification-enabled" checked>
|
| 65 |
+
Enable Notifications
|
| 66 |
+
</label>
|
| 67 |
+
<label>
|
| 68 |
+
Work Duration (minutes):
|
| 69 |
+
<input type="number" id="work-duration" value="25" min="1" max="60">
|
| 70 |
+
</label>
|
| 71 |
+
<label>
|
| 72 |
+
Rest Duration (minutes):
|
| 73 |
+
<input type="number" id="rest-duration" value="5" min="1" max="30">
|
| 74 |
+
</label>
|
| 75 |
+
<button onclick="updateSettings()">Save Settings</button>
|
| 76 |
+
</div>
|
| 77 |
+
|
| 78 |
+
<div id="scripts">
|
| 79 |
+
<h2>Saved Sessions</h2>
|
| 80 |
+
<!-- Scripts will be dynamically added here -->
|
| 81 |
+
</div>
|
| 82 |
+
|
| 83 |
+
<button onclick="exportData()">Export Data</button>
|
| 84 |
+
<button onclick="logout()">Logout</button>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
<div id="admin-panel" style="display: none;">
|
| 88 |
+
<h2>Admin Panel</h2>
|
| 89 |
+
<div id="feature-toggles">
|
| 90 |
+
<h3>Feature Toggles</h3>
|
| 91 |
+
<label>
|
| 92 |
+
<input type="checkbox" id="enable-sound" checked>
|
| 93 |
+
Enable Sound
|
| 94 |
+
</label>
|
| 95 |
+
<label>
|
| 96 |
+
<input type="checkbox" id="enable-notifications" checked>
|
| 97 |
+
Enable Notifications
|
| 98 |
+
</label>
|
| 99 |
+
<label>
|
| 100 |
+
<input type="checkbox" id="enable-dark-mode" checked>
|
| 101 |
+
Enable Dark Mode Option
|
| 102 |
+
</label>
|
| 103 |
+
<label>
|
| 104 |
+
<input type="checkbox" id="enable-task-manager" checked>
|
| 105 |
+
Enable Task Manager
|
| 106 |
+
</label>
|
| 107 |
+
<label>
|
| 108 |
+
<input type="checkbox" id="enable-statistics" checked>
|
| 109 |
+
Enable Statistics
|
| 110 |
+
</label>
|
| 111 |
+
</div>
|
| 112 |
+
<button onclick="saveAdminSettings()">Save Admin Settings</button>
|
| 113 |
+
<div id="database-actions">
|
| 114 |
+
<h3>Database Actions</h3>
|
| 115 |
+
<button onclick="generateOtp()">Generate OTP</button>
|
| 116 |
+
<input type="text" id="otp" placeholder="Enter OTP">
|
| 117 |
+
<button onclick="resetDatabase()">Reset Database</button>
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
|
| 121 |
+
<script src="/static/js/script.js"></script>
|
| 122 |
+
</body>
|
| 123 |
+
</html>
|