Compare commits
5 Commits
a0493c4733
...
master
Author | SHA1 | Date | |
---|---|---|---|
2438d6864b | |||
2511d558f8 | |||
3db8f07621 | |||
0546ebd09c | |||
aa11bcb13d |
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
BIN
assets/speaker.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 421 B |
39
index.css
39
index.css
@@ -127,3 +127,42 @@ td {
|
||||
width: 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;
|
||||
}
|
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<title>Sluchová hra</title>
|
||||
<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="index.js"></script>
|
||||
</head>
|
||||
@@ -70,6 +70,12 @@
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<label class="switch" id="switchcontaineraudio">
|
||||
<input type="checkbox" id="audiocheckbox" checked>
|
||||
<span class="slider fixbgimage" id="visualcheckbox"></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
9
index.js
9
index.js
@@ -294,7 +294,9 @@ function showImages(word) {
|
||||
$(".imageholderak, .letterholderak").each(function(){
|
||||
$(this).on("click", function (e){
|
||||
let datacode = $(this).attr("datacode");
|
||||
if ($("#audiocheckbox").prop('checked')){
|
||||
document.getElementById("audplay"+ datacode).play();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
@@ -340,6 +342,7 @@ function generateItem(word){
|
||||
try{
|
||||
umami.trackEvent('Listened to image', { type: 'listenimage', datacode: $(this).attr("datacode") });
|
||||
} catch(e) {}
|
||||
|
||||
document.getElementById("audplayitem"+ datacode).play();
|
||||
})
|
||||
});
|
||||
@@ -360,10 +363,6 @@ function generatePair(){
|
||||
$(function() {
|
||||
generatePair();
|
||||
|
||||
$("#audiopart").on("click", function (){
|
||||
document.getElementById("audplay").play();
|
||||
});
|
||||
|
||||
$("#verify").on("click", checkAnswers);
|
||||
|
||||
$("#trashcan").on("click", cleanup);
|
||||
@@ -385,7 +384,9 @@ function drag(ev) {
|
||||
ev.dataTransfer.setData("datacode", ev.target.getAttribute("datacode"));
|
||||
ev.dataTransfer.setData("classy", ev.target.classList);
|
||||
let datacode = $(ev.target).attr("datacode");
|
||||
if ($("#audiocheckbox").prop('checked')){
|
||||
document.getElementById("audplay"+ datacode).play();
|
||||
}
|
||||
if (ev.target.parentElement.classList.contains("originalplace")){
|
||||
ev.dataTransfer.setData("dragfromoriginal", "YES");
|
||||
}
|
||||
|
Reference in New Issue
Block a user