-
Notifications
You must be signed in to change notification settings - Fork 0
Collapse file tree
Files
Search this repository
/
Copy pathretrostudentcompanion.html
More file actions
More file actions
Latest commit
493 lines (453 loc) · 16.2 KB
/
retrostudentcompanion.html
File metadata and controls
493 lines (453 loc) · 16.2 KB
You must be signed in to make or propose changes
More edit options
Edit and raw actions
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
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
>gt;
:root {
--win-grey: #c0c0c0;
--win-blue: #000080;
--win-text: #000000;
--r: #cc0000;
}
body {
background-color: var(--r);
background-image: radial-gradient(#000 1px, transparent 1px);
background-size: 20px 20px;
font-family: "Courier New", Courier, monospace;
margin: 0;
padding: 20px;
display: flex;
flex-wrap: wrap;
gap: 20px;
justify-content: center;
align-items: flex-start;
min-height: 100vh;
}
.window {
background-color: var(--win-grey);
border-top: 2px solid white;
border-left: 2px solid white;
border-right: 2px solid black;
border-bottom: 2px solid black;
width: 300px;
box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
display: flex;
flex-direction: column;
position: relative;
z-index: 1;
}
.title-bar {
background: linear-gradient(90deg, var(--win-blue), #1084d0);
color: white;
padding: 4px 8px;
font-weight: bold;
font-family: sans-serif;
letter-spacing: 1px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: move;
}
.close-btn {
background: var(--win-grey);
border-top: 1px solid white;
border-left: 1px solid white;
border-right: 1px solid black;
border-bottom: 1px solid black;
width: 16px;
height: 16px;
line-height: 14px;
text-align: center;
color: black;
font-size: 12px;
cursor: pointer;
}
.close-btn:active {
border-top: 1px solid black;
border-left: 1px solid black;
border-right: 1px solid white;
border-bottom: 1px solid white;
}
.content {
padding: 15px;
}
input, select, textarea {
width: 90%;
background: white;
border: 2px solid;
border-color: #808080 white white #808080;
padding: 5px;
font-family: "Courier New", monospace;
margin-bottom: 10px;
}
button {
background: var(--win-grey);
border-top: 2px solid white;
border-left: 2px solid white;
border-right: 2px solid black;
border-bottom: 2px solid black;
padding: 5px 15px;
font-weight: bold;
cursor: pointer;
text-transform: uppercase;
}
button:active {
border-top: 2px solid black;
border-left: 2px solid black;
border-right: 2px solid white;
border-bottom: 2px solid white;
transform: translate(1px, 1px);
}
.marquee-container {
width: 100%;
background: black;
color: lime;
font-family: "Courier New", monospace;
padding: 5px;
border: 2px solid white;
margin-bottom: 20px;
box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
}
ul { padding-left: 20px; margin: 0; list-style-type: square; }
li { margin-bottom: 5px; cursor: pointer; }
li:hover { text-decoration: line-through; color: red; }
.timer-screen {
background: black;
color: lime;
font-size: 2rem;
text-align: center;
padding: 10px;
border: 2px solid #808080;
margin-bottom: 10px;
font-family: 'Courier New', monospace;
const div = document.getElementById('flashCardDisplay');
if(cards.length === 0) {
div.innerText = "[No Cards Yet]";
} else {
div.innerText = showingFront ? cards[currentCardIndex].front : cards[currentCardIndex].back;
}
}
function addTodo() {
const input = document.getElementById('todoInput');
if(input.value) {
const li = document.createElement('li');
li.innerText = input.value;
li.onclick = function() { this.remove(); };
document.getElementById('todoList').appendChild(li);
input.value = "";
}
}
let timer;
let timeLeft = 1500;
let isRunning = false;
function startTimer() {
if(isRunning) return;
isRunning = true;
timer = setInterval(() =>gt; {
if(timeLeft <=t;= 0) {
clearInterval(timer);
alert("TIME UP! Take a break.");
isRunning = false;
} else {
timeLeft--;
updateDisplay();
}
}, 1000);
}
function resetTimer() {
clearInterval(timer);
isRunning = false;
timeLeft = 1500;
updateDisplay();
}
function updateDisplay() {
const m = Math.floor(timeLeft / 60);
const s = timeLeft % 60;
document.getElementById('timerDisplay').innerText = `${m}:${s 10 ? '0' : ''} ${s}`;
}
function calculate() {
const current = parseFloat(document.getElementById('currGrade').value);
const weight = parseFloat(document.getElementById('examWeight').value);
const resultBox = document.getElementById('calcResult');
if(isNaN(current) || isNaN(weight)) {
resultBox.innerText = "Error: Invalid Input";
return;
}
const decimalWeight = weight / 100;
const needed = (90 - (current * (1 - decimalWeight))) / decimalWeight;
resultBox.innerText = `Need ${needed.toFixed(1)}% for an A`;
if(needed >gt; 100) {
resultBox.style.color = "red";
resultBox.innerText += " (Impossible!)";
} else {
resultBox.style.color = "black";
}
}
function closeWindow(element) {
element.parentElement.parentElement.style.display = "none";
}
script>gt;
body>gt;
html>gt;