word-games-theme 1.2.9 → 1.3.2

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: 98f98ff3a0c60ec091d2d9abb0e04844173b2c88758ad5aa640930f0d2e61446
4
- data.tar.gz: 573ab1d026595a4f0e2df9e0954ea265c30c813dafdc1bf099245691ab53725e
3
+ metadata.gz: 898fc619f72069ab95131273d148ae3fb3800efc12cc692d18068d94c558635b
4
+ data.tar.gz: 43d334aad0175860fcd3d8aaaa14ab97dc7fed1e37311e9d96e57c3ea505edcc
5
5
  SHA512:
6
- metadata.gz: fbc64047dfff498dd603f17be663e4c3470b6a587fc141468ed746e5e2dd7419ea3f97d39fae0ace8ed21603507a5e8b26d813f799b57a027ae32dba23769719
7
- data.tar.gz: 52277d026a2de45716592f50df0b714ca73d0eab68c374689d2fbc6c2a0710fed8a825e05b6c67c5aa5846f3296c495d00aa424592c611d94ab5a3e6957e9c4b
6
+ metadata.gz: e83c03aa95f990360f2a462d3a71a7373f821dfc55742b95d02613208d0383aedac81cb58a332ded96d7212f6dc6a08fdebc1dfb63c1bcfcd210a1587bb82860
7
+ data.tar.gz: 025c42627fb28322839d935ed09c1be95de9900b2d856a582cd11397916e4d26306f8b46deee25e4e19c7cc24dac4ba1fcdf3c0071e9654afc899162b0603c89
@@ -1,6 +1,11 @@
1
1
  <head>
2
+ {%- assign pagedescriptionlength = page.description | split: ' ' -%}
3
+ {%- if pagedescriptionlength.size > 5 -%}
4
+ {%- assign pagedescriptionlength = page.description | split: ' ' -%}
5
+ {%- assign pagedescription = page.description -%}
6
+ {%- endif -%}
2
7
  {% assign favicon = site.favicon %} {%- assign seo_description =
3
- page.description | default: page.content | markdownify | strip_html |
8
+ pagedescription | default: page.content | markdownify | strip_html |
4
9
  truncatewords: 50 | default: page.excerpt | default: site.description -%} {%-
5
10
  if seo_description -%} {%- assign seo_description = seo_description |
6
11
  markdownify | strip_html | strip_newlines | escape_once -%} {%- endif -%} {%-
@@ -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
 
@@ -9,8 +9,6 @@
9
9
  <a class="word-generator-link" href="/word-game-generator-online">Guess the word in six tries </a>
10
10
  </h1>
11
11
 
12
-
13
-
14
12
  <div class="wordle-time pt-2" style="cursor: pointer;">
15
13
  <i class="bi bi-stopwatch" style="font-size: 18px;"></i>
16
14
  </div>
@@ -29,37 +27,68 @@
29
27
  <span id="errorMsg"></span>
30
28
  </div>
31
29
  <div class="game-board">
32
- <div class="tile"></div>
33
- <div class="tile"></div>
34
- <div class="tile"></div>
35
- <div class="tile"></div>
36
- <div class="tile"></div>
37
- <div class="tile"></div>
38
- <div class="tile"></div>
39
- <div class="tile"></div>
40
- <div class="tile"></div>
41
- <div class="tile"></div>
42
- <div class="tile"></div>
43
- <div class="tile"></div>
44
- <div class="tile"></div>
45
- <div class="tile"></div>
46
- <div class="tile"></div>
47
- <div class="tile"></div>
48
- <div class="tile"></div>
49
- <div class="tile"></div>
50
- <div class="tile"></div>
51
- <div class="tile"></div>
52
- <div class="tile"></div>
53
- <div class="tile"></div>
54
- <div class="tile"></div>
55
- <div class="tile"></div>
56
- <div class="tile"></div>
57
- <div class="tile"></div>
58
- <div class="tile"></div>
59
- <div class="tile"></div>
60
- <div class="tile"></div>
61
- <div class="tile"></div>
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);">
62
90
  </div>
