some update

This commit is contained in:
Bruno Rybársky 2023-04-02 11:53:55 +02:00
parent b13343ed12
commit a0fa32f444
No known key found for this signature in database
GPG Key ID: DFE2C061EF985CD4
87 changed files with 113 additions and 24 deletions

BIN
assets/fail.ogg Normal file

Binary file not shown.

BIN
assets/good.ogg Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/CH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

44
assets/images/gen.sh Normal file

@ -0,0 +1,44 @@
convert -size 32x32 xc:rgb\(0,0,0\) A.png
convert -size 32x32 xc:rgb\(5,209,116\) Á.png
convert -size 32x32 xc:rgb\(11,162,232\) Ä.png
convert -size 32x32 xc:rgb\(17,116,92\) B.png
convert -size 32x32 xc:rgb\(23,69,208\) C.png
convert -size 32x32 xc:rgb\(29,23,68\) Č.png
convert -size 32x32 xc:rgb\(34,232,184\) D.png
convert -size 32x32 xc:rgb\(40,186,44\) Ď.png
convert -size 32x32 xc:rgb\(46,139,160\) E.png
convert -size 32x32 xc:rgb\(52,93,20\) É.png
convert -size 32x32 xc:rgb\(58,46,136\) F.png
convert -size 32x32 xc:rgb\(63,255,252\) G.png
convert -size 32x32 xc:rgb\(69,209,112\) H.png
convert -size 32x32 xc:rgb\(75,162,228\) CH.png
convert -size 32x32 xc:rgb\(81,116,88\) I.png
convert -size 32x32 xc:rgb\(87,69,204\) Í.png
convert -size 32x32 xc:rgb\(93,23,64\) J.png
convert -size 32x32 xc:rgb\(98,232,180\) K.png
convert -size 32x32 xc:rgb\(104,186,40\) L.png
convert -size 32x32 xc:rgb\(110,139,156\) Ĺ.png
convert -size 32x32 xc:rgb\(116,93,16\) Ľ.png
convert -size 32x32 xc:rgb\(122,46,132\) M.png
convert -size 32x32 xc:rgb\(127,255,248\) N.png
convert -size 32x32 xc:rgb\(133,209,108\) Ň.png
convert -size 32x32 xc:rgb\(139,162,224\) O.png
convert -size 32x32 xc:rgb\(145,116,84\) Ó.png
convert -size 32x32 xc:rgb\(151,69,200\) Ô.png
convert -size 32x32 xc:rgb\(157,23,60\) P.png
convert -size 32x32 xc:rgb\(162,232,176\) Q.png
convert -size 32x32 xc:rgb\(168,186,36\) R.png
convert -size 32x32 xc:rgb\(174,139,152\) Ŕ.png
convert -size 32x32 xc:rgb\(180,93,12\) S.png
convert -size 32x32 xc:rgb\(186,46,128\) Š.png
convert -size 32x32 xc:rgb\(191,255,244\) T.png
convert -size 32x32 xc:rgb\(197,209,104\) Ť.png
convert -size 32x32 xc:rgb\(203,162,220\) U.png
convert -size 32x32 xc:rgb\(209,116,80\) Ú.png
convert -size 32x32 xc:rgb\(215,69,196\) V.png
convert -size 32x32 xc:rgb\(221,23,56\) W.png
convert -size 32x32 xc:rgb\(226,232,172\) X.png
convert -size 32x32 xc:rgb\(232,186,32\) Y.png
convert -size 32x32 xc:rgb\(238,139,148\) Ý.png
convert -size 32x32 xc:rgb\(244,93,8\) Z.png
convert -size 32x32 xc:rgb\(250,46,124\) Ž.png

@ -7,7 +7,7 @@ def getRGBfromI(RGBint):
mx = pow(2,24)-1 # i.e. 16777215
x = 0
alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
alphabet = ["A", "Á", "Ä", "B", "C", "Č", "D", "Ď", "E", "É", "F", "G", "H", "CH", "I", "Í", "J", "K", "L", "Ĺ", "Ľ", "M", "N", "Ň", "O", "Ó", "Ô", "P", "Q", "R", "Ŕ", "S", "Š", "T", "Ť", "U", "Ú", "V", "W", "X", "Y", "Ý", "Z", "Ž"]
interval = int(mx/(len(alphabet)))
with open("gen.sh", "w") as f:
for i in range(0, len(alphabet)):

BIN
assets/images/Á.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ä.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/É.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Í.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ó.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ô.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ú.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ý.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Č.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ď.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ĺ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ľ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ň.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ŕ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Š.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ť.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

BIN
assets/images/Ž.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

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: 667 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 939 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

