Skip to content

Commit 03eaa50

Browse files
authored
Merge pull request #4 from pdedgar1/claude/init-project-011CUsp2T43mKf1iMRqQUD2b
Claude/init project 011 c usp2 t43m kf1i m rq qud2b
2 parents 6375933 + f6a8313 commit 03eaa50

3 files changed

Lines changed: 116 additions & 19 deletions

File tree

line-break-lab.html

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,15 @@ <h3>Remove All Line Breaks</h3>
9595
</div>
9696

9797
</div>
98-
98+
9999
<div class="text-display" id="textDisplay" style="display: none;">
100100
<div class="toggle-bar">
101101
<button class="view-toggle active" id="showOriginalBtn">Original Text</button>
102102
<button class="view-toggle" id="showModifiedBtn">Modified Text</button>
103+
<div class="font-size-control">
104+
<label for="fontSizeSlider">Font Size: <span id="fontSizeValue">16px</span></label>
105+
<input type="range" class="slider" id="fontSizeSlider" min="12" max="32" value="16">
106+
</div>
103107
</div>
104108
<div class="text-box">
105109
<div class="text-content" id="displayText"></div>
@@ -143,6 +147,10 @@ <h3>Remove All Line Breaks</h3>
143147
const removeAllBtn = document.getElementById('removeAllBtn');
144148
const resetBtn = document.getElementById('resetBtn');
145149

150+
// Font size control
151+
const fontSizeSlider = document.getElementById('fontSizeSlider');
152+
const fontSizeValue = document.getElementById('fontSizeValue');
153+
146154
// Upload handlers
147155
uploadZone.addEventListener('click', () => fileInput.click());
148156

@@ -191,15 +199,22 @@ <h3>Remove All Line Breaks</h3>
191199
displayText.textContent = showingOriginal ? originalText : currentText;
192200
}
193201

