word-games-theme 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/head/index.html +1 -1
- data/_includes/word-game/word-game-play.html +60 -30
- data/assets/css/game.css +7 -1
- data/assets/js/game.js +16 -7
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 439930c646f078b78274097a7623beb15e273a07c49989dce86160b35b9c9e74
|
|
4
|
+
data.tar.gz: 5bec56f910c682cd4e9dc0559849ff26fcb03f4f418e9078f74cb79dbc058b2c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8520f3b809dbbe532a7a3217e4113843b863e6c16154df570f73887be1739ac0aebe1efb40e83889158eee40f31acdfff313966fff40ddcda15a7cef09026c89
|
|
7
|
+
data.tar.gz: 6259cdda810806193260ab741562fed7d6217ce3413a0ae2bdf5b18f38c212e1cadb4724a035f164391f956f6d4345623b6a462f09b4a6beec31bc1b927d0230
|
data/_includes/head/index.html
CHANGED
|
@@ -27,36 +27,66 @@
|
|
|
27
27
|
<span id="errorMsg"></span>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="game-board">
|
|
30
|
-
<input class="tile"
|
|
31
|
-
|
|
32
|
-
<input class="tile"
|
|
33
|
-
|
|
34
|
-
<input class="tile"
|
|
35
|
-
|
|
36
|
-
<input class="tile"
|
|
37
|
-
|
|
38
|
-
<input class="tile"
|
|
39
|
-
|
|
40
|
-
<input class="tile"
|
|
41
|
-
|
|
42
|
-
<input class="tile"
|
|
43
|
-
|
|
44
|
-
<input class="tile"
|
|
45
|
-
|
|
46
|
-
<input class="tile"
|
|
47
|
-
|
|
48
|
-
<input class="tile"
|
|
49
|
-
|
|
50
|
-
<input class="tile"
|
|
51
|
-
|
|
52
|
-
<input class="tile"
|
|
53
|
-
|
|
54
|
-
<input class="tile"
|
|
55
|
-
|
|
56
|
-
<input class="tile"
|
|
57
|
-
|
|
58
|
-
<input class="tile"
|
|
59
|
-
|
|
30
|
+
<input class="tile" maxlength="1"
|
|
31
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
32
|
+
<input class="tile" maxlength="1"
|
|
33
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
34
|
+
<input class="tile" maxlength="1"
|
|
35
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
36
|
+
<input class="tile" maxlength="1"
|
|
37
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
38
|
+
<input class="tile" maxlength="1"
|
|
39
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
40
|
+
<input class="tile" maxlength="1"
|
|
41
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
42
|
+
<input class="tile" maxlength="1"
|
|
43
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
44
|
+
<input class="tile" maxlength="1"
|
|
45
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
46
|
+
<input class="tile" maxlength="1"
|
|
47
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
48
|
+
<input class="tile" maxlength="1"
|
|
49
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
50
|
+
<input class="tile" maxlength="1"
|
|
51
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
52
|
+
<input class="tile" maxlength="1"
|
|
53
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
54
|
+
<input class="tile" maxlength="1"
|
|
55
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
56
|
+
<input class="tile" maxlength="1"
|
|
57
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
58
|
+
<input class="tile" maxlength="1"
|
|
59
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
60
|
+
<input class="tile" maxlength="1"
|
|
61
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
62
|
+
<input class="tile" maxlength="1"
|
|
63
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
64
|
+
<input class="tile" maxlength="1"
|
|
65
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
66
|
+
<input class="tile" maxlength="1"
|
|
67
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
68
|
+
<input class="tile" maxlength="1"
|
|
69
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
70
|
+
<input class="tile" maxlength="1"
|
|
71
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
72
|
+
<input class="tile" maxlength="1"
|
|
73
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
74
|
+
<input class="tile" maxlength="1"
|
|
75
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
76
|
+
<input class="tile" maxlength="1"
|
|
77
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
78
|
+
<input class="tile" maxlength="1"
|
|
79
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
80
|
+
<input class="tile" maxlength="1"
|
|
81
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
82
|
+
<input class="tile" maxlength="1"
|
|
83
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
84
|
+
<input class="tile" maxlength="1"
|
|
85
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
86
|
+
<input class="tile" maxlength="1"
|
|
87
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
88
|
+
<input class="tile" maxlength="1"
|
|
89
|
+
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);">
|
|
60
90
|
</div>
|
|
61
91
|
|
|
62
92
|
<div data-keyboard class="game-keyboard mt-3">
|
data/assets/css/game.css
CHANGED
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
justify-content: center;
|
|
101
101
|
}
|
|
102
102
|
.game .game-container .game-board .tile{
|
|
103
|
-
|
|
103
|
+
|
|
104
104
|
display: flex;
|
|
105
105
|
justify-content: center;
|
|
106
106
|
align-items: center;
|
|
@@ -117,6 +117,8 @@
|
|
|
117
117
|
text-transform: uppercase;
|
|
118
118
|
transition: transform 240ms linear;
|
|
119
119
|
}
|
|
120
|
+
|
|
121
|
+
|
|
120
122
|
.game .game-container .game-board .tile:focus-visible{
|
|
121
123
|
outline: none !important;
|
|
122
124
|
}
|
|
@@ -399,6 +401,10 @@
|
|
|
399
401
|
border-color: #666;
|
|
400
402
|
}
|
|
401
403
|
@media (max-width: 768px) {
|
|
404
|
+
.tile{
|
|
405
|
+
caret-color: transparent;
|
|
406
|
+
cursor: default;
|
|
407
|
+
}
|
|
402
408
|
#create-wordle-form{
|
|
403
409
|
padding:0 10px;
|
|
404
410
|
}
|
data/assets/js/game.js
CHANGED
|
@@ -34,12 +34,14 @@ let wordleRunningTimer = document.querySelector("#wordle-running-timer")
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
let tile = document.querySelector('.tile')
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
event.preventDefault();
|
|
41
|
-
}
|
|
37
|
+
let x = window.matchMedia("(min-width: 768px)")
|
|
38
|
+
if (x.matches) {
|
|
39
|
+
tile.focus()
|
|
42
40
|
}
|
|
41
|
+
// function limitKeypress(event, maxLength) {
|
|
42
|
+
// event.target.value = event.target.value.replace(/[^a-zA-Z? ]/g, '')
|
|
43
|
+
// event.target.value = event.target.value.substring(0, maxLength)
|
|
44
|
+
// }
|
|
43
45
|
|
|
44
46
|
|
|
45
47
|
let second = 0
|
|
@@ -141,7 +143,11 @@ const pressKey = (key) => {
|
|
|
141
143
|
nextTile.dataset.state = "active"
|
|
142
144
|
nextTile.classList.add("popAni")
|
|
143
145
|
nextTile.value = key
|
|
144
|
-
|
|
146
|
+
let x = window.matchMedia("(min-width: 768px)")
|
|
147
|
+
if (x.matches) {
|
|
148
|
+
nextTile.focus()
|
|
149
|
+
}
|
|
150
|
+
|
|
145
151
|
nextTile.style.border = "2px solid #a7adc0"
|
|
146
152
|
}
|
|
147
153
|
const deleteKey = () => {
|
|
@@ -149,7 +155,10 @@ const deleteKey = () => {
|
|
|
149
155
|
const lastTile = activeTiles[activeTiles.length - 1]
|
|
150
156
|
if (lastTile == null) return
|
|
151
157
|
lastTile.value = ""
|
|
152
|
-
|
|
158
|
+
let x = window.matchMedia("(min-width: 768px)")
|
|
159
|
+
if (x.matches) {
|
|
160
|
+
lastTile.focus()
|
|
161
|
+
}
|
|
153
162
|
delete lastTile.dataset.state
|
|
154
163
|
delete lastTile.dataset.letter
|
|
155
164
|
lastTile.style.border = "2px solid #dee1e9"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: word-games-theme
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- manpreet-appscms
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-05-
|
|
11
|
+
date: 2022-05-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|