@ -17,26 +17,27 @@ body {
}
.place {
width: 32px;
height: 32px;
width: 64px;
height: 64px;
background-color: lightgray;
}
#audiopart {
background-color: transparent;
background-image: url("assets/play.png");
.fixbgimage{
image-rendering: pixelated;
background-repeat: no-repeat;
background-size: cover;
}
#trashcan {
width: 32px;
height: 32px;
width: 64px;
height: 64px;
background-color: red;
background-image: url("assets/trashcan.png");
}
#verify {
width: 32px;
height: 32px;
width: 64px;
height: 64px;
background-image: url("assets/verify.png");
background-color: darksalmon;
}
@ -51,6 +52,10 @@ body {
th,
td {
padding: 16px;
width: 64px;
height: 64px;
overflow: hidden;
display: inline-block;
}
.itemcont {
@ -68,9 +73,12 @@ td {
position: relative;
}
.itemstor>* {
.itemstor>div {
margin: 16px;
}
.itemstor>div>p {
margin: 0px;
}
#vzoritem {
bottom: 4%;
@ -78,3 +86,17 @@ td {
position: absolute;
z-index: 2;
}
.lettervec{
font-family: 'Courier New', monospace;
font-size: 64px;
width: 64px;
height: 64px;
text-align: center;
margin: 0px;
background-color:white;
}
.imagevec{
width: 64px;
height: 64px;
}

@ -7,6 +7,12 @@
<script data-website-id="11366cfe-e3d4-4b98-a19f-7ed471a37f71" src="https://umami.brn.systems/umami.js"></script>
<script src="jquery.min.js"></script>
<script src="index.js"></script>
<audio id="goodaudio">
<source src="assets/good.ogg" type="audio/ogg">
</audio>
<audio id="failaudio">
<source src="assets/fail.ogg" type="audio/ogg">
</audio>
</head>
<body>
<div id="imagecontainer" class="itemcont">
@ -26,14 +32,14 @@
<tbody>
<tr>
<td>
<div id="verify" class="activepart">
<div id="verify" class="activepart fixbgimage">
</div>
</td>
</tr>
<tr>
<td>
<div id="trashcan" class="activepart" ondrop="droptrash(event)" ondragover="allowDrop(event)"></div>
<div id="trashcan" class="fixbgimage activepart" ondrop="droptrash(event)" ondragover="allowDrop(event)"></div>
</div>
</td>

@ -2,7 +2,7 @@ var ranid = 1;
var cntdrag = 1;
let data_tabl = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
let data_tabl = ["A", "Á", "Ä", "B", "C", "Č", "D", "Ď", "E", "É", "F", "G", "H", "I", "Í", "J", "K", "L", "Ĺ", "Ľ", "M", "N", "Ň", "O", "Ó", "Ô", "P", "Q", "R", "Ŕ", "S", "Š", "T", "Ť", "U", "Ú", "V", "W", "X", "Y", "Ý", "Z", "];
let tocount = 10;
@ -69,7 +69,7 @@ function checkAnswers() {
imagecodes = imagecodes + $(this).attr("datacode");
});
$(".finalletterplace").find("img").each(function (){
$(".finalletterplace").find("p").each(function (){
lettercodes = lettercodes + $(this).attr("datacode");
});
@ -111,11 +111,13 @@ function checkAnswers() {
try{
umami.trackEvent('Successful round', { type: 'successround' });
} catch(e) {}
document.getElementById("goodaudio").play();
}
else{
try{
umami.trackEvent('Unsuccessful round', { type: 'failround' });
} catch(e) {}
document.getElementById("failaudio").play();
}
try{
umami.trackEvent("Round data", { type: 'rounddata', Vzor: vzorcodes, Lettercodes: lettercodes, Imagecodes: imagecodes });
@ -201,7 +203,7 @@ function showImages(word) {
ranid += 1;
letters.push(
"<div returntarget=\"" + ranid + "\" ranid=\"" + ranid + "\" ondrop=\"drop(event)\" ondragover=\"allowDrop(event)\" id=\"letterholderak" + ranid + "\" datacode=\"" + tmp_tabl[i] + "\" class=\"place originalplace grid-item holderak letterholderak\">" +
"<img returnto=\"" + ranid + "\" datacode=\"" + tmp_tabl[i] + "\" draggable=\"true\" ondragstart=\"drag(event)\" class=\"lettervec\" src=\"" + letterpath + "\" />" +
"<p returnto=\"" + ranid + "\" datacode=\"" + tmp_tabl[i] + "\" draggable=\"true\" ondragstart=\"drag(event)\" class=\"lettervec\">" + tmp_tabl[i] + "</p>" +
"</div>"
);
ranid += 1;
@ -341,6 +343,12 @@ function drag(ev) {
ev.dataTransfer.setData("classy", ev.target.classList);
let datacode = $(ev.target).attr("datacode");
document.getElementById("audplay"+ datacode).play();
if (ev.target.parentElement.classList.contains("originalplace")){
ev.dataTransfer.setData("dragfromoriginal", "YES");
}
else{
ev.dataTransfer.setData("dragfromoriginal", "NO");
}
if (ev.target.classList.contains("imagevec")){
try{
umami.trackEvent('Dragged sign', { type: 'draggedsign', datacode: ev.target.getAttribute("datacode") });
@ -359,26 +367,35 @@ function drop(ev) {
let cntdrag = ev.dataTransfer.getData("cntdrag");
let classy = ev.dataTransfer.getData("classy");
let datacode = ev.dataTransfer.getData("datacode");
let dragfromoriginal = ev.dataTransfer.getData("dragfromoriginal");
if (ev.target.classList.contains("letterplace")){
if (!classy.includes("lettervec")){
return;
}
}
if (ev.target.parentElement.classList.contains("originalplace")){
return;
}
if (ev.target.classList.contains("imageplace")){
if (!classy.includes("imagevec")){
return;
}
}
if (!ev.target.outerHTML.includes("img")){
//$('[cntdrag="' + cntdrag + '"]').remove();
if (ev.target.parentElement.innerHTML.includes("<img")){
return;
}
if (ev.target.parentElement.innerHTML.includes("<p")){
return;
}
if (dragfromoriginal == "NO"){
$('[cntdrag="' + cntdrag + '"]').remove();
}
ev.target.setAttribute("datacode", datacode);
ev.target.setAttribute("cntdrag", cntdrag);
cntdrag += 1;
ev.target.innerHTML = data;
}
else{
let htmldata = ev.dataTransfer.getData("text");
let returnto = ev.dataTransfer.getData("returnto");
//$('[returntarget="' + returnto + '"]').html(htmldata);
}
if (classy.includes("imagevec")){
try{
umami.trackEvent('Dropped sign', { type: 'droppedsign', datacode: ev.target.getAttribute("datacode") });