91
+
63
92
  <div data-keyboard class="game-keyboard mt-3">
64
93
  <div class="game-keyboard-row">
65
94
  <button role="button" class="key-btn" data-key="Q">Q</button>
@@ -97,12 +126,13 @@
97
126
  </div>
98
127
 
99
128
  </div>
129
+ <h2 class="text-center font-weight-bolder mb-0 my-4">
130
+ <a class="word-generator-link" href="/word-game-generator-online">Make your own wordle</a>
131
+ </h2>
100
132
  <span class="open-popup" data-toggle="modal" data-target="#exampleModal"></span>
101
133
  </div>
102
134
  </div>
103
- <h2 class="text-center font-weight-bolder mb-0 my-4">
104
- <a class="word-generator-link" href="/word-game-generator-online"> Make your own wordle </a>
105
- </h2>
135
+
106
136
 
107
137
  <div class="modal fade modalWrapper" id="exampleModal">
108
138
  <div class="modal-dialog" style="max-width:400px">
@@ -134,7 +164,7 @@
134
164
 
135
165
  </div>
136
166
 
137
- <div class="pt-4" style="font-size: 14px;">Share it with your friends</div>
167
+ <div class="pt-4" style="font-size: 14px;">Share this wordle with your friends</div>
138
168
  <div class="social-sharing-icons d-flex">
139
169
  <a class="facebook-share-link" target="_blank">
140
170
  <img class="share-icon" src="/assets/images/facebooks.svg" alt="facebook-share">
@@ -202,4 +232,7 @@
202
232
  </div>
203
233
  </div>
204
234
  </div>
205
- </div>
235
+ </div>
236
+
237
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js"
238
+ integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
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
  }
@@ -5,7 +5,9 @@ let copy_btn = document.querySelector(".copy-btn")
5
5
 
6
6
 
7
7
  let wordlePlayButton = document.querySelector("#wordle-play-button")
8
-
8
+ let facebookSHareLink = document.querySelector(".facebook-share-link")
9
+ let twitterSHareLink = document.querySelector(".twitter-share-link")
10
+ let whatsappSHareLink = document.querySelector(".whatsapp-share-link")
9
11
 
10
12
  let form = document.querySelector('#create-wordle-form')
11
13
  let openPopup = document.querySelector(".open-popup")
@@ -13,10 +15,6 @@ let openPopup = document.querySelector(".open-popup")
13
15
  const alertContainer = document.querySelector(".alert-container")
14
16
  let errorMsg = document.querySelector("#errorMsg")
15
17
 
16
- let facebookSHareLink = document.querySelector(".facebook-share-link")
17
- let twitterSHareLink = document.querySelector(".twitter-share-link")
18
- let whatsappSHareLink = document.querySelector(".whatsapp-share-link")
19
-
20
18
 
21
19
  customWord.focus()
22
20
 