202+
// Font size slider handler
203+
fontSizeSlider.addEventListener('input', () => {
204+
const size = fontSizeSlider.value + 'px';
205+
fontSizeValue.textContent = size;
206+
displayText.style.fontSize = size;
207+
});
208+
194209
// Toggle buttons handler
195210
document.querySelectorAll('.toggle-btn').forEach(btn => {
196211
btn.addEventListener('click', function() {
197212
const tool = this.dataset.tool;
198213
const action = this.dataset.action;
199-
214+
200215
// Update state
201216
toolStates[tool] = action;
202-
217+
203218
// Update UI
204219
const siblings = this.parentElement.querySelectorAll('.toggle-btn');
205220
siblings.forEach(s => s.classList.remove('active'));

styles.css

Lines changed: 83 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -406,26 +406,39 @@ input[type="file"],
406406
}
407407

408408
/* Controls */
409-
.controls,
409+
.controls {
410+
display: flex;
411+
flex-direction: column;
412+
gap: 20px;
413+
margin-bottom: 20px;
414+
}
415+
410416
.erasure-controls {
411417
display: grid;
412-
grid-template-columns: 1fr 1fr;
413-
gap: 15px;
414-
margin-bottom: 20px;
418+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
419+
gap: 20px;
420+
}
421+
422+
@media (max-width: 768px) {
423+
.erasure-controls {
424+
grid-template-columns: 1fr;
425+
}
415426
}
416427

417428
.control-group,
418429
.option-group {
419430
background: #ffffff;
420-
padding: 20px;
431+
padding: 25px;
421432
border-radius: 0;
422433
border: 2px solid #4a4a4a;
423-
margin-bottom: 15px;
424434
}
425435

426436
.control-group h3 {
427-
margin-bottom: 15px;
437+
margin-bottom: 18px;
438+
margin-top: 0;
428439
color: #1a1a1a;
440+
padding-bottom: 10px;
441+
border-bottom: 2px solid #e8e8e8;
429442
}
430443

431444
.control-group label,
@@ -448,6 +461,12 @@ input[type="file"],
448461
transition: all 0.3s ease;
449462
background: #ffffff;
450463
width: 100%;
464+
box-sizing: border-box;
465+
}
466+
467+
.control-group input[type="checkbox"] {
468+
width: auto;
469+
padding: 0;
451470
}
452471

453472
.control-group input:focus,
@@ -604,6 +623,44 @@ input[type="file"],
604623
padding: 10px;
605624
border-radius: 0;
606625
border: 2px solid #4a4a4a;
626+
align-items: center;
627+
flex-wrap: wrap;
628+
}
629+
630+
.font-size-control {
631+
display: flex;
632+
align-items: center;
633+
gap: 10px;
634+
margin-left: auto;
635+
padding: 8px 15px;
636+
background: #ffffff;
637+
border: 2px solid #4a4a4a;
638+
}
639+
640+
.font-size-control label {
641+
font-size: 0.9em;
642+
font-weight: 600;
643+
color: #1a1a1a;
644+
white-space: nowrap;
645+
margin: 0;
646+
}
647+
648+
.font-size-control .slider {
649+
width: 120px;
650+
height: 6px;
651+
margin: 0;
652+
}
653+
654+
@media (max-width: 768px) {
655+
.font-size-control {
656+
margin-left: 0;
657+
width: 100%;
658+
justify-content: space-between;
659+
}
660+
661+
.font-size-control .slider {
662+
width: 150px;
663+
}
607664
}
608665

609666
.toggle-btn,
@@ -877,33 +934,45 @@ input[type="file"],
877934
.checkbox-container {
878935
display: flex;
879936
align-items: center;
880-
margin-bottom: 10px;
937+
margin-bottom: 12px;
938+
padding: 8px 0;
881939
}
882940

883941
.checkbox-container input[type="checkbox"] {
884-
margin-right: 10px;
885-
transform: scale(1.2);
942+
width: auto;
943+
margin-right: 12px;
944+
transform: scale(1.3);
886945
accent-color: #c41e3a;
887946
cursor: pointer;
947+
flex-shrink: 0;
948+
}
949+
950+
.checkbox-container label {
951+
cursor: pointer;
952+
margin: 0;
953+
font-size: 0.95em;
954+
text-transform: none;
955+
letter-spacing: normal;
888956
}
889957

890958
/* Sliders */
891959
.slider-container {
892-
margin-bottom: 15px;
960+
margin-bottom: 20px;
893961
}
894962

895963
.slider-label {
896964
display: flex;
897965
justify-content: space-between;
898966
align-items: center;
899-
margin-bottom: 8px;
900-
font-weight: 500;
967+
margin-bottom: 10px;
968+
font-weight: 600;
901969
color: #1a1a1a;
970+
font-size: 0.95em;
902971
}
903972

904973
.slider {
905974
width: 100%;
906-
height: 6px;
975+
height: 8px;
907976
border-radius: 0;
908977
background: #e8e8e8;
909978
outline: none;
@@ -1033,8 +1102,6 @@ input[type="file"],
10331102
padding: 20px;
10341103
}
10351104

1036-
.controls,
1037-
.erasure-controls,
10381105
.tools-section {
10391106
grid-template-columns: 1fr;
10401107
}

text-reverse-lab.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ <h3>Insert Line Breaks</h3>
4646
<div class="toggle-bar">
4747
<button class="toggle-btn active" id="showOriginalBtn">Original Text</button>
4848
<button class="toggle-btn" id="showModifiedBtn">Modified Text</button>
49+
<div class="font-size-control">
50+
<label for="fontSizeSlider">Font Size: <span id="fontSizeValue">16px</span></label>
51+
<input type="range" class="slider" id="fontSizeSlider" min="12" max="32" value="16">
52+
</div>
4953
</div>
5054
<div class="text-box">
5155
<div class="text-content" id="displayText"></div>
@@ -72,6 +76,10 @@ <h3>Insert Line Breaks</h3>
7276
const showOriginalBtn = document.getElementById('showOriginalBtn');
7377
const showModifiedBtn = document.getElementById('showModifiedBtn');
7478

79+
// Font size control
80+
const fontSizeSlider = document.getElementById('fontSizeSlider');
81+
const fontSizeValue = document.getElementById('fontSizeValue');
82+
7583
uploadZone.addEventListener('click', () => fileInput.click());
7684

7785
uploadZone.addEventListener('dragover', (e) => {
@@ -127,6 +135,13 @@ <h3>Insert Line Breaks</h3>
127135
addBreaksBtn.disabled = false;
128136
}
129137

138+
// Font size slider handler
139+
fontSizeSlider.addEventListener('input', () => {
140+
const size = fontSizeSlider.value + 'px';
141+
fontSizeValue.textContent = size;
142+
displayText.style.fontSize = size;
143+
});
144+
130145
reverseWordsBtn.addEventListener('click', () => {
131146
const words = currentText.split(/\s+/);
132147
currentText = words.reverse().join(' ');

0 commit comments

Comments
 (0)