-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.html
288 lines (255 loc) · 12.5 KB
/
settings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Data Analytics</title>
<link rel="icon" type="image/x-icon" href="imgs/data-logo.png">
<!-- Bootstrap 5 Connection -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
<!-- CSS Styling Connection -->
<link rel="stylesheet" href="style.css">
<!-- Datatables Connection -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css">
<!-- Include Chart.js library -->
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.0"></script>
</head>
<body>
<!-- Header Section -->
<header>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="#">📊 Data Analytics</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="index.html">Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link" href="analytics.html">Analytics</a>
</li>
<li class="nav-item">
<a class="nav-link" href="settings.html">Settings</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
User Profile
</a>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown">
<li><a class="dropdown-item" href="profile.html">Profile</a></li>
<li><a class="dropdown-item" href="settings.html">Settings</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="index.html" onclick="logout()">Log Out</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!-- Main Content Section -->
<main class="container mt-4">
<h2>Settings</h2>
<!-- Settings Section-->
<div class="card settings-card">
<div class="card-body">
<div class="form-group">
<label for="language" class="card-title">Language:</label>
<select class="form-control" id="language">
<option value="en">English</option>
<option value="ru">Russian</option>
<option value="kz">Kazakh</option>
</select>
</div>
<br>
<div class="form-group">
<label for="textSize" class="card-title">Text Size:</label>
<input type="range" class="form-control-range" id="textSize" min="12" max="24" step="1">
</div>
<br>
<div id="text">
<p>
<b>Data analytics</b> is the science of analyzing raw data to make conclusions about information. Many of the techniques and processes of data analytics have been automated into mechanical processes and algorithms that work over raw data for human consumption.
</p>
</div>
<br>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="animations">
<label class="form-check-label" for="animations">Animations</label>
</div>
<br>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="darkMode">
<label class="form-check-label" for="darkMode">Dark Mode</label>
</div>
<br>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="musicCheckbox">
<label class="form-check-label" for="musicCheckbox">Music</label>
<audio id="music" src="music/piano_beethoven.mp3" loop></audio>
</div>
<br>
<div id="timer">00:00:00</div>
<div class="d-flex justify-content-begin mt-3">
<button class="btn btn-primary" onclick="startTimer()" id="startBtn">Start</button>  
<button class="btn btn-danger" onclick="stopTimer()" id="stopBtn">Stop</button>  
<button class="btn btn-secondary" onclick="resetTimer()" id="resetBtn">Reset</button>  
<button class="btn btn-warning" onclick="counter()" id="counter">0</button>
</div>
</div>
</div>
<!-- Bug Bounty Form -->
<div class="card bug-bounty-card">
<div class="card-body">
<h2 class="card-title">Bug Bounty Program</h2>
<form>
<div class="mb-3">
<label for="name" class="form-label">Your Name</label>
<input type="text" class="form-control" id="name" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email Address</label>
<input type="email" class="form-control" id="email" required>
</div>
<div class="mb-3">
<label for="bugDescription" class="form-label">Bug Description</label>
<textarea class="form-control" id="bugDescription" rows="4" required></textarea>
</div>
<button type="submit" class="btn btn-success">Submit</button>
</form>
</div>
</div>
</main>
<!-- Footer Section -->
<footer class="bg-dark text-light py-4">
<div class="container">
<div class="row">
<div class="col-md-6">
<p>© 2023 Data Analytics. All Rights Reserved.</p>
</div>
<div class="col-md-6 text-md-right">
<a class="text-light" href="#">Privacy Policy</a> |
<a class="text-light" href="#">Terms of Service</a>
</div>
</div>
</div>
</footer>
<!-- JavaScript and Additional Scripts -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.0/dist/chart.min.js"></script>
<!-- Include DataTables JavaScript -->
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<!-- Include jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Include Bootstrap JavaScript (which includes Popper.js) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="app.js"></script>
<script>
$(document).ready(function () {
$('#dataTable').DataTable();
$('#addDataBtn').click(function () {
alert('Add new data logic goes here.');
});
});
// Change Language Settings
const languageSelect = document.getElementById('language');
const contentParagraph = document.getElementById('text');
languageSelect.addEventListener('change', function() {
const selectedLanguage = languageSelect.value;
const languageText = {
'en': `<b>Data analytics</b> is the science of analyzing raw data to make conclusions about information. Many of the techniques and processes of data analytics have been automated into mechanical processes and algorithms that work over raw data for human consumption.`,
'ru': `<b>Анализ данных</b> - это наука анализа необработанных данных для получения выводов о информации. Многие техники и процессы анализа данных были автоматизированы с использованием механических процессов и алгоритмов, которые обрабатывают исходные данные для человеческого потребления.`,
'kz': `<b>Деректерді бақылау</b> - ақпаратты туралы шешімдерге келесі анализде қолданылатын тездіктерді анықтау ғылымы. Деректерді бақылаудың көптеген әдістері мен процестері, адамдардың пайдалануы үшін деректерді өңдеу механикалы процестер мен алгоритмдерге аутоматтандырылған.`
};
contentParagraph.innerHTML = languageText[selectedLanguage];
});
// Text Size Settings
const textSizeInput = document.getElementById('textSize');
textSizeInput.addEventListener('input', function() {
const textSize = this.value + 'px';
contentParagraph.style.fontSize = textSize;
});
// Animation & Dark Mode Settings
const animationsCheckbox = document.getElementById('animations');
const darkModeCheckbox = document.getElementById('darkMode');
function animateText() {
contentParagraph.classList.toggle('animate');
}
function toggleDarkMode() {
document.body.classList.toggle('dark-mode');
}
animationsCheckbox.addEventListener('change', function() {
if (animationsCheckbox.checked) {
contentParagraph.classList.add('animate');
} else {
contentParagraph.classList.remove('animate');
}
});
darkModeCheckbox.addEventListener('change', function() {
toggleDarkMode();
});
// Music Settings
const musicCheckbox = document.getElementById('musicCheckbox');
const music = document.getElementById('music');
musicCheckbox.addEventListener('change', function() {
if (musicCheckbox.checked) {
music.play(); // Music Start
} else {
music.pause(); // Music Pause
}
});
// Timer Settings
let interval;
let cnt = 0;
let seconds = 0;
let minutes = 0;
let hours = 0;
function counter() {
cnt++;
document.getElementById("counter").textContent = cnt;
}
function startTimer() {
if(!interval) {
interval = setInterval(updateTimer, 1000);
}
}
function stopTimer() {
clearInterval(interval);
interval = null;
}
function resetTimer() {
clearInterval(interval);
interval = null;
seconds = 0;
minutes = 0;
hours = 0;
cnt = 0;
document.getElementById("counter").textContent = cnt;
updateDisplay();
}
function updateTimer() {
seconds++;
if(seconds == 60) {
seconds = 0;
minutes++;
if(minutes == 60) {
minutes = 0;
hours++;
}
}
updateDisplay();
}
function updateDisplay() {
const formattedTime = pad(hours) + ":" + pad(minutes) + ":" + pad(seconds);
document.getElementById("timer").textContent = formattedTime;
}
function pad(value) {
return value < 10 ? "0" + value : value;
}
</script>
</body>
</html>