@@ -50,7 +48,7 @@ const createWordle = (e) => {
50
48
  } else {
51
49
  if (customWord.value.length === 5) {
52
50
  openPopup.click()
53
- copy_btn.innerHTML = "Copy"
51
+ copy_btn.innerHTML = "Copy Link"
54
52
  copy_btn.style.background = "dodgerblue"
55
53
  wordlePlayButton.setAttribute("href", `/word-game-play?q=${btoa(customWord.value.toLocaleLowerCase())}`)
56
54
  wordleGameLink.setAttribute("href", `/word-game-play?q=${btoa(customWord.value.toLocaleLowerCase())}`)
data/assets/js/game.js CHANGED
@@ -31,6 +31,19 @@ let gameResultTime = document.querySelector("#game-result-time")
31
31
  let wordleRunningTimer = document.querySelector("#wordle-running-timer")
32
32
  // wordleRunningTimer.innerHTML = "00:00"
33
33
 
34
+
35
+
36
+ let tile = document.querySelector('.tile')
37
+ let x = window.matchMedia("(min-width: 768px)")
38
+ if (x.matches) {
39
+ tile.focus()
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
+ // }
45
+
46
+
34
47
  let second = 0
35
48
  let minutes = 0
36
49
  let clear
@@ -44,7 +57,7 @@ function startTime() {
44
57
  min = checkTime(minutes)
45
58
  sec = checkTime(second)
46
59
 
47
- console.log(min + ":" + sec)
60
+ // console.log(min + ":" + sec)
48
61
 
49
62
  wordleRunningTimer.innerText = min + ":" + sec
50
63
  gameResultTime.innerHTML = "Your game ended :" + " " + min + ":" + sec
@@ -129,19 +142,29 @@ const pressKey = (key) => {
129
142
  nextTile.dataset.letter = key.toLowerCase()
130
143
  nextTile.dataset.state = "active"
131
144
  nextTile.classList.add("popAni")
132
- nextTile.innerText = key
145
+ nextTile.value = key
146
+ let x = window.matchMedia("(min-width: 768px)")
147
+ if (x.matches) {
148
+ nextTile.focus()
149
+ }
150
+
133
151
  nextTile.style.border = "2px solid #a7adc0"
134
152
  }
135
153
  const deleteKey = () => {
136
154
  const activeTiles = getActiveTiles()
137
155
  const lastTile = activeTiles[activeTiles.length - 1]
138
156
  if (lastTile == null) return
139
- lastTile.textContent = ""
157
+ lastTile.value = ""
158
+ let x = window.matchMedia("(min-width: 768px)")
159
+ if (x.matches) {
160
+ lastTile.focus()
161
+ }
140
162
  delete lastTile.dataset.state
141
163
  delete lastTile.dataset.letter
142
164
  lastTile.style.border = "2px solid #dee1e9"
143
165
  lastTile.classList.remove("popAni")
144
166
  }
167
+
145
168
  const handleSubmit = () => {
146
169
  const allTiles = [...getActiveTiles()]
147
170
  if (allTiles.length !== wordLength) {
@@ -179,6 +202,7 @@ const handleSubmit = () => {
179
202
  const evaluateTiles = (allTiles, matchedLettersCount, guessWord) => {
180
203
  let reEvaluate = []
181
204
  allTiles.map((tile, index) => {
205
+ tile.setAttribute("disabled", true)
182
206
  if (targetWord !== guessWord) {
183
207
  setTimeout(() => {
184
208
  tile.classList.add("flip")
@@ -369,16 +369,13 @@ function getWords(data) {
369
369
  let allGroupWords = document.getElementById(`alpha_${i}`)
370
370
  let getAllGroupWords = [...main.getElementsByClassName('allGroupWords')]
371
371
 
372
-
373
372
  if (main.dataset.value !== "null") {
374
373
  if (allGroupWords) {
375
374
  Array.from(getAllGroupWords).forEach((item) => {
376
375
  if (item.id.slice(6) <= stringLength.length) {
377
- if (item.nextSibling !== null && item.nextSibling.classList !== undefined && item.nextSibling.classList.contains("mmtwrappos")) {
378
- item.nextSibling.style.visibility = "visible"
379
- item.nextSibling.style.height = "auto"
380
- }
381
- allGroupWords.innerHTML = ""
376
+ // if (item.nextSibling !== null && item.nextSibling.classList !== undefined && item.nextSibling.classList.contains("mmtwrappos")) {
377
+ // item.nextSibling.style.display = "block"
378
+ // }
382
379
  item.style.display = "block"
383
380
  }
384
381
  else {
@@ -401,6 +398,7 @@ function getWords(data) {
401
398
  `
402
399
  }
403
400
  else {
401
+ console.log(true)
404
402
  let getAllGroupWords = [...main.getElementsByClassName('allGroupWords')]
405
403
  let allGroupWords = document.createElement("div")
406
404
  allGroupWords.className = "allGroupWords wordlistContainer"
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.2.9
4
+ version: 1.3.2
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-12 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll