word-games-theme 1.5.7 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/section/feature.html +1 -1
- data/assets/js/X-letter-test.js +29 -16
- data/assets/js/wordScrabble-test.js +26 -28
- data/assets/js/words-starting-with.js +30 -22
- 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: 00b9651900036e4023ae7a154e7fdaaf98610f8ca1e3bce9623782c40262d18a
|
4
|
+
data.tar.gz: 5e885c65234ae6c33145a8a6b944cfa9cc67abd7af981e3eea0a80fe41d9276d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d74d68f2f45bbdc63945d17727dadba939d0c9253e41372a1cdcdff2ed7aca5de9557738a6927a3e607ed1632af3ec924bec97503b822eb80f43f992fc7e3bf
|
7
|
+
data.tar.gz: 1f93cabe59fbfb98a10af1bc9c781830fe3e23950649d8a9c8324cdcaee7a057b87fc25c46e61142a1bc512cd579f79b5d3ea15e837048c888b9f51b28b773d0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
{% assign dataToShow = site.data.[page.folderName][lang][file] %}
|
4
4
|
<div class="container-fluid">
|
5
5
|
<div class="row">
|
6
|
-
<div class="feature">
|
6
|
+
<div class="ads_layout feature">
|
7
7
|
<p class="title mb-0">{{dataToShow.feature_title}}</p>
|
8
8
|
{%- if dataToShow.feature_description -%}
|
9
9
|
<p class="description">{{dataToShow.feature_description}}</p>
|
data/assets/js/X-letter-test.js
CHANGED
@@ -213,6 +213,7 @@ function x_with_letters(data) {
|
|
213
213
|
} else {
|
214
214
|
let newWordsLength = 0
|
215
215
|
let filterData = ''
|
216
|
+
let dataArr = []
|
216
217
|
|
217
218
|
|
218
219
|
if (letterLen) {
|
@@ -298,21 +299,6 @@ function x_with_letters(data) {
|
|
298
299
|
main.innerHTML += ''
|
299
300
|
errorMsg.innerHTML = 'No words Found with this length'
|
300
301
|
} else {
|
301
|
-
// sort eventlistener
|
302
|
-
theSelect.addEventListener('change', () => {
|
303
|
-
sortValue = theSelect[theSelect.selectedIndex].text
|
304
|
-
if (sortValue == 'Z-A') {
|
305
|
-
sortBool = true
|
306
|
-
sortby(sortBool, filterData, itemLength)
|
307
|
-
} else {
|
308
|
-
sortBool = false
|
309
|
-
sortby(sortBool, filterData, itemLength)
|
310
|
-
}
|
311
|
-
if (sortValue == 'Points') {
|
312
|
-
sortBool = true
|
313
|
-
sortPointsby(sortBool, filterData, itemLength)
|
314
|
-
}
|
315
|
-
})
|
316
302
|
|
317
303
|
newWordsLength += filterData.length
|
318
304
|
let itemLength = ''
|
@@ -361,7 +347,7 @@ function x_with_letters(data) {
|
|
361
347
|
}
|
362
348
|
})
|
363
349
|
|
364
|
-
|
350
|
+
dataArr.push(item)
|
365
351
|
return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
366
352
|
<li>${itemHtml}
|
367
353
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
@@ -394,7 +380,34 @@ function x_with_letters(data) {
|
|
394
380
|
</div>
|
395
381
|
</div>
|
396
382
|
`
|
383
|
+
|
384
|
+
// sort eventlistener
|
385
|
+
theSelect.addEventListener('change', () => {
|
386
|
+
sortValue = theSelect[theSelect.selectedIndex].text
|
387
|
+
if (sortValue == 'Z-A') {
|
388
|
+
sortBool = true
|
389
|
+
sortby(sortBool, dataArr, itemLength)
|
390
|
+
} else {
|
391
|
+
sortBool = false
|
392
|
+
sortby(sortBool, dataArr, itemLength)
|
393
|
+
}
|
394
|
+
if (sortValue == 'Points') {
|
395
|
+
sortBool = true
|
396
|
+
sortPointsby(sortBool, dataArr, itemLength)
|
397
|
+
}
|
398
|
+
})
|
399
|
+
|
400
|
+
sortValue = theSelect[theSelect.selectedIndex].text
|
401
|
+
if (sortValue == 'Z-A') {
|
402
|
+
sortby(sortBool, dataArr, itemLength)
|
403
|
+
}
|
404
|
+
if (sortValue == 'Points') {
|
405
|
+
sortPointsby(sortBool, dataArr, itemLength)
|
406
|
+
}
|
407
|
+
|
408
|
+
|
397
409
|
}
|
410
|
+
|
398
411
|
wordCount.innerHTML = `<strong>Found ${newWordsLength} words with letters with ${serachValue.split(
|
399
412
|
''
|
400
413
|
)}</strong>`
|
@@ -138,6 +138,9 @@ const getDiff = (text1, text2) => {
|
|
138
138
|
}
|
139
139
|
return diffRange
|
140
140
|
}
|
141
|
+
|
142
|
+
|
143
|
+
|
141
144
|
// getWords define...
|
142
145
|
const getData = async (serachValue) => {
|
143
146
|
try {
|
@@ -223,26 +226,9 @@ function getWords(data) {
|
|
223
226
|
)}</strong>`
|
224
227
|
} else {
|
225
228
|
let newWordsLength = 0
|
226
|
-
|
227
|
-
// sort eventlistener
|
228
|
-
theSelect.addEventListener('change', () => {
|
229
|
-
sortValue = theSelect[theSelect.selectedIndex].text
|
230
|
-
if (sortValue == 'Z-A') {
|
231
|
-
sortBool = true
|
232
|
-
sortby(sortBool, data)
|
233
|
-
} else {
|
234
|
-
sortBool = false
|
235
|
-
sortby(sortBool, data)
|
236
|
-
}
|
237
|
-
if (sortValue == 'Points') {
|
238
|
-
sortBool = true
|
239
|
-
sortPointsby(sortBool, data)
|
240
|
-
}
|
241
|
-
})
|
242
|
-
|
229
|
+
let dataArr = []
|
243
230
|
for (let i = serachValue.length; i >= 1; i--) {
|
244
231
|
let newdata = data.filter((item) => item.length === i)
|
245
|
-
|
246
232
|
if (prefixValue) {
|
247
233
|
newdata = newdata.filter((item2) =>
|
248
234
|
item2.startsWith(prefixValue.toLowerCase())
|
@@ -324,7 +310,6 @@ function getWords(data) {
|
|
324
310
|
} else {
|
325
311
|
wordLength.classList.remove('tick')
|
326
312
|
}
|
327
|
-
|
328
313
|
if (newdata.length === 0) {
|
329
314
|
main.innerHTML += ''
|
330
315
|
} else {
|
@@ -335,7 +320,6 @@ function getWords(data) {
|
|
335
320
|
var text3 = item
|
336
321
|
let chars = text1.split('')
|
337
322
|
|
338
|
-
|
339
323
|
let indexs = []
|
340
324
|
chars.map((i) => {
|
341
325
|
let findIndexes = findIndex(text3, i)
|
@@ -368,13 +352,13 @@ function getWords(data) {
|
|
368
352
|
for (let i = 0; i < item.length; i++) {
|
369
353
|
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
370
354
|
}
|
355
|
+
dataArr.push(item)
|
371
356
|
return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.toLowerCase()}">
|
372
357
|
<li>${itemHtml}
|
373
358
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
374
359
|
</li></a>`
|
375
360
|
}
|
376
361
|
})
|
377
|
-
|
378
362
|
if (result[0] !== undefined) {
|
379
363
|
tab_container.innerHTML += `
|
380
364
|
<input type="button" id="Tab_${i}" onclick="Filtering(${i})" value="${i} Letter"
|
@@ -382,8 +366,6 @@ function getWords(data) {
|
|
382
366
|
`
|
383
367
|
let tabs = document.getElementsByClassName('tab_link')
|
384
368
|
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
385
|
-
|
386
|
-
|
387
369
|
main.innerHTML += `
|
388
370
|
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
389
371
|
<div class="wordListHeading">
|
@@ -396,10 +378,30 @@ function getWords(data) {
|
|
396
378
|
</div>
|
397
379
|
</div>
|
398
380
|
`
|
399
|
-
|
400
381
|
}
|
401
382
|
}
|
402
383
|
}
|
384
|
+
theSelect.addEventListener('change', () => {
|
385
|
+
sortValue = theSelect[theSelect.selectedIndex].text
|
386
|
+
if (sortValue == 'Z-A') {
|
387
|
+
sortBool = true
|
388
|
+
sortby(sortBool, dataArr)
|
389
|
+
} else {
|
390
|
+
sortBool = false
|
391
|
+
sortby(sortBool, dataArr)
|
392
|
+
}
|
393
|
+
if (sortValue == 'Points') {
|
394
|
+
sortBool = true
|
395
|
+
sortPointsby(sortBool, dataArr)
|
396
|
+
}
|
397
|
+
})
|
398
|
+
sortValue = theSelect[theSelect.selectedIndex].text
|
399
|
+
if (sortValue == 'Z-A') {
|
400
|
+
sortby(sortBool, dataArr)
|
401
|
+
}
|
402
|
+
if (sortValue == 'Points') {
|
403
|
+
sortPointsby(sortBool, dataArr)
|
404
|
+
}
|
403
405
|
if (newWordsLength === 0) {
|
404
406
|
errorMsg.innerHTML = 'no words found'
|
405
407
|
} else {
|
@@ -417,7 +419,6 @@ function sortPointsby(sortValue, data) {
|
|
417
419
|
let newWordsLength = 0
|
418
420
|
for (let i = serachValue.length; i >= 1; i--) {
|
419
421
|
var newdata = data.filter((item) => item.length === i)
|
420
|
-
|
421
422
|
if (newdata.length === 0) {
|
422
423
|
main.innerHTML += ''
|
423
424
|
} else {
|
@@ -445,13 +446,10 @@ function sortPointsby(sortValue, data) {
|
|
445
446
|
newArray.sort(function (a, b) {
|
446
447
|
return b.points - a.points
|
447
448
|
})
|
448
|
-
|
449
449
|
const result = newArray.map((item) => {
|
450
450
|
var text1 = serachValue.replace('?', '')
|
451
451
|
var text2 = item.words
|
452
452
|
var text3 = item.words
|
453
|
-
|
454
|
-
|
455
453
|
function findIndex(str, char) {
|
456
454
|
const strLength = str.length
|
457
455
|
const indexes = []
|
@@ -146,22 +146,7 @@ function wordsStartingWith(data) {
|
|
146
146
|
)}</strong>`
|
147
147
|
} else {
|
148
148
|
let newWordsLength = 0
|
149
|
-
|
150
|
-
// sort eventlistener
|
151
|
-
theSelect.addEventListener('change', () => {
|
152
|
-
sortValue = theSelect[theSelect.selectedIndex].text
|
153
|
-
if (sortValue == 'Z-A') {
|
154
|
-
sortBool = true
|
155
|
-
sortby(sortBool, data)
|
156
|
-
} else {
|
157
|
-
sortBool = false
|
158
|
-
sortby(sortBool, data)
|
159
|
-
}
|
160
|
-
if (sortValue == 'Points') {
|
161
|
-
sortBool = true
|
162
|
-
sortPointsby(sortBool, data)
|
163
|
-
}
|
164
|
-
})
|
149
|
+
let dataArr = []
|
165
150
|
|
166
151
|
for (let i = 15; i >= 0; i--) {
|
167
152
|
let newdata = data.filter((item) => item.length === i)
|
@@ -262,6 +247,7 @@ function wordsStartingWith(data) {
|
|
262
247
|
for (let i = 0; i < item.length; i++) {
|
263
248
|
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
264
249
|
}
|
250
|
+
dataArr.push(item)
|
265
251
|
return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.toLowerCase()}">
|
266
252
|
<li>${item}
|
267
253
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
@@ -291,7 +277,27 @@ function wordsStartingWith(data) {
|
|
291
277
|
}
|
292
278
|
}
|
293
279
|
}
|
294
|
-
|
280
|
+
theSelect.addEventListener('change', () => {
|
281
|
+
sortValue = theSelect[theSelect.selectedIndex].text
|
282
|
+
if (sortValue == 'Z-A') {
|
283
|
+
sortBool = true
|
284
|
+
sortby(sortBool, dataArr)
|
285
|
+
} else {
|
286
|
+
sortBool = false
|
287
|
+
sortby(sortBool, dataArr)
|
288
|
+
}
|
289
|
+
if (sortValue == 'Points') {
|
290
|
+
sortBool = true
|
291
|
+
sortPointsby(sortBool, dataArr)
|
292
|
+
}
|
293
|
+
})
|
294
|
+
sortValue = theSelect[theSelect.selectedIndex].text
|
295
|
+
if (sortValue == 'Z-A') {
|
296
|
+
sortby(sortBool, dataArr)
|
297
|
+
}
|
298
|
+
if (sortValue == 'Points') {
|
299
|
+
sortPointsby(sortBool, dataArr)
|
300
|
+
}
|
295
301
|
if (newWordsLength === 0) {
|
296
302
|
errorMsg.innerHTML = 'no words found'
|
297
303
|
} else {
|
@@ -309,7 +315,6 @@ function sortPointsby(sortValue, data) {
|
|
309
315
|
let newWordsLength = 0
|
310
316
|
for (let i = 15; i >= 0; i--) {
|
311
317
|
var newdata = data.filter((item) => item.length === i)
|
312
|
-
console.log(newdata)
|
313
318
|
if (newdata.length === 0) {
|
314
319
|
main.innerHTML += ''
|
315
320
|
} else {
|
@@ -583,8 +588,9 @@ function Filtering(id) {
|
|
583
588
|
let activeLetter = event.target
|
584
589
|
activeLetter.classList.add('active-tab')
|
585
590
|
|
586
|
-
var section = document.querySelectorAll(
|
587
|
-
var sort_val =
|
591
|
+
var section = document.querySelectorAll(".allGroupWords");
|
592
|
+
var sort_val = "alpha";
|
593
|
+
|
588
594
|
Array.prototype.forEach.call(section, function (e) {
|
589
595
|
if (document.body.clientWidth > 991) {
|
590
596
|
sections[e.id] = e.offsetTop - 10
|
@@ -592,8 +598,10 @@ function Filtering(id) {
|
|
592
598
|
sections[e.id] = e.offsetTop - 10
|
593
599
|
}
|
594
600
|
})
|
595
|
-
|
596
|
-
|
601
|
+
document.documentElement.scrollTop = sections[sort_val + "_" + id] + 5;
|
602
|
+
setTimeout(() => {
|
603
|
+
document.documentElement.scrollTop = sections[sort_val + "_" + id] + 5;
|
604
|
+
}, 150);
|
597
605
|
}
|
598
606
|
// next && previous functionality
|
599
607
|
let prev = document.getElementById('prev')
|
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.5.
|
4
|
+
version: 1.5.8
|
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-11-
|
11
|
+
date: 2022-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|