Spaces:
Running
Running
alessandro trinca tornidor
commited on
Commit
·
2082b80
1
Parent(s):
d89ea65
style: fix css on mobile devices for webApp interface
Browse files- static/css/style-new.css +104 -14
- templates/main.html +9 -13
static/css/style-new.css
CHANGED
@@ -75,6 +75,12 @@ a.disabled {
|
|
75 |
white-space: normal;
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
/* ############## Next button ##### */
|
79 |
.button-next {
|
80 |
border-radius: 4px;
|
@@ -129,6 +135,9 @@ a.disabled {
|
|
129 |
|
130 |
|
131 |
/* ############# Texts ############## */
|
|
|
|
|
|
|
132 |
|
133 |
.main-text {
|
134 |
font-size: 2.5em;
|
@@ -158,6 +167,14 @@ a.disabled {
|
|
158 |
left: 0%;
|
159 |
}
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
.main-text-div {
|
162 |
overflow-y: auto;
|
163 |
position: absolute;
|
@@ -198,6 +215,20 @@ a.disabled {
|
|
198 |
|
199 |
/* ############# Icon Button ############## */
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
.round-button {
|
202 |
box-sizing: border-box;
|
203 |
display: block;
|
@@ -484,25 +515,27 @@ a.disabled {
|
|
484 |
|
485 |
/* ######## Switch ############## */
|
486 |
@media only screen and (max-width: 1200px) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
.round-button {
|
488 |
-
box-sizing: border-box;
|
489 |
-
display: block;
|
490 |
width: 2em;
|
491 |
/* 80px */
|
492 |
height: 2em;
|
493 |
-
left:
|
494 |
padding-top: 0.3em;
|
495 |
-
padding-left:
|
496 |
-
line-height:
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
background-color: #467387;
|
503 |
-
font-size: 1em;
|
504 |
-
font-weight: bold;
|
505 |
-
transition: all 0.3s ease;
|
506 |
}
|
507 |
|
508 |
.container {
|
@@ -580,6 +613,10 @@ a.disabled {
|
|
580 |
font-size: 2.5em !important;
|
581 |
}
|
582 |
|
|
|
|
|
|
|
|
|
583 |
.accuracy-text {
|
584 |
font-family: "Dank Mono", ui-monospace, monospace;
|
585 |
background: linear-gradient(to right,
|
@@ -593,4 +630,57 @@ a.disabled {
|
|
593 |
font-size: 0.8em;
|
594 |
}
|
595 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
}
|
|
|
75 |
white-space: normal;
|
76 |
}
|
77 |
|
78 |
+
#radio-difficulty {
|
79 |
+
position: fixed;
|
80 |
+
top: 95%;
|
81 |
+
left: 2%;
|
82 |
+
}
|
83 |
+
|
84 |
/* ############## Next button ##### */
|
85 |
.button-next {
|
86 |
border-radius: 4px;
|
|
|
135 |
|
136 |
|
137 |
/* ############# Texts ############## */
|
138 |
+
#use-it-in-landscape {
|
139 |
+
display: none;
|
140 |
+
}
|
141 |
|
142 |
.main-text {
|
143 |
font-size: 2.5em;
|
|
|
167 |
left: 0%;
|
168 |
}
|
169 |
|
170 |
+
#pronunciation_accuracy {
|
171 |
+
color: black;
|
172 |
+
position: absolute;
|
173 |
+
top: 27%;
|
174 |
+
font-size: 2em;
|
175 |
+
left: -1%;
|
176 |
+
}
|
177 |
+
|
178 |
.main-text-div {
|
179 |
overflow-y: auto;
|
180 |
position: absolute;
|
|
|
215 |
|
216 |
/* ############# Icon Button ############## */
|
217 |
|
218 |
+
.playButton {
|
219 |
+
color:white;
|
220 |
+
text-align:center;
|
221 |
+
position: absolute;
|
222 |
+
}
|
223 |
+
|
224 |
+
#playRecordedAudio {
|
225 |
+
top: 2%;
|
226 |
+
}
|
227 |
+
#playRecordedAudio {
|
228 |
+
top: 15%;
|
229 |
+
}
|
230 |
+
/* color:white; text-align:center; position: absolute; top: 15%; */
|
231 |
+
|
232 |
.round-button {
|
233 |
box-sizing: border-box;
|
234 |
display: block;
|
|
|
515 |
|
516 |
/* ######## Switch ############## */
|
517 |
@media only screen and (max-width: 1200px) {
|
518 |
+
.main-container {
|
519 |
+
font-size: 0.75em;
|
520 |
+
}
|
521 |
+
|
522 |
+
.container-dtw-div {
|
523 |
+
font-size: 0.75em;
|
524 |
+
}
|
525 |
+
|
526 |
.round-button {
|
|
|
|
|
527 |
width: 2em;
|
528 |
/* 80px */
|
529 |
height: 2em;
|
530 |
+
left: 1%;
|
531 |
padding-top: 0.3em;
|
532 |
+
padding-left: 0;
|
533 |
+
line-height: 0;
|
534 |
+
font-size: 1.2em;
|
535 |
+
}
|
536 |
+
|
537 |
+
.playButton {
|
538 |
+
font-size: 2em;
|
|
|
|
|
|
|
|
|
539 |
}
|
540 |
|
541 |
.container {
|
|
|
613 |
font-size: 2.5em !important;
|
614 |
}
|
615 |
|
616 |
+
#pronunciation_accuracy {
|
617 |
+
left: -1%;
|
618 |
+
}
|
619 |
+
|
620 |
.accuracy-text {
|
621 |
font-family: "Dank Mono", ui-monospace, monospace;
|
622 |
background: linear-gradient(to right,
|
|
|
630 |
font-size: 0.8em;
|
631 |
}
|
632 |
|
633 |
+
}
|
634 |
+
|
635 |
+
@media only screen and (max-width: 950px) and (max-aspect-ratio: 0.7) and (orientation: portrait) {
|
636 |
+
#use-it-in-landscape {
|
637 |
+
display: block;
|
638 |
+
background-color: #467387;
|
639 |
+
color: white;
|
640 |
+
font-size: 2em;
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
/* DON'T show the warning message on big devices in portrait mode */
|
645 |
+
@media only screen and (min-height: 930px) and (max-aspect-ratio: 0.7) and (orientation: portrait) {
|
646 |
+
#use-it-in-landscape {
|
647 |
+
display: none;
|
648 |
+
}
|
649 |
+
}
|
650 |
+
@media only screen and (min-width: 930px) and (max-aspect-ratio: 0.7) and (orientation: portrait) {
|
651 |
+
#use-it-in-landscape {
|
652 |
+
display: none;
|
653 |
+
}
|
654 |
+
}
|
655 |
+
|
656 |
+
@media only screen and (max-width: 950px) {
|
657 |
+
.container-dtw-div {
|
658 |
+
top: 80%;
|
659 |
+
}
|
660 |
+
|
661 |
+
.playButton {
|
662 |
+
font-size: 1.5em;
|
663 |
+
}
|
664 |
+
|
665 |
+
#pronunciation_accuracy {
|
666 |
+
margin-top: 4px;
|
667 |
+
font-size: 1.3em;
|
668 |
+
left: 0;
|
669 |
+
}
|
670 |
+
|
671 |
+
.main-text-div {
|
672 |
+
left: 14%;
|
673 |
+
}
|
674 |
+
|
675 |
+
#container-uploader-player-audio {
|
676 |
+
left: 27%;
|
677 |
+
}
|
678 |
+
|
679 |
+
#radio-difficulty {
|
680 |
+
top: 90%;
|
681 |
+
}
|
682 |
+
|
683 |
+
.credits-icon-div {
|
684 |
+
top: 88%;
|
685 |
+
}
|
686 |
}
|
templates/main.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33 |
|
34 |
<body style="height: 100%; width: 100%; background-color: white; max-width: 90%;">
|
35 |
|
36 |
-
<div>
|
37 |
|
38 |
<div style="display:flex; flex-direction: row;">
|
39 |
|
@@ -42,8 +42,7 @@
|
|
42 |
<i class="material-icons icon-text-home" style="text-align: right;" onclick="history.go(0)">home</i>
|
43 |
</div>
|
44 |
|
45 |
-
<h1 id='main_title'> AI Pronunciation Trainer
|
46 |
-
</h1>
|
47 |
</div>
|
48 |
|
49 |
|
@@ -82,16 +81,13 @@
|
|
82 |
|
83 |
<div class="horizontal-flexbox" style="position: absolute; top: 2%; ">
|
84 |
|
85 |
-
<a id="playSampleAudio" aria-label="playSampleAudio" href="javascript:playAudio()" class="round-button disabled"
|
86 |
-
position: absolute; top: 2%; "><i class="material-icons icon-text">play_arrow</i>
|
87 |
</a>
|
88 |
|
89 |
-
<a id="playRecordedAudio" aria-label="playRecordedAudio" href="javascript:playRecording()" class="round-button disabled"
|
90 |
-
style="color:white; text-align:center; position: absolute; top: 15%; "><i
|
91 |
class="material-icons icon-text">record_voice_over</i>
|
92 |
</a>
|
93 |
-
<p id="pronunciation_accuracy" aria-label="pronunciation_accuracy" class="expanded accuracy-text"
|
94 |
-
style="color: black; position: absolute; top: 27%; margin-left: 0; font-size: 2em"><span>%</span>
|
95 |
</p>
|
96 |
|
97 |
<div id="text-button-div" class="text-button-div">
|
@@ -110,6 +106,7 @@
|
|
110 |
|
111 |
<div id="text-area" class="main-text-div">
|
112 |
|
|
|
113 |
<p id="original_script" aria-label="original_script" class=" bigger-text text-primary main-text" contenteditable="plaintext-only">Click on the bar on the right to generate a new sentence (please use chrome web browser).</p>
|
114 |
<p id="ipa_script" aria-label="ipa_script" class="text-muted bigger-text ipa-text"> Before speaking, click on the mic button
|
115 |
below to start recording and then click again when you're done.
|
@@ -148,7 +145,7 @@
|
|
148 |
</div>
|
149 |
|
150 |
|
151 |
-
<div class="display-inline-block form-audio-file text-align-center">
|
152 |
<input
|
153 |
aria-label="input-uploader-audio-hidden"
|
154 |
id="input-uploader-audio-hidden"
|
@@ -175,7 +172,7 @@
|
|
175 |
</div>
|
176 |
|
177 |
|
178 |
-
<div id="radio-difficulty" class="radio
|
179 |
<input label="Random" type="radio" aria-label="Random" id="lengthCat1" name='length' onclick="getNextSample()">
|
180 |
<input label="Easy" type="radio" aria-label="Easy" id="lengthCat2" name='length' checked onclick="getNextSample()">
|
181 |
<input label="Medium" type="radio" aria-label="Medium" id="lengthCat3" name='length' onclick="getNextSample()">
|
@@ -185,8 +182,7 @@
|
|
185 |
</div>
|
186 |
|
187 |
|
188 |
-
<p class="credits-icon-div">By Thiago
|
189 |
-
Lobato.</p>
|
190 |
|
191 |
<div class="link-icon-div">
|
192 |
<a href="https://github.com/Thiagohgl/ai-pronunciation-trainer" target=”_blank”
|
|
|
33 |
|
34 |
<body style="height: 100%; width: 100%; background-color: white; max-width: 90%;">
|
35 |
|
36 |
+
<div class="main-container" id="main-container">
|
37 |
|
38 |
<div style="display:flex; flex-direction: row;">
|
39 |
|
|
|
42 |
<i class="material-icons icon-text-home" style="text-align: right;" onclick="history.go(0)">home</i>
|
43 |
</div>
|
44 |
|
45 |
+
<h1 id='main_title'> AI Pronunciation Trainer</h1>
|
|
|
46 |
</div>
|
47 |
|
48 |
|
|
|
81 |
|
82 |
<div class="horizontal-flexbox" style="position: absolute; top: 2%; ">
|
83 |
|
84 |
+
<a id="playSampleAudio" aria-label="playSampleAudio" href="javascript:playAudio()" class="round-button disabled playButton"><i class="material-icons icon-text">play_arrow</i>
|
|
|
85 |
</a>
|
86 |
|
87 |
+
<a id="playRecordedAudio" aria-label="playRecordedAudio" href="javascript:playRecording()" class="round-button disabled playButton"><i
|
|
|
88 |
class="material-icons icon-text">record_voice_over</i>
|
89 |
</a>
|
90 |
+
<p id="pronunciation_accuracy" aria-label="pronunciation_accuracy" class="expanded accuracy-text"><span>%</span>
|
|
|
91 |
</p>
|
92 |
|
93 |
<div id="text-button-div" class="text-button-div">
|
|
|
106 |
|
107 |
<div id="text-area" class="main-text-div">
|
108 |
|
109 |
+
<p id="use-it-in-landscape">On mobile devices use this app in landscape mode!</p>
|
110 |
<p id="original_script" aria-label="original_script" class=" bigger-text text-primary main-text" contenteditable="plaintext-only">Click on the bar on the right to generate a new sentence (please use chrome web browser).</p>
|
111 |
<p id="ipa_script" aria-label="ipa_script" class="text-muted bigger-text ipa-text"> Before speaking, click on the mic button
|
112 |
below to start recording and then click again when you're done.
|
|
|
145 |
</div>
|
146 |
|
147 |
|
148 |
+
<div class="display-inline-block form-audio-file text-align-center" id="container-uploader-player-audio">
|
149 |
<input
|
150 |
aria-label="input-uploader-audio-hidden"
|
151 |
id="input-uploader-audio-hidden"
|
|
|
172 |
</div>
|
173 |
|
174 |
|
175 |
+
<div id="radio-difficulty" class="radio radio-difficulty">
|
176 |
<input label="Random" type="radio" aria-label="Random" id="lengthCat1" name='length' onclick="getNextSample()">
|
177 |
<input label="Easy" type="radio" aria-label="Easy" id="lengthCat2" name='length' checked onclick="getNextSample()">
|
178 |
<input label="Medium" type="radio" aria-label="Medium" id="lengthCat3" name='length' onclick="getNextSample()">
|
|
|
182 |
</div>
|
183 |
|
184 |
|
185 |
+
<p class="credits-icon-div">By Thiago Lobato <br/>with contributions by <a href="https://trinca.tornidor.com">Alessandro Trinca Tornidor</a>.</p>
|
|
|
186 |
|
187 |
<div class="link-icon-div">
|
188 |
<a href="https://github.com/Thiagohgl/ai-pronunciation-trainer" target=”_blank”
|