diff --git a/assets/fail.ogg b/assets/fail.ogg new file mode 100644 index 0000000..83d11b7 Binary files /dev/null and b/assets/fail.ogg differ diff --git a/assets/good.ogg b/assets/good.ogg new file mode 100644 index 0000000..92f4db0 Binary files /dev/null and b/assets/good.ogg differ diff --git a/assets/images/A.png b/assets/images/A.png index b6499c9..e388b21 100644 Binary files a/assets/images/A.png and b/assets/images/A.png differ diff --git a/assets/images/B.png b/assets/images/B.png index 0bb94a0..531c65c 100644 Binary files a/assets/images/B.png and b/assets/images/B.png differ diff --git a/assets/images/C.png b/assets/images/C.png index f2b50e4..7b2eec1 100644 Binary files a/assets/images/C.png and b/assets/images/C.png differ diff --git a/assets/images/CH.png b/assets/images/CH.png new file mode 100644 index 0000000..24d1f69 Binary files /dev/null and b/assets/images/CH.png differ diff --git a/assets/images/D.png b/assets/images/D.png index ae84faa..dfdca8f 100644 Binary files a/assets/images/D.png and b/assets/images/D.png differ diff --git a/assets/images/E.png b/assets/images/E.png index 2bf2df7..400760c 100644 Binary files a/assets/images/E.png and b/assets/images/E.png differ diff --git a/assets/images/F.png b/assets/images/F.png index 263c96e..1512b20 100644 Binary files a/assets/images/F.png and b/assets/images/F.png differ diff --git a/assets/images/G.png b/assets/images/G.png index 6320cc3..1c53c87 100644 Binary files a/assets/images/G.png and b/assets/images/G.png differ diff --git a/assets/images/H.png b/assets/images/H.png index 7fc809a..8fe464b 100644 Binary files a/assets/images/H.png and b/assets/images/H.png differ diff --git a/assets/images/I.png b/assets/images/I.png index 7818169..257d112 100644 Binary files a/assets/images/I.png and b/assets/images/I.png differ diff --git a/assets/images/J.png b/assets/images/J.png index 17b1cf7..499dd52 100644 Binary files a/assets/images/J.png and b/assets/images/J.png differ diff --git a/assets/images/K.png b/assets/images/K.png index fd3c2b3..5497d3c 100644 Binary files a/assets/images/K.png and b/assets/images/K.png differ diff --git a/assets/images/L.png b/assets/images/L.png index 981c7fa..178888a 100644 Binary files a/assets/images/L.png and b/assets/images/L.png differ diff --git a/assets/images/M.png b/assets/images/M.png index fdc11be..ed396fd 100644 Binary files a/assets/images/M.png and b/assets/images/M.png differ diff --git a/assets/images/N.png b/assets/images/N.png index 8cc9586..0b7eeed 100644 Binary files a/assets/images/N.png and b/assets/images/N.png differ diff --git a/assets/images/O.png b/assets/images/O.png index 846a83a..39ff368 100644 Binary files a/assets/images/O.png and b/assets/images/O.png differ diff --git a/assets/images/P.png b/assets/images/P.png index cf9570b..273f003 100644 Binary files a/assets/images/P.png and b/assets/images/P.png differ diff --git a/assets/images/Q.png b/assets/images/Q.png index c80438a..0e980b5 100644 Binary files a/assets/images/Q.png and b/assets/images/Q.png differ diff --git a/assets/images/R.png b/assets/images/R.png index 0f40cd4..89459fd 100644 Binary files a/assets/images/R.png and b/assets/images/R.png differ diff --git a/assets/images/S.png b/assets/images/S.png index 39784dd..b2116c1 100644 Binary files a/assets/images/S.png and b/assets/images/S.png differ diff --git a/assets/images/T.png b/assets/images/T.png index 782e58a..c119ad1 100644 Binary files a/assets/images/T.png and b/assets/images/T.png differ diff --git a/assets/images/U.png b/assets/images/U.png index 46655f6..28099e6 100644 Binary files a/assets/images/U.png and b/assets/images/U.png differ diff --git a/assets/images/V.png b/assets/images/V.png index c721396..6960a52 100644 Binary files a/assets/images/V.png and b/assets/images/V.png differ diff --git a/assets/images/W.png b/assets/images/W.png index af67ebe..6108f2c 100644 Binary files a/assets/images/W.png and b/assets/images/W.png differ diff --git a/assets/images/X.png b/assets/images/X.png index 1625092..ec8cbb8 100644 Binary files a/assets/images/X.png and b/assets/images/X.png differ diff --git a/assets/images/Y.png b/assets/images/Y.png index 95e3763..03d38e7 100644 Binary files a/assets/images/Y.png and b/assets/images/Y.png differ diff --git a/assets/images/Z.png b/assets/images/Z.png index fbcee17..557ddff 100644 Binary files a/assets/images/Z.png and b/assets/images/Z.png differ diff --git a/assets/images/gen.sh b/assets/images/gen.sh new file mode 100644 index 0000000..89478bd --- /dev/null +++ b/assets/images/gen.sh @@ -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 diff --git a/assets/images/imagegen.py b/assets/images/imagegen.py index 22fcbda..cf4ae24 100644 --- a/assets/images/imagegen.py +++ b/assets/images/imagegen.py @@ -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)): diff --git a/assets/images/Á.png b/assets/images/Á.png new file mode 100644 index 0000000..22a812d Binary files /dev/null and b/assets/images/Á.png differ diff --git a/assets/images/Ä.png b/assets/images/Ä.png new file mode 100644 index 0000000..de35def Binary files /dev/null and b/assets/images/Ä.png differ diff --git a/assets/images/É.png b/assets/images/É.png new file mode 100644 index 0000000..e59186a Binary files /dev/null and b/assets/images/É.png differ diff --git a/assets/images/Í.png b/assets/images/Í.png new file mode 100644 index 0000000..ef3cce3 Binary files /dev/null and b/assets/images/Í.png differ diff --git a/assets/images/Ó.png b/assets/images/Ó.png new file mode 100644 index 0000000..7ec2d02 Binary files /dev/null and b/assets/images/Ó.png differ diff --git a/assets/images/Ô.png b/assets/images/Ô.png new file mode 100644 index 0000000..eb6f671 Binary files /dev/null and b/assets/images/Ô.png differ diff --git a/assets/images/Ú.png b/assets/images/Ú.png new file mode 100644 index 0000000..a57ca95 Binary files /dev/null and b/assets/images/Ú.png differ diff --git a/assets/images/Ý.png b/assets/images/Ý.png new file mode 100644 index 0000000..1fd5e16 Binary files /dev/null and b/assets/images/Ý.png differ diff --git a/assets/images/Č.png b/assets/images/Č.png new file mode 100644 index 0000000..7859ae4 Binary files /dev/null and b/assets/images/Č.png differ diff --git a/assets/images/Ď.png b/assets/images/Ď.png new file mode 100644 index 0000000..cadd67c Binary files /dev/null and b/assets/images/Ď.png differ diff --git a/assets/images/Ĺ.png b/assets/images/Ĺ.png new file mode 100644 index 0000000..76735fe Binary files /dev/null and b/assets/images/Ĺ.png differ diff --git a/assets/images/Ľ.png b/assets/images/Ľ.png new file mode 100644 index 0000000..06ce775 Binary files /dev/null and b/assets/images/Ľ.png differ diff --git a/assets/images/Ň.png b/assets/images/Ň.png new file mode 100644 index 0000000..e6278e3 Binary files /dev/null and b/assets/images/Ň.png differ diff --git a/assets/images/Ŕ.png b/assets/images/Ŕ.png new file mode 100644 index 0000000..7788115 Binary files /dev/null and b/assets/images/Ŕ.png differ diff --git a/assets/images/Š.png b/assets/images/Š.png new file mode 100644 index 0000000..c3c7646 Binary files /dev/null and b/assets/images/Š.png differ diff --git a/assets/images/Ť.png b/assets/images/Ť.png new file mode 100644 index 0000000..3430197 Binary files /dev/null and b/assets/images/Ť.png differ diff --git a/assets/images/Ž.png b/assets/images/Ž.png new file mode 100644 index 0000000..f746c26 Binary files /dev/null and b/assets/images/Ž.png differ diff --git a/assets/items/AUDIO/BANKA.mp3 b/assets/items/AUDIO/BANKA.mp3 deleted file mode 100644 index c0faac5..0000000 Binary files a/assets/items/AUDIO/BANKA.mp3 and /dev/null differ diff --git a/assets/items/AUDIO/CHROBAK.mp3 b/assets/items/AUDIO/CHROBAK.mp3 deleted file mode 100644 index a3e0552..0000000 Binary files a/assets/items/AUDIO/CHROBAK.mp3 and /dev/null differ diff --git a/assets/items/AUDIO/CIZMY.mp3 b/assets/items/AUDIO/CIZMY.mp3 deleted file mode 100644 index 84b342d..0000000 Binary files a/assets/items/AUDIO/CIZMY.mp3 and /dev/null differ diff --git a/assets/items/AUDIO/STENA.mp3 b/assets/items/AUDIO/STENA.mp3 deleted file mode 100644 index 6cad940..0000000 Binary files a/assets/items/AUDIO/STENA.mp3 and /dev/null differ diff --git a/assets/items/AUDIO/TEHLA.mp3 b/assets/items/AUDIO/TEHLA.mp3 deleted file mode 100644 index 9e82ebd..0000000 Binary files a/assets/items/AUDIO/TEHLA.mp3 and /dev/null differ diff --git a/assets/items/BANKA.png b/assets/items/BANKA.png deleted file mode 100644 index 1c1fee4..0000000 Binary files a/assets/items/BANKA.png and /dev/null differ diff --git a/assets/items/CHROBAK.png b/assets/items/CHROBAK.png deleted file mode 100644 index edc5fc4..0000000 Binary files a/assets/items/CHROBAK.png and /dev/null differ diff --git a/assets/items/CIZMY.png b/assets/items/CIZMY.png deleted file mode 100644 index e6c7a9a..0000000 Binary files a/assets/items/CIZMY.png and /dev/null differ diff --git a/assets/items/STENA.png b/assets/items/STENA.png deleted file mode 100644 index 5cfff77..0000000 Binary files a/assets/items/STENA.png and /dev/null differ diff --git a/assets/items/TEHLA.png b/assets/items/TEHLA.png deleted file mode 100644 index 0aee8ec..0000000 Binary files a/assets/items/TEHLA.png and /dev/null differ diff --git a/assets/letters/A.png b/assets/letters/A.png deleted file mode 100644 index ed43dfc..0000000 Binary files a/assets/letters/A.png and /dev/null differ diff --git a/assets/letters/B.png b/assets/letters/B.png deleted file mode 100644 index 111b506..0000000 Binary files a/assets/letters/B.png and /dev/null differ diff --git a/assets/letters/C.png b/assets/letters/C.png deleted file mode 100644 index 011777f..0000000 Binary files a/assets/letters/C.png and /dev/null differ diff --git a/assets/letters/D.png b/assets/letters/D.png deleted file mode 100644 index 287079f..0000000 Binary files a/assets/letters/D.png and /dev/null differ diff --git a/assets/letters/E.png b/assets/letters/E.png deleted file mode 100644 index a7cd308..0000000 Binary files a/assets/letters/E.png and /dev/null differ diff --git a/assets/letters/F.png b/assets/letters/F.png deleted file mode 100644 index 601c985..0000000 Binary files a/assets/letters/F.png and /dev/null differ diff --git a/assets/letters/G.png b/assets/letters/G.png deleted file mode 100644 index 51f478f..0000000 Binary files a/assets/letters/G.png and /dev/null differ diff --git a/assets/letters/H.png b/assets/letters/H.png deleted file mode 100644 index a99a189..0000000 Binary files a/assets/letters/H.png and /dev/null differ diff --git a/assets/letters/I.png b/assets/letters/I.png deleted file mode 100644 index c618878..0000000 Binary files a/assets/letters/I.png and /dev/null differ diff --git a/assets/letters/J.png b/assets/letters/J.png deleted file mode 100644 index d6ce1bf..0000000 Binary files a/assets/letters/J.png and /dev/null differ diff --git a/assets/letters/K.png b/assets/letters/K.png deleted file mode 100644 index 644afa9..0000000 Binary files a/assets/letters/K.png and /dev/null differ diff --git a/assets/letters/L.png b/assets/letters/L.png deleted file mode 100644 index 86c367d..0000000 Binary files a/assets/letters/L.png and /dev/null differ diff --git a/assets/letters/M.png b/assets/letters/M.png deleted file mode 100644 index eb3636d..0000000 Binary files a/assets/letters/M.png and /dev/null differ diff --git a/assets/letters/N.png b/assets/letters/N.png deleted file mode 100644 index 3d4f420..0000000 Binary files a/assets/letters/N.png and /dev/null differ diff --git a/assets/letters/O.png b/assets/letters/O.png deleted file mode 100644 index 9a28e67..0000000 Binary files a/assets/letters/O.png and /dev/null differ diff --git a/assets/letters/P.png b/assets/letters/P.png deleted file mode 100644 index 2f8fe38..0000000 Binary files a/assets/letters/P.png and /dev/null differ diff --git a/assets/letters/Q.png b/assets/letters/Q.png deleted file mode 100644 index 0cac933..0000000 Binary files a/assets/letters/Q.png and /dev/null differ diff --git a/assets/letters/R.png b/assets/letters/R.png deleted file mode 100644 index a32a46a..0000000 Binary files a/assets/letters/R.png and /dev/null differ diff --git a/assets/letters/S.png b/assets/letters/S.png deleted file mode 100644 index e22c08c..0000000 Binary files a/assets/letters/S.png and /dev/null differ diff --git a/assets/letters/T.png b/assets/letters/T.png deleted file mode 100644 index 8a4470e..0000000 Binary files a/assets/letters/T.png and /dev/null differ diff --git a/assets/letters/U.png b/assets/letters/U.png deleted file mode 100644 index 1f34f74..0000000 Binary files a/assets/letters/U.png and /dev/null differ diff --git a/assets/letters/V.png b/assets/letters/V.png deleted file mode 100644 index 0f1e558..0000000 Binary files a/assets/letters/V.png and /dev/null differ diff --git a/assets/letters/W.png b/assets/letters/W.png deleted file mode 100644 index 85e6339..0000000 Binary files a/assets/letters/W.png and /dev/null differ diff --git a/assets/letters/X.png b/assets/letters/X.png deleted file mode 100644 index 8b7a941..0000000 Binary files a/assets/letters/X.png and /dev/null differ diff --git a/assets/letters/Y.png b/assets/letters/Y.png deleted file mode 100644 index 1287040..0000000 Binary files a/assets/letters/Y.png and /dev/null differ diff --git a/assets/letters/Z.png b/assets/letters/Z.png deleted file mode 100644 index ae7c572..0000000 Binary files a/assets/letters/Z.png and /dev/null differ diff --git a/index.css b/index.css index e4d6179..b6acd56 100644 --- a/index.css +++ b/index.css @@ -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,13 +73,30 @@ td { position: relative; } -.itemstor>* { +.itemstor>div { margin: 16px; } +.itemstor>div>p { + margin: 0px; +} #vzoritem { bottom: 4%; left: 4%; 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; } \ No newline at end of file diff --git a/index.html b/index.html index 291ef1b..e5c0eb0 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,12 @@ + +
@@ -26,14 +32,14 @@ -
+
-
+
diff --git a/index.js b/index.js index 2073b41..cb8a51a 100644 --- a/index.js +++ b/index.js @@ -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( "
" + - "" + + "

" + tmp_tabl[i] + "

" + "
" ); 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(); - ev.target.setAttribute("datacode", datacode); - ev.target.innerHTML = data; + if (ev.target.parentElement.innerHTML.includes("