Skip to content

Commit c9360c4

Browse files
committed
styling updates
1 parent 9cc136b commit c9360c4

File tree

3 files changed

+31
-57
lines changed

3 files changed

+31
-57
lines changed

index.css

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ body {
2525
text-align: center;
2626
padding: 2rem;
2727
min-height: 80vh;
28-
max-width: 800px;
2928
width: 100%;
3029
}
3130

3231
.logo-container svg {
33-
width: 120px;
32+
width: 335px;
3433
height: auto;
35-
margin-bottom: 2rem;
3634
animation: logoFloat 3s ease-in-out infinite;
3735
}
3836

@@ -73,7 +71,6 @@ body {
7371
font-family: var(--font-family-primary);
7472
font-size: var(--h2-font-size);
7573
color: var(--primary-color);
76-
margin-bottom: 2rem;
7774
text-transform: uppercase;
7875
letter-spacing: 1px;
7976
animation: bounceIn 0.8s ease-out;
@@ -168,28 +165,25 @@ body {
168165

169166
.session-counter {
170167
font-size: 1.2rem;
168+
font-family: var(--font-family-secondary);
171169
color: var(--secondary-color);
172-
margin-bottom: 3rem;
173170
}
174171

175172
.timer-display {
176173
font-family: var(--font-family-primary);
177174
font-size: var(--timer-font-size);
178175
color: var(--secondary-color);
179-
margin: 2rem 0;
180176
font-weight: normal;
181177
}
182178

183179
.goal-display {
184180
font-family: var(--font-family-primary);
185-
font-size: 2rem;
181+
font-size: 4rem;
186182
color: var(--primary-color);
187-
margin: 2rem 0;
188183
padding: 1rem;
189184
border: 2px solid var(--primary-color);
190185
border-radius: 8px;
191186
background-color: rgba(248, 153, 57, 0.1);
192-
max-width: 600px;
193187
text-transform: uppercase;
194188
letter-spacing: 1px;
195189
}
@@ -206,7 +200,7 @@ body {
206200
transition: all 0.3s ease;
207201
text-transform: uppercase;
208202
letter-spacing: 1px;
209-
margin-top: 2rem;
203+
margin-bottom: 1em;
210204
}
211205

212206
.start-button:hover {
@@ -230,7 +224,6 @@ body {
230224
border-radius: 8px;
231225
width: 100%;
232226
max-width: 500px;
233-
margin-bottom: 2rem;
234227
text-align: center;
235228
background-color: var(--background-color);
236229
color: var(--secondary-color);
@@ -244,7 +237,6 @@ body {
244237
.timer-controls {
245238
display: flex;
246239
gap: 1rem;
247-
margin-top: 2rem;
248240
flex-wrap: wrap;
249241
justify-content: center;
250242
}
@@ -287,12 +279,12 @@ body {
287279
.video-container {
288280
margin: 2rem 0;
289281
width: 100%;
290-
max-width: 560px;
282+
width: 1080px;
283+
height: 720px;
291284
}
292285

293286
.youtube-player {
294287
width: 100%;
295-
height: 315px;
296288
border-radius: 8px;
297289
}
298290

src/pomodoro-timer.js

Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,9 @@ class PomodoroTimer extends DataroomElement {
5353
// Title
5454
const title = document.createElement('h1');
5555
title.className = 'main-title';
56-
title.textContent = 'Pomodoro Timer';
56+
title.textContent = 'CrashPomodoro';
5757
container.appendChild(title);
5858

59-
// Session counter
60-
const counter = document.createElement('div');
61-
counter.className = 'session-counter';
62-
counter.textContent = `Sessions Completed: ${this.sessionCount}`;
63-
container.appendChild(counter);
6459

6560
// Start button
6661
const startButton = document.createElement('button');
@@ -71,6 +66,13 @@ class PomodoroTimer extends DataroomElement {
7166
this.startPomodoroSession();
7267
});
7368
container.appendChild(startButton);
69+
70+
71+
// Session counter
72+
const counter = document.createElement('div');
73+
counter.className = 'session-counter';
74+
counter.textContent = `Sessions Completed: ${this.sessionCount} of 12`;
75+
container.appendChild(counter);
7476

7577
console.log('Start screen rendered');
7678
}
@@ -104,23 +106,21 @@ class PomodoroTimer extends DataroomElement {
104106
title.textContent = 'Set Our Goal!';
105107
container.appendChild(title);
106108

107-
const timer = document.createElement('div');
108-
timer.className = 'timer-display';
109-
timer.textContent = this.formatTime(this.timeRemaining);
110-
container.appendChild(timer);
111-
112-
const label = document.createElement('label');
113-
label.className = 'goal-label';
114-
label.textContent = 'What is our goal?';
115-
container.appendChild(label);
116-
117109
const input = document.createElement('input');
118110
input.type = 'text';
119111
input.className = 'goal-input';
120112
input.placeholder = 'Enter your goal for this session...';
121113
input.addEventListener('input', (e) => this.currentGoal = e.target.value);
122114
container.appendChild(input);
123115

116+
117+
const timer = document.createElement('div');
118+
timer.className = 'timer-display';
119+
timer.textContent = this.formatTime(this.timeRemaining);
120+
container.appendChild(timer);
121+
122+
123+
124124
this.renderTimerControls(container);
125125
setTimeout(() => input.focus(), 100);
126126
}
@@ -141,10 +141,6 @@ class PomodoroTimer extends DataroomElement {
141141
.then(svgContent => logoContainer.innerHTML = svgContent)
142142
.catch(() => logoContainer.innerHTML = '<div class="logo-placeholder">⚡</div>');
143143

144-
const title = document.createElement('h2');
145-
title.className = 'phase-title';
146-
title.textContent = 'Deep Work';
147-
container.appendChild(title);
148144

149145
if (this.currentGoal) {
150146
const goal = document.createElement('div');
@@ -166,31 +162,17 @@ class PomodoroTimer extends DataroomElement {
166162
const container = document.createElement('div');
167163
container.className = 'pomodoro-container relaxation-screen';
168164
this.appendChild(container);
169-
170-
// Add logo
171-
const logoContainer = document.createElement('div');
172-
logoContainer.className = 'logo-container';
173-
container.appendChild(logoContainer);
174165

175-
fetch('./logo.svg')
176-
.then(response => response.text())
177-
.then(svgContent => logoContainer.innerHTML = svgContent)
178-
.catch(() => logoContainer.innerHTML = '<div class="logo-placeholder">⚡</div>');
179-
180-
const title = document.createElement('h2');
181-
title.className = 'phase-title';
182-
title.textContent = 'Relax!';
183-
container.appendChild(title);
166+
const videoContainer = document.createElement('div');
167+
videoContainer.className = 'video-container';
168+
container.appendChild(videoContainer);
169+
this.loadRandomVideo(videoContainer);
184170

185171
const timer = document.createElement('div');
186172
timer.className = 'timer-display';
187173
timer.textContent = this.formatTime(this.timeRemaining);
188174
container.appendChild(timer);
189-
190-
const videoContainer = document.createElement('div');
191-
videoContainer.className = 'video-container';
192-
container.appendChild(videoContainer);
193-
this.loadRandomVideo(videoContainer);
175+
194176

195177
this.renderTimerControls(container);
196178
}
@@ -210,8 +192,8 @@ class PomodoroTimer extends DataroomElement {
210192

211193
const iframe = document.createElement('iframe');
212194
iframe.src = `https://www.youtube.com/embed/videoseries?list=${playlistId}&autoplay=1&mute=1&controls=1&loop=1`;
213-
iframe.width = '560';
214-
iframe.height = '315';
195+
iframe.width = '1080';
196+
iframe.height = '720';
215197
iframe.frameBorder = '0';
216198
iframe.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture';
217199
iframe.allowFullscreen = true;

styles/variables.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
--text-light: #ffffff;
3030
--text-dark: #221e1f;
3131
--font-family-primary: 'League Gothic', Arial, sans-serif;
32-
--font-family-secondary: Arial, sans-serif;
32+
--font-family-secondary: 'League Gothic', Arial, sans-serif;
3333
--h1-font-size: 4rem;
34-
--h2-font-size: 3rem;
34+
--h2-font-size: 2rem;
3535
--timer-font-size: 6rem;
3636
--button-font-size: 1.5rem;
3737
}

0 commit comments

Comments
 (0)