word-games-theme 0.1.4 → 0.1.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/lexical_word_finder.json +42 -35
- data/_data/wordgames/en/scrabble_word_finder_cheat.json +30 -36
- data/_data/wordgames/en/six_letter_word_finder.json +69 -69
- data/_includes/section/commonPage.html +23 -49
- data/_includes/section/home.html +37 -16
- data/_includes/section/home2.html +37 -46
- data/_layouts/default.html +11 -2
- data/_layouts/page.html +58 -4
- data/_layouts/page2.html +61 -0
- data/assets/css/about.css +1 -1
- data/assets/css/advancedFilter.css +33 -7
- data/assets/css/feature.css +2 -0
- data/assets/css/footer.css +1 -0
- data/assets/css/home.css +75 -27
- data/assets/css/news.css +5 -2
- data/assets/css/style.css +15 -3
- data/assets/images/search.svg +1 -0
- data/assets/js/X-letter.js +187 -28
- data/assets/js/advancedFilter.js +4 -4
- data/assets/js/advancedFilter2.js +12 -5
- data/assets/js/advancedFilter3.js +2 -2
- data/assets/js/scrabbleDictonary.js +3 -0
- data/assets/js/wordScrabble.js +153 -6
- metadata +4 -2
data/assets/css/feature.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.feature {
|
|
2
2
|
margin-top: -120px;
|
|
3
3
|
margin-left: 60px;
|
|
4
|
+
margin-bottom: 450px;
|
|
4
5
|
color: #fff;
|
|
5
6
|
}
|
|
6
7
|
.feature img {
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
background-color: #b641da;
|
|
46
47
|
margin-left: 0;
|
|
47
48
|
margin-top: 0;
|
|
49
|
+
margin-bottom: 0;
|
|
48
50
|
}
|
|
49
51
|
.feature .feature-title,
|
|
50
52
|
.feature-description {
|
data/assets/css/footer.css
CHANGED
data/assets/css/home.css
CHANGED
|
@@ -8,38 +8,67 @@
|
|
|
8
8
|
background: url(../images/bg_elements.png);
|
|
9
9
|
background-position: center;
|
|
10
10
|
background-size: cover;
|
|
11
|
-
margin-bottom:
|
|
11
|
+
margin-bottom: 20vh;
|
|
12
12
|
}
|
|
13
13
|
.serachSection {
|
|
14
14
|
height: 50px;
|
|
15
15
|
position: relative;
|
|
16
16
|
}
|
|
17
|
+
input:-webkit-autofill,
|
|
18
|
+
input:-webkit-autofill:hover,
|
|
19
|
+
input:-webkit-autofill:focus,
|
|
20
|
+
input:-webkit-autofill:active {
|
|
21
|
+
transition: background-color 5000s ease-in-out 0s;
|
|
22
|
+
}
|
|
17
23
|
|
|
18
24
|
.txtBox {
|
|
19
25
|
height: 60px;
|
|
20
|
-
border-radius:
|
|
26
|
+
border-radius: 8px;
|
|
21
27
|
border: solid 1px rgba(0, 0, 0, 0.1);
|
|
22
28
|
background: #fff;
|
|
23
29
|
padding: 0;
|
|
24
30
|
width: 100%;
|
|
25
31
|
font-size: 15px;
|
|
26
|
-
font-weight:
|
|
32
|
+
font-weight: 700;
|
|
27
33
|
font-style: normal;
|
|
28
34
|
letter-spacing: normal;
|
|
29
35
|
color: var(--txtColor);
|
|
30
36
|
text-indent: 15px;
|
|
31
37
|
outline: none;
|
|
32
38
|
}
|
|
39
|
+
.txtBox::placeholder {
|
|
40
|
+
/* Chrome, Firefox, Opera, Safari 10.1+ */
|
|
41
|
+
color: var(--txtColor);
|
|
42
|
+
opacity: 0.5; /* Firefox */
|
|
43
|
+
font-weight: 500 !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.txtBox::-ms-input-placeholder {
|
|
47
|
+
/* Internet Explorer 10-11 */
|
|
48
|
+
color: var(--txtColor);
|
|
49
|
+
opacity: 0.5;
|
|
50
|
+
font-weight: 500 !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.txtBox::-ms-input-placeholder {
|
|
54
|
+
/* Microsoft Edge */
|
|
55
|
+
color: var(--txtColor);
|
|
56
|
+
opacity: 0.5;
|
|
57
|
+
font-weight: 500 !important;
|
|
58
|
+
}
|
|
33
59
|
.serachBtn {
|
|
34
|
-
background: url(../images/
|
|
35
|
-
background-size:
|
|
36
|
-
height:
|
|
37
|
-
width:
|
|
60
|
+
background: url(../images/search.svg) no-repeat center center;
|
|
61
|
+
background-size: 35px 35px;
|
|
62
|
+
height: 59px;
|
|
63
|
+
width: 59px;
|
|
38
64
|
border: none;
|
|
39
65
|
position: absolute;
|
|
40
|
-
top:
|
|
41
|
-
right:
|
|
66
|
+
top: 0px;
|
|
67
|
+
right: 0px;
|
|
42
68
|
outline: none;
|
|
69
|
+
border-top-right-radius: 8px;
|
|
70
|
+
border-bottom-right-radius: 8px;
|
|
71
|
+
background-color: #000;
|
|
43
72
|
}
|
|
44
73
|
.advancedFilter .filterButton {
|
|
45
74
|
background: #f8f9fa;
|
|
@@ -68,7 +97,7 @@
|
|
|
68
97
|
right: 9px;
|
|
69
98
|
margin: -3px 0;
|
|
70
99
|
cursor: pointer;
|
|
71
|
-
z-index: 9999;
|
|
100
|
+
/* z-index: 9999; */
|
|
72
101
|
}
|
|
73
102
|
#select_dropDown {
|
|
74
103
|
background: #f8f9fa;
|
|
@@ -89,18 +118,20 @@
|
|
|
89
118
|
}
|
|
90
119
|
.select_dropDown2 {
|
|
91
120
|
position: absolute;
|
|
92
|
-
top:
|
|
121
|
+
top: 0px;
|
|
93
122
|
font-size: 15px;
|
|
94
123
|
width: 156px;
|
|
95
124
|
overflow: hidden;
|
|
96
125
|
object-fit: cover;
|
|
97
126
|
right: 69px;
|
|
98
|
-
padding:
|
|
127
|
+
padding: 18px 0;
|
|
99
128
|
border-radius: 0;
|
|
100
129
|
border: none;
|
|
101
130
|
box-shadow: none;
|
|
102
131
|
background: white;
|
|
103
132
|
border-left: 1px solid rgba(0, 0, 0, 0.11);
|
|
133
|
+
border-top: 1px solid rgba(0, 0, 0, 0.11);
|
|
134
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.11);
|
|
104
135
|
}
|
|
105
136
|
.select_dropDown2:focus {
|
|
106
137
|
outline: none;
|
|
@@ -113,22 +144,30 @@
|
|
|
113
144
|
text-indent: 12px;
|
|
114
145
|
}
|
|
115
146
|
.fillterWrapper input {
|
|
116
|
-
border-radius:
|
|
147
|
+
border-radius: 10px;
|
|
117
148
|
border: solid 1px rgba(0, 0, 0, 0.11);
|
|
118
149
|
background-color: #fff;
|
|
119
150
|
font-size: 12px;
|
|
120
151
|
padding: 5px;
|
|
121
152
|
text-indent: 15px;
|
|
122
|
-
width:
|
|
153
|
+
width: 190px;
|
|
123
154
|
outline: none;
|
|
124
155
|
}
|
|
125
156
|
.active {
|
|
126
|
-
|
|
157
|
+
z-index: 999;
|
|
158
|
+
top: 122px;
|
|
159
|
+
background: #fff;
|
|
160
|
+
box-shadow: 0 0 5px rgb(0 0 0 / 40%);
|
|
161
|
+
padding: 15px 15px;
|
|
162
|
+
border-radius: 15px;
|
|
163
|
+
height: auto;
|
|
164
|
+
position: absolute;
|
|
165
|
+
right: -16px;
|
|
166
|
+
margin: 1rem 0;
|
|
167
|
+
flex-direction: column;
|
|
168
|
+
width: 240px;
|
|
127
169
|
display: inline-flex !important;
|
|
128
|
-
|
|
129
|
-
height: 15vh;
|
|
130
|
-
align-items: center;
|
|
131
|
-
display: block;
|
|
170
|
+
gap: 5px;
|
|
132
171
|
}
|
|
133
172
|
|
|
134
173
|
.errorMsg {
|
|
@@ -150,18 +189,28 @@
|
|
|
150
189
|
height: 40px !important;
|
|
151
190
|
}
|
|
152
191
|
.serachBtn {
|
|
153
|
-
height:
|
|
154
|
-
width:
|
|
192
|
+
height: 40px !important;
|
|
193
|
+
width: 40px !important;
|
|
155
194
|
}
|
|
156
195
|
.advancedFilter .filterButton {
|
|
157
196
|
top: 60px;
|
|
158
197
|
}
|
|
159
198
|
.select_dropDown2 {
|
|
160
|
-
padding:
|
|
161
|
-
width:
|
|
199
|
+
padding: 8px 0;
|
|
200
|
+
width: 30%;
|
|
201
|
+
right: 40px;
|
|
162
202
|
}
|
|
163
203
|
}
|
|
164
204
|
@media (max-width: 768px) {
|
|
205
|
+
#select_dropDown {
|
|
206
|
+
bottom: 0;
|
|
207
|
+
position: fixed;
|
|
208
|
+
width: 50%;
|
|
209
|
+
right: 0;
|
|
210
|
+
border-radius: 0;
|
|
211
|
+
padding: 9.5px;
|
|
212
|
+
z-index: 99;
|
|
213
|
+
}
|
|
165
214
|
.pageHeading h1 {
|
|
166
215
|
font-size: 2.5rem;
|
|
167
216
|
}
|
|
@@ -169,10 +218,9 @@
|
|
|
169
218
|
width: 100% !important;
|
|
170
219
|
}
|
|
171
220
|
.active {
|
|
172
|
-
|
|
173
|
-
display:
|
|
174
|
-
|
|
175
|
-
align-items: unset;
|
|
221
|
+
top: 102px;
|
|
222
|
+
display: flex;
|
|
223
|
+
right: -5px;
|
|
176
224
|
}
|
|
177
225
|
.fillterWrapper input {
|
|
178
226
|
width: 100%;
|
data/assets/css/news.css
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
.rowHeight2 {
|
|
2
|
-
|
|
2
|
+
position: relative;
|
|
3
|
+
top: 300px;
|
|
4
|
+
margin-bottom: 550px;
|
|
3
5
|
}
|
|
4
6
|
.news {
|
|
5
7
|
margin-top: -120px;
|
|
@@ -44,8 +46,9 @@
|
|
|
44
46
|
}
|
|
45
47
|
@media (max-width: 1125px) {
|
|
46
48
|
.rowHeight2 {
|
|
47
|
-
margin-top:
|
|
49
|
+
margin-top: 50px;
|
|
48
50
|
margin-bottom: 120px;
|
|
51
|
+
top: 0;
|
|
49
52
|
}
|
|
50
53
|
.news {
|
|
51
54
|
padding: 15px;
|
data/assets/css/style.css
CHANGED
|
@@ -33,6 +33,7 @@ header {
|
|
|
33
33
|
width: 100%;
|
|
34
34
|
position: relative;
|
|
35
35
|
}
|
|
36
|
+
|
|
36
37
|
.navbar {
|
|
37
38
|
width: 100%;
|
|
38
39
|
padding: 1.2rem 10rem !important;
|
|
@@ -110,7 +111,7 @@ header {
|
|
|
110
111
|
right: 5px;
|
|
111
112
|
margin: -3px 0;
|
|
112
113
|
cursor: pointer;
|
|
113
|
-
z-index: 999;
|
|
114
|
+
/* z-index: 999; */
|
|
114
115
|
}
|
|
115
116
|
.post-link {
|
|
116
117
|
font-size: 1.5rem;
|
|
@@ -123,6 +124,17 @@ header {
|
|
|
123
124
|
color: #fff;
|
|
124
125
|
}
|
|
125
126
|
|
|
127
|
+
.hide {
|
|
128
|
+
visibility: hidden;
|
|
129
|
+
}
|
|
130
|
+
.fa-times {
|
|
131
|
+
position: absolute;
|
|
132
|
+
top: 12px;
|
|
133
|
+
right: 15px;
|
|
134
|
+
font-size: 15px;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
}
|
|
137
|
+
|
|
126
138
|
/* newspaper subscribbe styling */
|
|
127
139
|
.alertbar {
|
|
128
140
|
box-shadow: 0 -3px 10px 0 rgba(0, 0, 0, 0.0785);
|
|
@@ -224,8 +236,8 @@ header {
|
|
|
224
236
|
}
|
|
225
237
|
.angle-arrow {
|
|
226
238
|
position: fixed;
|
|
227
|
-
bottom:
|
|
228
|
-
right:
|
|
239
|
+
bottom: 5px;
|
|
240
|
+
right: 52%;
|
|
229
241
|
z-index: 999;
|
|
230
242
|
top: auto;
|
|
231
243
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#FFFFFF"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
|
data/assets/js/X-letter.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
---
|
|
3
|
+
const getScript=document.currentScript
|
|
4
|
+
const letterLen = getScript.dataset.letter
|
|
5
|
+
|
|
1
6
|
let errorMsg = document.querySelector('.errorMsg')
|
|
2
7
|
let wordCount = document.querySelector('.wordCount')
|
|
3
8
|
let main = document.querySelector('.main')
|
|
@@ -12,6 +17,12 @@ let dictonary = params.get('dictonary')
|
|
|
12
17
|
|
|
13
18
|
let tab_container = document.querySelector('.tab_container')
|
|
14
19
|
|
|
20
|
+
let txtBox = document.querySelector('.txtBox')
|
|
21
|
+
txtBox.value = serachValue
|
|
22
|
+
|
|
23
|
+
var theSelect = document.getElementById('select_dropDown')
|
|
24
|
+
document.querySelector('.select_dropDown2').value = dictonary
|
|
25
|
+
|
|
15
26
|
const getData = async (serachValue) => {
|
|
16
27
|
try {
|
|
17
28
|
main.innerHTML = `<div class="loader">
|
|
@@ -40,40 +51,54 @@ function x_with_letters(data) {
|
|
|
40
51
|
let newWordsLength = 0
|
|
41
52
|
let filterData = ''
|
|
42
53
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
filterData =
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} else if (window.location.pathname == '/two-letter-word-finder/result') {
|
|
70
|
-
filterData = data.filter((item) => item.length == 2)
|
|
54
|
+
|
|
55
|
+
if (letterLen) {
|
|
56
|
+
filterData = data.filter((item) => item.length == letterLen)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
if (prefixValue) {
|
|
61
|
+
filterData = filterData.filter((item2) =>
|
|
62
|
+
item2.startsWith(prefixValue.toLowerCase())
|
|
63
|
+
)
|
|
64
|
+
startsWith.classList.add('tick')
|
|
65
|
+
startsWith.value = prefixValue
|
|
66
|
+
}
|
|
67
|
+
if (containsValue) {
|
|
68
|
+
filterData = filterData.filter((item) =>
|
|
69
|
+
item.includes(containsValue.toLowerCase())
|
|
70
|
+
)
|
|
71
|
+
mustInclude.classList.add('tick')
|
|
72
|
+
mustInclude.value = containsValue
|
|
73
|
+
}
|
|
74
|
+
if (suffixValue) {
|
|
75
|
+
filterData = filterData.filter((item) =>
|
|
76
|
+
item.endsWith(suffixValue.toLowerCase())
|
|
77
|
+
)
|
|
78
|
+
endsWith.classList.add('tick')
|
|
79
|
+
endsWith.value = suffixValue
|
|
71
80
|
}
|
|
72
81
|
|
|
73
82
|
if (filterData.length === 0) {
|
|
74
83
|
main.innerHTML += ''
|
|
75
84
|
errorMsg.innerHTML = 'No words Found with this length'
|
|
76
85
|
} else {
|
|
86
|
+
// sort eventlistener
|
|
87
|
+
theSelect.addEventListener('change', () => {
|
|
88
|
+
sortValue = theSelect[theSelect.selectedIndex].text
|
|
89
|
+
if (sortValue == 'Z-A') {
|
|
90
|
+
sortBool = true
|
|
91
|
+
sortby(sortBool, filterData, itemLength)
|
|
92
|
+
} else {
|
|
93
|
+
sortBool = false
|
|
94
|
+
sortby(sortBool, filterData, itemLength)
|
|
95
|
+
}
|
|
96
|
+
if (sortValue == 'Points') {
|
|
97
|
+
sortBool = true
|
|
98
|
+
sortPointsby(sortBool, filterData, itemLength)
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
|
|
77
102
|
newWordsLength += filterData.length
|
|
78
103
|
let itemLength = ''
|
|
79
104
|
const result = filterData.map((item) => {
|
|
@@ -84,6 +109,7 @@ function x_with_letters(data) {
|
|
|
84
109
|
for (let i = 0; i < item.length; i++) {
|
|
85
110
|
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
|
86
111
|
}
|
|
112
|
+
wordLength.value = itemLength
|
|
87
113
|
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
|
88
114
|
<li>${item}
|
|
89
115
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
|
@@ -96,6 +122,7 @@ function x_with_letters(data) {
|
|
|
96
122
|
class="tab_link">
|
|
97
123
|
</a>
|
|
98
124
|
`
|
|
125
|
+
|
|
99
126
|
let tabs = document.getElementsByClassName('tab_link')
|
|
100
127
|
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
|
101
128
|
|
|
@@ -118,6 +145,138 @@ function x_with_letters(data) {
|
|
|
118
145
|
}
|
|
119
146
|
}
|
|
120
147
|
|
|
148
|
+
//Handling of filter counter in advanced filter
|
|
149
|
+
function addFilterCount() {
|
|
150
|
+
let filter_val = document.getElementsByClassName('filter_val')
|
|
151
|
+
let filter = document.querySelector('.filter_count')
|
|
152
|
+
let filter_count = 0
|
|
153
|
+
|
|
154
|
+
filter_val[0].value = prefixValue
|
|
155
|
+
filter_val[1].value = containsValue
|
|
156
|
+
filter_val[2].value = suffixValue
|
|
157
|
+
filter_val[3].value = lengthValue
|
|
158
|
+
|
|
159
|
+
for (var i = 0; i < 4; i++) {
|
|
160
|
+
if (filter_val[i].value != '') {
|
|
161
|
+
filter_count += 1
|
|
162
|
+
}
|
|
163
|
+
if (filter_count === 0) {
|
|
164
|
+
filter.style.display = 'none'
|
|
165
|
+
} else {
|
|
166
|
+
filter.style.display = 'inline-block'
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
filter.innerHTML = filter_count
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
addFilterCount()
|
|
173
|
+
|
|
174
|
+
// sorting by points
|
|
175
|
+
function sortPointsby(sortValue, data, i) {
|
|
176
|
+
if (sortValue) {
|
|
177
|
+
main.innerHTML = ''
|
|
178
|
+
let newArray = []
|
|
179
|
+
data.map((item) => {
|
|
180
|
+
let ScrabbleLetterScore = ScrabbleScore()
|
|
181
|
+
let points = 0
|
|
182
|
+
item = item.toLowerCase()
|
|
183
|
+
for (let i = 0; i < item.length; i++) {
|
|
184
|
+
points += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
|
185
|
+
}
|
|
186
|
+
const value = {
|
|
187
|
+
words: item,
|
|
188
|
+
points: points,
|
|
189
|
+
}
|
|
190
|
+
newArray.push(value)
|
|
191
|
+
newArray.sort(function (a, b) {
|
|
192
|
+
return b.points - a.points
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
const result = newArray.map((item) => {
|
|
196
|
+
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item.words}">
|
|
197
|
+
<li>${item.words}
|
|
198
|
+
<span class="points" value="${item.points}" style="position:relative; top:4px; font-size:12px"> ${item.points}</span>
|
|
199
|
+
</li></a>`
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
main.innerHTML += `
|
|
203
|
+
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
|
204
|
+
<div class="wordListHeading">
|
|
205
|
+
<h3 class="lead">${i} Letter Words</h3>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="wordList">
|
|
208
|
+
<ul class="ul list-unstyled">
|
|
209
|
+
${result.join('')}
|
|
210
|
+
</ul>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
`
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// sort by aplhabets
|
|
218
|
+
function sortby(sortBool, data, i) {
|
|
219
|
+
if (sortBool) {
|
|
220
|
+
main.innerHTML = ''
|
|
221
|
+
data.reverse()
|
|
222
|
+
const result = data.map((item) => {
|
|
223
|
+
let ScrabbleLetterScore = ScrabbleScore()
|
|
224
|
+
let sum = 0
|
|
225
|
+
item = item.toLowerCase()
|
|
226
|
+
for (let i = 0; i < item.length; i++) {
|
|
227
|
+
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
|
228
|
+
}
|
|
229
|
+
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
|
230
|
+
<li>${item}
|
|
231
|
+
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
|
232
|
+
</li></a>`
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
main.innerHTML += `
|
|
236
|
+
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
|
237
|
+
<div class="wordListHeading">
|
|
238
|
+
<h3 class="lead">${i} Letter Words</h3>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="wordList">
|
|
241
|
+
<ul class="ul list-unstyled">
|
|
242
|
+
${result.join('')}
|
|
243
|
+
</ul>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
`
|
|
248
|
+
} else {
|
|
249
|
+
main.innerHTML = ''
|
|
250
|
+
data.sort()
|
|
251
|
+
const result = data.map((item) => {
|
|
252
|
+
let ScrabbleLetterScore = ScrabbleScore()
|
|
253
|
+
let sum = 0
|
|
254
|
+
item = item.toLowerCase()
|
|
255
|
+
for (let i = 0; i < item.length; i++) {
|
|
256
|
+
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
|
257
|
+
}
|
|
258
|
+
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
|
259
|
+
<li>${item}
|
|
260
|
+
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
|
261
|
+
</li></a>`
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
main.innerHTML += `
|
|
265
|
+
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
|
266
|
+
<div class="wordListHeading">
|
|
267
|
+
<h3 class="lead">${i} Letter Words</h3>
|
|
268
|
+
</div>
|
|
269
|
+
<div class="wordList">
|
|
270
|
+
<ul class="ul list-unstyled">
|
|
271
|
+
${result.join('')}
|
|
272
|
+
</ul>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
`
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
121
280
|
// Implement Active class
|
|
122
281
|
const addFilter = () => {
|
|
123
282
|
let tabs = document.getElementsByClassName('tab_link')
|