Skip to content

Commit 0f8f94f

Browse files
committed
adjusment for mobile
1 parent 00d03b9 commit 0f8f94f

File tree

3 files changed

+44
-23
lines changed

3 files changed

+44
-23
lines changed

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ <h1 class="title">Audio Echo</h1>
1212
<div id="status-message" class="status-message" aria-live="polite">Ready</div>
1313

1414
<div class="slider-container">
15-
<label for="threshold-slider">Threshold: <span id="threshold-value">5%</span></label>
16-
<input type="range" id="threshold-slider" min="0" max="1" step="0.01" value="0.05" class="slider" aria-valuetext="5%">
15+
<label for="threshold-slider">Threshold: <span id="threshold-value">7%</span></label>
16+
<input type="range" id="threshold-slider" min="0" max="1" step="0.01" value="0.07" class="slider" aria-valuetext="7%">
1717
</div>
1818

1919
<div class="slider-container">

script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ document.addEventListener("DOMContentLoaded", async () => {
88
const pauseButton = document.getElementById("pause-button");
99

1010
let silenceThreshold = 1000;
11-
let vadThreshold = 0.05;
11+
let vadThreshold = 0.07;
1212
let isRecording = false;
1313
let isPaused = false;
1414
let isPlayingBack = false;

styles.css

+41-20
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
:root {
2-
3-
--color-primary: #6b9080; /* Primary color */
4-
--color-background: #eaf4f4; /* Background color */
5-
--color-accent: #a4c3b2; /* Accent color */
6-
2+
--color-primary: #6b9080;
3+
--color-background: #eaf4f4;
4+
--color-accent: #a4c3b2;
75
}
86

97
body {
108
font-family: 'Arial', sans-serif;
11-
display: flex;
12-
justify-content: center;
13-
align-items: center;
14-
height: 100vh;
159
background-color: var(--color-background);
1610
margin: 0;
1711
padding: 0;
1812
color: #333;
13+
display: flex;
14+
justify-content: center;
15+
align-items: center;
16+
height: 100vh;
1917
}
2018

2119
.app-container {
@@ -31,6 +29,7 @@ body {
3129
.title {
3230
color: var(--color-primary);
3331
margin-bottom: 20px;
32+
font-size: 1.5em;
3433
}
3534

3635
.status-message {
@@ -61,16 +60,16 @@ label {
6160
.slider::-webkit-slider-thumb {
6261
-webkit-appearance: none;
6362
appearance: none;
64-
width: 20px;
65-
height: 20px;
63+
width: 30px;
64+
height: 30px;
6665
border-radius: 50%;
6766
background: var(--color-primary);
6867
cursor: pointer;
6968
}
7069

7170
.slider::-moz-range-thumb {
72-
width: 20px;
73-
height: 20px;
71+
width: 30px;
72+
height: 30px;
7473
border-radius: 50%;
7574
background: var(--color-primary);
7675
cursor: pointer;
@@ -88,25 +87,47 @@ label {
8887
background-color: #007bff;
8988
height: 100%;
9089
width: 0%;
91-
transition: width 0.01s ease-out;
92-
}
93-
94-
.smooth-transition {
9590
transition: width 0.5s ease-out;
9691
}
9792

9893
.control-button {
99-
padding: 10px 20px;
94+
padding: 15px 30px;
10095
background-color: var(--color-primary);
10196
color: white;
10297
border: none;
10398
border-radius: 5px;
10499
cursor: pointer;
105-
font-size: 1em;
100+
font-size: 1.2em;
106101
margin-top: 20px;
107102
transition: background-color 0.3s;
108103
}
109104

110105
.control-button:hover {
111106
background-color: var(--color-accent);
112-
}
107+
}
108+
109+
@media (max-width: 600px) {
110+
.app-container {
111+
width: 100%;
112+
padding: 10px;
113+
border-radius: 5px;
114+
box-shadow: none;
115+
}
116+
117+
.title {
118+
font-size: 1.8em;
119+
}
120+
121+
.status-message {
122+
font-size: 1.4em;
123+
}
124+
125+
.slider-container, .progress-container {
126+
padding: 0 10px;
127+
}
128+
129+
.control-button {
130+
width: 80%;
131+
margin: 10px auto;
132+
}
133+
}

0 commit comments

Comments
 (0)