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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b13b8f7fcd05c82997055d59246a15f6b0f16c571ec7b2d6337218893d73393
4
- data.tar.gz: e438883394cdb2357258d95766300a0b415e765cf40e20ce1b2dc4f17b51d2e2
3
+ metadata.gz: 439930c646f078b78274097a7623beb15e273a07c49989dce86160b35b9c9e74
4
+ data.tar.gz: 5bec56f910c682cd4e9dc0559849ff26fcb03f4f418e9078f74cb79dbc058b2c
5
5
  SHA512:
6
- metadata.gz: 124eca04254b09f3118440be6e09d948410972bd799cf2287e77294359f0a51e621e27c24eb3c802a1286876a29ed379852e93fcbba3b6f7cecf40107645e1ab
7
- data.tar.gz: 2d49013a9b37bb6851ccfbcf696e44be871ec0a17afbec4f69f780a64090b0f90752888abf26e043ef70a0514c287bb71847c35f7c9826a5803c543f47ef30df
6
+ metadata.gz: 8520f3b809dbbe532a7a3217e4113843b863e6c16154df570f73887be1739ac0aebe1efb40e83889158eee40f31acdfff313966fff40ddcda15a7cef09026c89
7
+ data.tar.gz: 6259cdda810806193260ab741562fed7d6217ce3413a0ae2bdf5b18f38c212e1cadb4724a035f164391f956f6d4345623b6a462f09b4a6beec31bc1b927d0230
@@ -107,7 +107,7 @@
107
107
 
108
108
  {%- include google-analytics.html -%}
109
109
 
110
- {% if page.url != '/' %}
110
+ {% if page.url != '/' and page.lang == "en" %}
111
111
  {% include Monumetric/Monumetric.html %}
112
112
  {% endif %}
113
113
 
@@ -27,36 +27,66 @@
27
27
  <span id="errorMsg"></span>
28
28
  </div>
29
29
  <div class="game-board">
30
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
31
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
32
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
33
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
34
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
35
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
36
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
37
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
38
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
39
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
40
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
41
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
42
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
43
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
44
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
45
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
46
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
47
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
48
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
49
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
50
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
51
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
52
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
53
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
54
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
55
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
56
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
57
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
58
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
59
- <input class="tile" onkeypress="limitKeypress(event,this.value,1)">
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
- /* caret-color: transparent; */
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
- tile.focus()
38
- function limitKeypress(event, value, maxLength) {
39
- if (value != undefined && value.toString().length >= maxLength) {
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
- nextTile.focus()
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
- lastTile.focus()
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.0
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-17 00:00:00.000000000 Z
11
+ date: 2022-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll