Compare commits

..

5 Commits

Author SHA1 Message Date
2438d6864b update tracking 2023-06-12 21:52:44 +02:00
2511d558f8 Change speaker icon 2023-05-02 13:56:16 +02:00
3db8f07621 Add advanced mode 2023-05-02 08:08:50 +02:00
0546ebd09c fix mistake 2023-04-27 08:35:09 +02:00
aa11bcb13d asset update 2023-04-24 20:26:14 +02:00
65 changed files with 59 additions and 13 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/speaker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

View File

@@ -126,4 +126,43 @@ td {
#currentvzor{ #currentvzor{
width: unset; width: unset;
height: unset; height: unset;
} }
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 128px;
height: 128px;
}
/* Hide default HTML checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 128px;
height: 128px;
background-color: red;
background-image: url("assets/speaker.png");
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #00FF00 !important;
}
input:focus + .slider {
box-shadow: 0 0 1px #00FF00 !important;
}

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>Sluchová hra</title> <title>Sluchová hra</title>
<link rel="stylesheet" href="index.css" type="text/css"/> <link rel="stylesheet" href="index.css" type="text/css"/>
<script data-website-id="11366cfe-e3d4-4b98-a19f-7ed471a37f71" src="https://umami.brn.systems/umami.js"></script> <script data-website-id="11366cfe-e3d4-4b98-a19f-7ed471a37f71" src="https://umami.brn.systems/script.js"></script>
<script src="jquery.min.js"></script> <script src="jquery.min.js"></script>
<script src="index.js"></script> <script src="index.js"></script>
</head> </head>
@@ -70,6 +70,12 @@
</div> </div>
</td> </td>
<td>
<label class="switch" id="switchcontaineraudio">
<input type="checkbox" id="audiocheckbox" checked>
<span class="slider fixbgimage" id="visualcheckbox"></span>
</label>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@@ -294,7 +294,9 @@ function showImages(word) {
$(".imageholderak, .letterholderak").each(function(){ $(".imageholderak, .letterholderak").each(function(){
$(this).on("click", function (e){ $(this).on("click", function (e){
let datacode = $(this).attr("datacode"); let datacode = $(this).attr("datacode");
document.getElementById("audplay"+ datacode).play(); if ($("#audiocheckbox").prop('checked')){
document.getElementById("audplay"+ datacode).play();
}
}) })
}); });
} }
@@ -336,11 +338,12 @@ function generateItem(word){
$(".itemholderak").each(function(){ $(".itemholderak").each(function(){
$(this).on("click", function (e){ $(this).on("click", function (e){
let datacode = $(this).attr("datacode"); let datacode = $(this).attr("datacode");
try{ try{
umami.trackEvent('Listened to image', { type: 'listenimage', datacode: $(this).attr("datacode") }); umami.trackEvent('Listened to image', { type: 'listenimage', datacode: $(this).attr("datacode") });
} catch(e) {} } catch(e) {}
document.getElementById("audplayitem"+ datacode).play();
document.getElementById("audplayitem"+ datacode).play();
}) })
}); });
@@ -360,10 +363,6 @@ function generatePair(){
$(function() { $(function() {
generatePair(); generatePair();
$("#audiopart").on("click", function (){
document.getElementById("audplay").play();
});
$("#verify").on("click", checkAnswers); $("#verify").on("click", checkAnswers);
$("#trashcan").on("click", cleanup); $("#trashcan").on("click", cleanup);
@@ -385,7 +384,9 @@ function drag(ev) {
ev.dataTransfer.setData("datacode", ev.target.getAttribute("datacode")); ev.dataTransfer.setData("datacode", ev.target.getAttribute("datacode"));
ev.dataTransfer.setData("classy", ev.target.classList); ev.dataTransfer.setData("classy", ev.target.classList);
let datacode = $(ev.target).attr("datacode"); let datacode = $(ev.target).attr("datacode");
document.getElementById("audplay"+ datacode).play(); if ($("#audiocheckbox").prop('checked')){
document.getElementById("audplay"+ datacode).play();
}
if (ev.target.parentElement.classList.contains("originalplace")){ if (ev.target.parentElement.classList.contains("originalplace")){
ev.dataTransfer.setData("dragfromoriginal", "YES"); ev.dataTransfer.setData("dragfromoriginal", "YES");
} }