word-games-theme 0.9.6 → 0.9.7
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/_data/wordgames/en/word-meaning.json +3 -2
- data/_includes/find-words-in-certain-positions/words-in-certain-positions.html +1 -0
- data/_layouts/wordMeaning.html +54 -28
- data/assets/css/wordsInCertainPosition.css +72 -0
- data/assets/js/scrabbleDictonary.js +101 -0
- data/assets/js/words-in-certain-positions.js +168 -66
- 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: 9c99d6e8ceebbf380b40cfd9e0a73d40343aed804dfae21bf35b173fd44b68dc
|
|
4
|
+
data.tar.gz: 1a5517161c056065965a014f57c44c190960c69867331384b0448da5d0be0386
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 034ba7bbe368dad5e22d49cb035dd1eb91073a407a078e96cce2499cd129a7687ae46d2ccfe0719638c4403266bd80a47d0716701d26078b401ee201c3c421c2
|
|
7
|
+
data.tar.gz: 063155f181705355949bb295558a89a3b20d8d3d6be2d28da1f9964c73672eab2547cb99d6aa1059c38e0cfd035257377bd52b4e19f4a36aac9f622a76c2c1e4
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"title": "
|
|
3
|
-
"h1": "
|
|
2
|
+
"title": "Word Meaning - Words with letters",
|
|
3
|
+
"h1": "Word Meaning - Words with letters",
|
|
4
|
+
"h2": "",
|
|
4
5
|
"meta": "Still thinking of unscrambling and unjumbling jumbled words ? Use our jumble solver now!",
|
|
5
6
|
"featureNo": "02",
|
|
6
7
|
"feature_title": "Features",
|
data/_layouts/wordMeaning.html
CHANGED
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
.pageHeaderBg {
|
|
48
48
|
background-color: #F8F9FA !important;
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
.list-group-item {
|
|
52
|
+
background-color: transparent !important;
|
|
53
|
+
border: none !important
|
|
54
|
+
}
|
|
50
55
|
</style>
|
|
51
56
|
|
|
52
57
|
{% include Monumetric/Monumetric.html %}
|
|
@@ -55,11 +60,24 @@
|
|
|
55
60
|
|
|
56
61
|
<body>
|
|
57
62
|
{%- include header/index.html -%}
|
|
58
|
-
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
{% assign folderName = page.folderName %}
|
|
66
|
+
{% assign file = page.fileName %}
|
|
67
|
+
{% assign lang = page.lang %}
|
|
68
|
+
{% assign dataToShow = site.data[folderName][lang][file] %}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<div style="padding-top: 100px;">
|
|
59
73
|
<div class="container">
|
|
60
74
|
<div class="pageHeading text-center">
|
|
61
|
-
<h1 class="heading font-weight-bolder pb-
|
|
62
|
-
|
|
75
|
+
<h1 class="heading font-weight-bolder pb-">
|
|
76
|
+
{{dataToShow.h1}}</h1>
|
|
77
|
+
{%- if dataToShow.h2 != "" -%}
|
|
78
|
+
<h2>
|
|
79
|
+
{{dataToShow.h2}}</h2>
|
|
80
|
+
{%- endif -%}
|
|
63
81
|
</div>
|
|
64
82
|
</div>
|
|
65
83
|
<div class="container-fluid" id="containerWd">
|
|
@@ -71,35 +89,43 @@
|
|
|
71
89
|
</form>
|
|
72
90
|
</div>
|
|
73
91
|
</div>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<div class="medium-heading">
|
|
79
|
-
<h2 class="font-weight-bolder">Dictionary</h2>
|
|
80
|
-
</div>
|
|
81
|
-
<div class="dictionary">
|
|
82
|
-
<div class="dictionary-item">
|
|
83
|
-
<span class="font16px">TWL06 (US, Canada and Thailand)</span>
|
|
84
|
-
|
|
85
|
-
<span class="found-word"></span>
|
|
86
|
-
<span class="word-score"></span>
|
|
87
|
-
</div>
|
|
88
|
-
<div class="dictionary-item">
|
|
89
|
-
<span class="font16px">SOWPODS (UK and Others)</span>
|
|
90
|
-
|
|
91
|
-
<span class="found-word"></span>
|
|
92
|
-
<span class="word-score"></span>
|
|
92
|
+
<div class="dictionary-word-container p-0 container" style="position: relative;top: 50px;">
|
|
93
|
+
<div class="padding15px">
|
|
94
|
+
<div class="medium-heading">
|
|
95
|
+
<h2 class="font-weight-bolder">Dictionary</h2>
|
|
93
96
|
</div>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
<div class="dictionary">
|
|
98
|
+
<div class="dictionary-item">
|
|
99
|
+
<span class="font16px">TWL06 (US, Canada and Thailand)</span>
|
|
100
|
+
|
|
101
|
+
<span class="found-word"></span>
|
|
102
|
+
<span class="word-score"></span>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="dictionary-item">
|
|
105
|
+
<span class="font16px">SOWPODS (UK and Others)</span>
|
|
106
|
+
|
|
107
|
+
<span class="found-word"></span>
|
|
108
|
+
<span class="word-score"></span>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div class="dictionary-item">
|
|
112
|
+
<span class="font16px">Enable (Words with Friends)</span>
|
|
113
|
+
|
|
114
|
+
<span class="found-word"></span>
|
|
115
|
+
<span class="word-score"></span>
|
|
116
|
+
</div>
|
|
100
117
|
</div>
|
|
101
118
|
</div>
|
|
102
119
|
</div>
|
|
120
|
+
<div class="container p-0" id="defintions" style="margin-top: 100px;">
|
|
121
|
+
<h3><b>Defintion(s)</b></h3>
|
|
122
|
+
<br>
|
|
123
|
+
<h2 id="err" style="display: none;">No Definition Found!</h2>
|
|
124
|
+
<h4 id="noun" style="display: none;"><b>Noun</b></h4>
|
|
125
|
+
<h4 id="verb" style="display: none;"><b>Verb</b></h4>
|
|
126
|
+
<h4 id="adj" style="display: none;"><b>Adjective</b></h4>
|
|
127
|
+
<h4 id="adv" style="display: none;"><b>Adverb</b></h4>
|
|
128
|
+
</div>
|
|
103
129
|
</div>
|
|
104
130
|
</div>
|
|
105
131
|
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
justify-content: center;
|
|
7
7
|
align-items: center;
|
|
8
|
+
position: sticky;
|
|
9
|
+
width: -webkit-fill-available;
|
|
10
|
+
top: 58px;
|
|
11
|
+
background-color: #fff;
|
|
12
|
+
z-index: 99;
|
|
8
13
|
}
|
|
9
14
|
.errMessage {
|
|
10
15
|
display: none;
|
|
@@ -125,6 +130,73 @@
|
|
|
125
130
|
top:8px;
|
|
126
131
|
left: 5px;
|
|
127
132
|
} */
|
|
133
|
+
|
|
134
|
+
.flex-row {
|
|
135
|
+
-ms-flex-direction: row !important;
|
|
136
|
+
flex-direction: row !important;
|
|
137
|
+
display: flex;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
margin: 0 35px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.tab_link_wrapper {
|
|
143
|
+
display: flex;
|
|
144
|
+
width: 100%;
|
|
145
|
+
/* overflow: auto; */
|
|
146
|
+
justify-content: center;
|
|
147
|
+
background: #f8f9fa;
|
|
148
|
+
border-radius: 40px;
|
|
149
|
+
padding: 8px;
|
|
150
|
+
/* white-space: wrap; */
|
|
151
|
+
}
|
|
152
|
+
.tab_link {
|
|
153
|
+
font-size: 15px;
|
|
154
|
+
font-weight: 900;
|
|
155
|
+
margin: 0 5px;
|
|
156
|
+
padding-top: 5px;
|
|
157
|
+
border: none;
|
|
158
|
+
outline: none;
|
|
159
|
+
background-color: inherit;
|
|
160
|
+
}
|
|
161
|
+
.active-tab {
|
|
162
|
+
border-bottom: solid 2px black;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
#next {
|
|
166
|
+
background: url('/assets/images/next.webp');
|
|
167
|
+
background-size: cover;
|
|
168
|
+
width: 21px;
|
|
169
|
+
object-fit: cover;
|
|
170
|
+
padding: 3px;
|
|
171
|
+
border: none;
|
|
172
|
+
position: absolute;
|
|
173
|
+
top: 15px;
|
|
174
|
+
right: 43px;
|
|
175
|
+
}
|
|
176
|
+
#prev {
|
|
177
|
+
background: url('/assets/images/prev.webp');
|
|
178
|
+
background-size: cover;
|
|
179
|
+
width: 21px;
|
|
180
|
+
object-fit: cover;
|
|
181
|
+
padding: 3px;
|
|
182
|
+
border: none;
|
|
183
|
+
position: absolute;
|
|
184
|
+
top: 15px;
|
|
185
|
+
left: 43px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
128
200
|
@media (max-width: 768px) {
|
|
129
201
|
.letterswords > .wordListHeading{
|
|
130
202
|
padding:10px 15px 5px 15px;
|
|
@@ -6,6 +6,100 @@ let txtBox = document.querySelector('.txtBox')
|
|
|
6
6
|
txtBox.value = serachValue
|
|
7
7
|
|
|
8
8
|
// DICTONARY
|
|
9
|
+
const fetchMeaning = async (serachValue) => {
|
|
10
|
+
try {
|
|
11
|
+
let resMeaning = await fetch(`/.netlify/functions/wordMeaning?search=${serachValue}`)
|
|
12
|
+
let getDef = await resMeaning.text()
|
|
13
|
+
|
|
14
|
+
if (getDef && resMeaning.status == 200) {
|
|
15
|
+
let removeQuote = getDef.replaceAll(`"`, ``);
|
|
16
|
+
let arr = removeQuote.split("&");
|
|
17
|
+
let cols1 = null;
|
|
18
|
+
let cols2 = null;
|
|
19
|
+
let cols3 = null;
|
|
20
|
+
let cols4 = null;
|
|
21
|
+
if (arr[0].length > 0)
|
|
22
|
+
cols1 = arr[0].split(";");
|
|
23
|
+
if (arr[1].length > 0)
|
|
24
|
+
cols2 = arr[1].split(";");
|
|
25
|
+
if (arr[2].length > 0)
|
|
26
|
+
cols3 = arr[2].split(";");
|
|
27
|
+
if (arr[3].length > 0)
|
|
28
|
+
cols4 = arr[3].split(";");
|
|
29
|
+
if (cols1 != null) {
|
|
30
|
+
let noun = document.getElementById("noun");
|
|
31
|
+
let oList = document.createElement("ol");
|
|
32
|
+
oList.setAttribute("class", "list-group list-group-numbered");
|
|
33
|
+
for (let i = 0; i < cols1.length; i++) {
|
|
34
|
+
if (cols1[i] == "")
|
|
35
|
+
continue;
|
|
36
|
+
let temp = document.createElement("li");
|
|
37
|
+
temp.setAttribute("class", "list-group-item my-2");
|
|
38
|
+
temp.style.display = "list-item";
|
|
39
|
+
temp.innerHTML = cols1[i];
|
|
40
|
+
oList.appendChild(temp);
|
|
41
|
+
}
|
|
42
|
+
noun.appendChild(oList);
|
|
43
|
+
noun.style.display = "inherit";
|
|
44
|
+
}
|
|
45
|
+
if (cols2 != null) {
|
|
46
|
+
let verb = document.getElementById("verb");
|
|
47
|
+
let oList = document.createElement("ol");
|
|
48
|
+
oList.setAttribute("class", "list-group list-group-numbered");
|
|
49
|
+
for (let i = 0; i < cols2.length; i++) {
|
|
50
|
+
if (cols2[i] == "")
|
|
51
|
+
continue;
|
|
52
|
+
let temp = document.createElement("li");
|
|
53
|
+
temp.setAttribute("class", "list-group-item my-2");
|
|
54
|
+
temp.style.display = "list-item";
|
|
55
|
+
temp.innerHTML = cols2[i];
|
|
56
|
+
oList.appendChild(temp);
|
|
57
|
+
}
|
|
58
|
+
verb.appendChild(oList);
|
|
59
|
+
verb.style.display = "inherit";
|
|
60
|
+
}
|
|
61
|
+
if (cols3 != null) {
|
|
62
|
+
let adj = document.getElementById("adj");
|
|
63
|
+
let oList = document.createElement("ol");
|
|
64
|
+
oList.setAttribute("class", "list-group list-group-numbered");
|
|
65
|
+
for (let i = 0; i < cols3.length; i++) {
|
|
66
|
+
if (cols3[i] == "")
|
|
67
|
+
continue;
|
|
68
|
+
let temp = document.createElement("li");
|
|
69
|
+
temp.setAttribute("class", "list-group-item my-2");
|
|
70
|
+
temp.style.display = "list-item";
|
|
71
|
+
temp.innerHTML = cols3[i];
|
|
72
|
+
oList.appendChild(temp);
|
|
73
|
+
}
|
|
74
|
+
adj.appendChild(oList);
|
|
75
|
+
adj.style.display = "inherit";
|
|
76
|
+
}
|
|
77
|
+
if (cols4 != null) {
|
|
78
|
+
let adv = document.getElementById("adv");
|
|
79
|
+
let oList = document.createElement("ol");
|
|
80
|
+
oList.setAttribute("class", "list-group list-group-numbered");
|
|
81
|
+
for (let i = 0; i < cols4.length; i++) {
|
|
82
|
+
if (cols4[i] == "")
|
|
83
|
+
continue;
|
|
84
|
+
let temp = document.createElement("li");
|
|
85
|
+
temp.setAttribute("class", "list-group-item my-2");
|
|
86
|
+
temp.style.display = "list-item";
|
|
87
|
+
temp.innerHTML = cols4[i];
|
|
88
|
+
oList.appendChild(temp);
|
|
89
|
+
}
|
|
90
|
+
adv.appendChild(oList);
|
|
91
|
+
adv.style.display = "inherit";
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
document.getElementById("err").style.display = "block";
|
|
95
|
+
}
|
|
96
|
+
} catch (e) {
|
|
97
|
+
document.getElementById("err").style.display = "block";
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
fetchMeaning(serachValue);
|
|
102
|
+
|
|
9
103
|
const fetchTWL06Dic = async (serachValue) => {
|
|
10
104
|
let newAlphabet = {
|
|
11
105
|
a: 1,
|
|
@@ -45,8 +139,10 @@ const fetchTWL06Dic = async (serachValue) => {
|
|
|
45
139
|
|
|
46
140
|
try {
|
|
47
141
|
let res = await fetch(`/.netlify/functions/gettwl06?search=${serachValue}`)
|
|
142
|
+
|
|
48
143
|
let getData = await res.text()
|
|
49
144
|
|
|
145
|
+
|
|
50
146
|
if (getData) {
|
|
51
147
|
document.getElementsByClassName('found-word')[0].innerHTML = 'Yes'
|
|
52
148
|
document.getElementsByClassName('word-score')[0].innerHTML =
|
|
@@ -100,7 +196,10 @@ const fetchSOWPODSDic = async (serachValue) => {
|
|
|
100
196
|
}
|
|
101
197
|
|
|
102
198
|
let res = await fetch(`/.netlify/functions/getsowpods?search=${serachValue}`)
|
|
199
|
+
|
|
103
200
|
let getData = await res.text()
|
|
201
|
+
|
|
202
|
+
|
|
104
203
|
if (getData) {
|
|
105
204
|
document.getElementsByClassName('found-word')[1].innerHTML = 'Yes'
|
|
106
205
|
document.getElementsByClassName('word-score')[1].innerHTML =
|
|
@@ -150,7 +249,9 @@ const fetchEnableDic = async (serachValue) => {
|
|
|
150
249
|
}
|
|
151
250
|
|
|
152
251
|
let res = await fetch(`/.netlify/functions/getenable?search=${serachValue}`)
|
|
252
|
+
|
|
153
253
|
let getData = await res.text()
|
|
254
|
+
|
|
154
255
|
if (getData) {
|
|
155
256
|
document.getElementsByClassName('found-word')[2].innerHTML = 'Yes'
|
|
156
257
|
document.getElementsByClassName('word-score')[2].innerHTML =
|
|
@@ -9,8 +9,12 @@ let certain_pos_submit = document.getElementById('certain_pos_submit')
|
|
|
9
9
|
let newWordsLength
|
|
10
10
|
let errMessage = document.querySelector('.errMessage')
|
|
11
11
|
let spinner = document.querySelector('.spinner')
|
|
12
|
+
let tab_container = document.querySelector('.tab_container')
|
|
13
|
+
let tab_link_wrapper = document.querySelector(".tab_link_wrapper")
|
|
14
|
+
tab_link_wrapper.style.marginTop = "1rem"
|
|
15
|
+
tab_link_wrapper.style.display = "none"
|
|
12
16
|
|
|
13
|
-
const wordsInCertainPos = async (letters, lettersWithIndex,wordLength) => {
|
|
17
|
+
const wordsInCertainPos = async (letters, lettersWithIndex, wordLength) => {
|
|
14
18
|
let maxLength = Math.max.apply(null, wordLength);
|
|
15
19
|
// maxLength = maxLength + 1
|
|
16
20
|
try {
|
|
@@ -26,57 +30,66 @@ const wordsInCertainPos = async (letters, lettersWithIndex,wordLength) => {
|
|
|
26
30
|
}),
|
|
27
31
|
})
|
|
28
32
|
let data = await response.json()
|
|
29
|
-
|
|
30
|
-
if(data.length == 0){
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
|
|
34
|
+
if (data.length == 0) {
|
|
35
|
+
errMessage.innerHTML = 'Sorry!! No words found'
|
|
36
|
+
errMessage.classList.add('alert-danger')
|
|
37
|
+
errMessage.style.display = 'block'
|
|
38
|
+
document.querySelector('#searchData').innerHTML = 'Search'
|
|
39
|
+
spinner.classList.remove('spinner-border')
|
|
40
|
+
certain_pos_words_data.innerHTML = ""
|
|
41
|
+
tab_container.innerHTML = ""
|
|
42
|
+
certain_pos_count.innerHTML = ""
|
|
43
|
+
newWordsLength = 0
|
|
39
44
|
}
|
|
40
|
-
else{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
45
|
+
else {
|
|
46
|
+
errMessage.innerHTML = ''
|
|
47
|
+
errMessage.classList.remove('alert-danger')
|
|
48
|
+
data = data.slice(0, 1500)
|
|
49
|
+
document.querySelector('#searchData').innerHTML = 'Search'
|
|
50
|
+
spinner.classList.remove('spinner-border')
|
|
51
|
+
certain_pos_words_data.innerHTML = ""
|
|
52
|
+
tab_container.innerHTML = ""
|
|
53
|
+
newWordsLength = 0
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
let ok = true
|
|
57
|
+
|
|
58
|
+
for (let i = maxLength; i <= 15; i++) {
|
|
59
|
+
let newdata = data.filter((item) => item.length === i)
|
|
60
|
+
if (newdata.length === 0) {
|
|
61
|
+
certain_pos_words_data.innerHTML += ''
|
|
62
|
+
} else {
|
|
63
|
+
newWordsLength += newdata.length
|
|
64
|
+
certain_pos_error_msg.classList.remove('alert-danger')
|
|
65
|
+
certain_pos_error_msg.innerHTML = ''
|
|
66
|
+
const result = newdata.map((item) => {
|
|
67
|
+
if (item.length === 1) {
|
|
68
|
+
ok = false
|
|
69
|
+
newWordsLength = newWordsLength - 1
|
|
70
|
+
} else {
|
|
71
|
+
let ScrabbleLetterScore = ScrabbleScore()
|
|
72
|
+
sum = 0
|
|
73
|
+
item = item.toLowerCase()
|
|
74
|
+
for (let i = 0; i < item.length; i++) {
|
|
75
|
+
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
|
76
|
+
}
|
|
77
|
+
return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.toLowerCase()}">
|
|
72
78
|
<li>${item}
|
|
73
79
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
|
74
80
|
</li></a>`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
if (ok) {
|
|
84
|
+
tab_link_wrapper.style.display = "inline-flex"
|
|
85
|
+
tab_container.innerHTML += `
|
|
86
|
+
<input type="button" id="Tab_${i}" onclick="Filtering(${i})" value="${i} Letter"
|
|
87
|
+
class="tab_link cursorPointer" />
|
|
88
|
+
`
|
|
89
|
+
let tabs = document.getElementsByClassName('tab_link')
|
|
90
|
+
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
|
91
|
+
certain_pos_words_data.innerHTML += `
|
|
92
|
+
<div class="letterswords wordlistContainer" id="alpha_${i}">
|
|
80
93
|
<div class="wordListHeading">
|
|
81
94
|
<h3 class="lead">List of ${i} letter words that contain letters ${letters}</h3>
|
|
82
95
|
</div>
|
|
@@ -87,24 +100,24 @@ const wordsInCertainPos = async (letters, lettersWithIndex,wordLength) => {
|
|
|
87
100
|
</div>
|
|
88
101
|
</div>
|
|
89
102
|
`
|
|
103
|
+
}
|
|
90
104
|
}
|
|
91
105
|
}
|
|
106
|
+
if (newWordsLength === 0) {
|
|
107
|
+
certain_pos_count.innerHTML = ""
|
|
108
|
+
certain_pos_error_msg.classList.add('alert-danger')
|
|
109
|
+
certain_pos_error_msg.innerHTML = 'Sorry!! No words found'
|
|
110
|
+
} else {
|
|
111
|
+
certain_pos_count.innerHTML = `<strong>Found <span>${newWordsLength}</span>
|
|
112
|
+
words matching your search criteria </strong>`
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
92
119
|
}
|
|
93
|
-
|
|
94
|
-
certain_pos_count.innerHTML = ""
|
|
95
|
-
certain_pos_error_msg.classList.add('alert-danger')
|
|
96
|
-
certain_pos_error_msg.innerHTML = 'Sorry!! No words found'
|
|
97
|
-
} else {
|
|
98
|
-
certain_pos_count.innerHTML = `<strong>There are <span>${newWordsLength}</span>
|
|
99
|
-
words that contain letters ${letters}</strong>`
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
} catch (error) {
|
|
120
|
+
} catch (error) {
|
|
108
121
|
console.log(error)
|
|
109
122
|
}
|
|
110
123
|
}
|
|
@@ -143,7 +156,7 @@ const getIndexs = (object) => {
|
|
|
143
156
|
}
|
|
144
157
|
return index
|
|
145
158
|
}
|
|
146
|
-
const getLength= (object) => {
|
|
159
|
+
const getLength = (object) => {
|
|
147
160
|
let index = []
|
|
148
161
|
if (typeof object === 'string') {
|
|
149
162
|
object = document.querySelectorAll(object)
|
|
@@ -161,11 +174,100 @@ function handleSubmit(e) {
|
|
|
161
174
|
let letters = getLetters('.greenLetters')
|
|
162
175
|
let lettersWithIndex = getIndexs('.greenWithIndex')
|
|
163
176
|
let wordLength = getLength('.greenWithIndex')
|
|
164
|
-
|
|
165
|
-
wordsInCertainPos(letters,lettersWithIndex,wordLength)
|
|
177
|
+
|
|
178
|
+
wordsInCertainPos(letters, lettersWithIndex, wordLength)
|
|
166
179
|
}
|
|
167
180
|
form.addEventListener('submit', handleSubmit)
|
|
168
181
|
|
|
182
|
+
// handling of filter on scroll
|
|
183
|
+
window.onscroll = function () {
|
|
184
|
+
var section = document.querySelectorAll('.letterswords')
|
|
185
|
+
let new_sections = {}
|
|
186
|
+
Array.prototype.forEach.call(section, function (e) {
|
|
187
|
+
if (document.body.clientWidth > 991) {
|
|
188
|
+
new_sections[e.id] = e.offsetTop - 10
|
|
189
|
+
} else {
|
|
190
|
+
new_sections[e.id] = e.offsetTop - 10
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
var scrollPosition =
|
|
194
|
+
document.documentElement.scrollTop || document.body.scrollTop
|
|
195
|
+
for (i in new_sections) {
|
|
196
|
+
let sort_val = "alpha"
|
|
197
|
+
if (
|
|
198
|
+
i.split('_')[0] == sort_val &&
|
|
199
|
+
new_sections[i] &&
|
|
200
|
+
new_sections[i] <= scrollPosition
|
|
201
|
+
) {
|
|
202
|
+
document.querySelector('.active-tab').classList.remove('active-tab')
|
|
203
|
+
var active_now = document.querySelector('#Tab_' + i.split('_')[1])
|
|
204
|
+
active_now.classList.add('active-tab')
|
|
205
|
+
// active_now.scrollIntoView()
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// Add Filtering
|
|
210
|
+
let sections = {}
|
|
211
|
+
function Filtering(id) {
|
|
212
|
+
let tabs = document.getElementsByClassName('tab_link')
|
|
213
|
+
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
|
214
|
+
|
|
215
|
+
Array.from(tabs).map((item) => {
|
|
216
|
+
item.classList.remove('active-tab')
|
|
217
|
+
})
|
|
218
|
+
// certain_pos_words_data.innerHTML += ``
|
|
219
|
+
let activeLetter = event.target
|
|
220
|
+
activeLetter.classList.add('active-tab')
|
|
221
|
+
|
|
222
|
+
var section = document.querySelectorAll('.letterswords')
|
|
223
|
+
var sort_val = "alpha"
|
|
224
|
+
|
|
225
|
+
Array.prototype.forEach.call(section, function (e) {
|
|
226
|
+
if (document.body.clientWidth > 991) {
|
|
227
|
+
sections[e.id] = e.offsetTop - 10
|
|
228
|
+
} else {
|
|
229
|
+
sections[e.id] = e.offsetTop - 30
|
|
230
|
+
}
|
|
231
|
+
})
|
|
232
|
+
document.documentElement.scrollTop = sections[sort_val + '_' + id] + 5
|
|
233
|
+
|
|
234
|
+
// document.body.scrollTop = sections[sort_val + '_' + id] + 5
|
|
235
|
+
}
|
|
236
|
+
// next && previous functionality
|
|
237
|
+
let prev = document.getElementById('prev')
|
|
238
|
+
let next = document.getElementById('next')
|
|
239
|
+
if (prev) {
|
|
240
|
+
prev.onclick = scroll_Right
|
|
241
|
+
}
|
|
242
|
+
if (next) {
|
|
243
|
+
next.onclick = scroll_Left
|
|
244
|
+
}
|
|
245
|
+
scroll_visible()
|
|
246
|
+
window.addEventListener('resize', function () {
|
|
247
|
+
scroll_visible()
|
|
248
|
+
})
|
|
249
|
+
window.addEventListener('scroll', function () {
|
|
250
|
+
scroll_visible()
|
|
251
|
+
})
|
|
252
|
+
function scroll_visible() {
|
|
253
|
+
let tab_container = document.querySelector('#tab-container')
|
|
254
|
+
// console.log(tab_container)
|
|
255
|
+
if (tab_container) {
|
|
256
|
+
if (tab_container.clientWidth === tab_container.scrollWidth) {
|
|
257
|
+
prev.style.display = 'none'
|
|
258
|
+
next.style.display = 'none'
|
|
259
|
+
} else {
|
|
260
|
+
prev.style.display = 'block'
|
|
261
|
+
next.style.display = 'block'
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function scroll_Left() {
|
|
266
|
+
tab_container.scrollLeft += 130
|
|
267
|
+
}
|
|
268
|
+
function scroll_Right() {
|
|
269
|
+
tab_container.scrollLeft -= 130
|
|
270
|
+
}
|
|
169
271
|
// Scrabble Point Array
|
|
170
272
|
const ScrabbleScore = () => {
|
|
171
273
|
let twl06_sowpods = {
|
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: 0.9.
|
|
4
|
+
version: 0.9.7
|
|
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-02-
|
|
11
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|