word-games-theme 0.9.5 → 0.9.9
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/_includes/section/count.html +5 -2
- data/_layouts/wordMeaning.html +55 -28
- data/assets/css/wordGroup.css +2 -1
- data/assets/css/wordsInCertainPosition.css +73 -0
- data/assets/js/scrabbleDictonary.js +107 -0
- data/assets/js/words-in-certain-positions.js +168 -66
- data/assets/js/words-starting-with.js +4 -4
- 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: d80d3b8620a4de2daf5cf29f22a82db8187297f612fc46d7b176504e311534cf
|
|
4
|
+
data.tar.gz: 9a00975d502193e52167136d33071d5bb6d5854b6a4c1178be77fef87c20e318
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '097486333e7b4da296d496f0c2f261d81779f3918bf827033f90f634795a9ff0e1066ea0adb02bda3a22b90ee71dbd89eb039bb069ea07de9378cfc6feac11c4'
|
|
7
|
+
data.tar.gz: 433a663bd1d90a5352b16798a01be10edb9c2134635e8a11d527583b6ef8229e25cd9bd1d4e6eb3f5dedc293241ba703da089f40c0f10a4f773b0c2865229f20
|
|
@@ -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",
|
|
@@ -5,14 +5,17 @@
|
|
|
5
5
|
{% assign categories_list = site.categories %}
|
|
6
6
|
{% if categories_list.first[0] == null %}
|
|
7
7
|
{% for category in categories_list %}
|
|
8
|
-
<a class="cat mt-1 mb-1"
|
|
8
|
+
<a class="cat mt-1 mb-1"
|
|
9
|
+
href="{{page.permalink}}/categories#{{ category | url_escape | strip | replace: ' ', '-' }}">{{
|
|
9
10
|
category
|
|
10
11
|
|
|
|
11
12
|
camelcase }} ({{ site.tags[category].size }})</a>
|
|
12
13
|
{% endfor %}
|
|
13
14
|
{% else %}
|
|
14
15
|
{% for category in categories_list %}
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
<a class="cat mt-1 mb-1"
|
|
18
|
+
href="{{page.permalink}}/categories#{{ category[0] | url_escape | strip | replace: ' ', '-' }}">{{
|
|
16
19
|
category[0]
|
|
17
20
|
| camelcase }} ({{ category[1].size }})</a>
|
|
18
21
|
{% endfor %}
|
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,44 @@
|
|
|
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
|
+
<span id="loaderMeaning" style="font-size: 20px">Loading </span><div class="spinner-border" id="loaderMeaning1"></div>
|
|
124
|
+
<h2 id="err" style="display: none;">No Definition Found!</h2>
|
|
125
|
+
<h4 id="noun" style="display: none;"><b>Noun</b></h4>
|
|
126
|
+
<h4 id="verb" style="display: none;"><b>Verb</b></h4>
|
|
127
|
+
<h4 id="adj" style="display: none;"><b>Adjective</b></h4>
|
|
128
|
+
<h4 id="adv" style="display: none;"><b>Adverb</b></h4>
|
|
129
|
+
</div>
|
|
103
130
|
</div>
|
|
104
131
|
</div>
|
|
105
132
|
|
data/assets/css/wordGroup.css
CHANGED
|
@@ -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;
|
|
@@ -109,6 +114,7 @@
|
|
|
109
114
|
border-radius: 5px;
|
|
110
115
|
margin: 6px 6px;
|
|
111
116
|
width: auto;
|
|
117
|
+
min-width: 100px;
|
|
112
118
|
text-align: center;
|
|
113
119
|
}
|
|
114
120
|
.certainWordsList .anchor__style {
|
|
@@ -124,6 +130,73 @@
|
|
|
124
130
|
top:8px;
|
|
125
131
|
left: 5px;
|
|
126
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
|
+
|
|
127
200
|
@media (max-width: 768px) {
|
|
128
201
|
.letterswords > .wordListHeading{
|
|
129
202
|
padding:10px 15px 5px 15px;
|
|
@@ -6,6 +6,106 @@ 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
|
+
document.getElementById("loaderMeaning").style.display = "none";
|
|
94
|
+
document.getElementById("loaderMeaning1").style.display = "none";
|
|
95
|
+
} else {
|
|
96
|
+
document.getElementById("loaderMeaning").style.display = "none";
|
|
97
|
+
document.getElementById("loaderMeaning1").style.display = "none";
|
|
98
|
+
document.getElementById("err").style.display = "block";
|
|
99
|
+
}
|
|
100
|
+
} catch (e) {
|
|
101
|
+
document.getElementById("loaderMeaning").style.display = "none";
|
|
102
|
+
document.getElementById("loaderMeaning1").style.display = "none";
|
|
103
|
+
document.getElementById("err").style.display = "block";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
fetchMeaning(serachValue);
|
|
108
|
+
|
|
9
109
|
const fetchTWL06Dic = async (serachValue) => {
|
|
10
110
|
let newAlphabet = {
|
|
11
111
|
a: 1,
|
|
@@ -45,8 +145,10 @@ const fetchTWL06Dic = async (serachValue) => {
|
|
|
45
145
|
|
|
46
146
|
try {
|
|
47
147
|
let res = await fetch(`/.netlify/functions/gettwl06?search=${serachValue}`)
|
|
148
|
+
|
|
48
149
|
let getData = await res.text()
|
|
49
150
|
|
|
151
|
+
|
|
50
152
|
if (getData) {
|
|
51
153
|
document.getElementsByClassName('found-word')[0].innerHTML = 'Yes'
|
|
52
154
|
document.getElementsByClassName('word-score')[0].innerHTML =
|
|
@@ -100,7 +202,10 @@ const fetchSOWPODSDic = async (serachValue) => {
|
|
|
100
202
|
}
|
|
101
203
|
|
|
102
204
|
let res = await fetch(`/.netlify/functions/getsowpods?search=${serachValue}`)
|
|
205
|
+
|
|
103
206
|
let getData = await res.text()
|
|
207
|
+
|
|
208
|
+
|
|
104
209
|
if (getData) {
|
|
105
210
|
document.getElementsByClassName('found-word')[1].innerHTML = 'Yes'
|
|
106
211
|
document.getElementsByClassName('word-score')[1].innerHTML =
|
|
@@ -150,7 +255,9 @@ const fetchEnableDic = async (serachValue) => {
|
|
|
150
255
|
}
|
|
151
256
|
|
|
152
257
|
let res = await fetch(`/.netlify/functions/getenable?search=${serachValue}`)
|
|
258
|
+
|
|
153
259
|
let getData = await res.text()
|
|
260
|
+
|
|
154
261
|
if (getData) {
|
|
155
262
|
document.getElementsByClassName('found-word')[2].innerHTML = 'Yes'
|
|
156
263
|
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 - 10
|
|
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 = {
|
|
@@ -180,7 +180,7 @@ function wordsStartingWith(data) {
|
|
|
180
180
|
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
|
181
181
|
}
|
|
182
182
|
return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.toLowerCase()}">
|
|
183
|
-
<li
|
|
183
|
+
<li>${item}
|
|
184
184
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
|
185
185
|
</li></a>`
|
|
186
186
|
}
|
|
@@ -257,7 +257,7 @@ function sortPointsby(sortValue, data) {
|
|
|
257
257
|
|
|
258
258
|
const result = newArray.map((item) => {
|
|
259
259
|
return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.words}">
|
|
260
|
-
<li
|
|
260
|
+
<li>${item.words}
|
|
261
261
|
<span class="points" value="${item.points}" style="position:relative; top:4px; font-size:12px"> ${item.points}</span>
|
|
262
262
|
</li></a>`
|
|
263
263
|
})
|
|
@@ -305,7 +305,7 @@ function sortby(sortBool, data) {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.toLowerCase()}">
|
|
308
|
-
<li
|
|
308
|
+
<li>${item}
|
|
309
309
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
|
310
310
|
</li></a>`
|
|
311
311
|
}
|
|
@@ -345,7 +345,7 @@ function sortby(sortBool, data) {
|
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.toLowerCase()}">
|
|
348
|
-
<li
|
|
348
|
+
<li>${item}
|
|
349
349
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
|
350
350
|
</li></a>`
|
|
351
351
|
}
|
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.9
|
|
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-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|