appscms-tools-theme 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0aa54b051939dc3460cd9fff6ce23f00eea899934c5520d0e093c632eca3d697
4
- data.tar.gz: b566c645d99a56a21990bcd58cef989d2a13dd2d8b3d41444747197b41ebed85
3
+ metadata.gz: 895cf085a13d402a224cc707ef1ea0f033f8ed64d575926eaf5aa11232ef14be
4
+ data.tar.gz: 515ec3c50e1bc2f5abaabc8798725eb6ad28a406389ac6240eeaf5ce6f7316a6
5
5
  SHA512:
6
- metadata.gz: 3bee36f37fce5458ca715efdb3aed1a12bd957878f64d88f20920f624ba25fe1bcccfebc94ad462a8fe409a51aa7d955aaff69cfb4957f5beb16aac9f57e2fcf
7
- data.tar.gz: 43025dbd0f76e73da5817ac2026986bd2ea34cca033ae03b1e1668da29554f672095bbd624b388a4869fd035a9d0005805ccb60dbcd936e6f60695b5257e9684
6
+ metadata.gz: f7a42ec7725588def23a14c2d1b782ed0f902cf803a15c99f01ad33d2e0f88ee1bb0e6c5b79f04a0e9b6945ea88bafc263ee9c6d12aa512621c24de5374c0568
7
+ data.tar.gz: a1d8c6d7accaac6fe2dd9b7a6ee93db55416edfbfebf287f947d5b90dd98d82da1203ea72987092223e873989543f6551079c407084f9d0aecdea44255e9127d
@@ -0,0 +1,200 @@
1
+ let errorMsg = document.querySelector('.errorMsg')
2
+ let wordCount = document.querySelector('.wordCount')
3
+ let main = document.querySelector('.main')
4
+
5
+ const params = new URLSearchParams(window.location.search)
6
+ let serachValue = params.get('search')
7
+ let prefixValue = params.get('prefix')
8
+ let containsValue = params.get('contains')
9
+ let suffixValue = params.get('suffix')
10
+ let lengthValue = params.get('length')
11
+ let dictonary = params.get('dictonary')
12
+
13
+ let tab_container = document.querySelector('.tab_container')
14
+
15
+ const getData = async (serachValue) => {
16
+ try {
17
+ main.innerHTML = `<div class="loader">
18
+ <img src='/assets/images/loading.gif'>
19
+ </div>`
20
+ const response = await fetch(
21
+ `/.netlify/functions/getWords?name=${serachValue}`
22
+ )
23
+ const data = await response.json()
24
+ main.innerHTML = ''
25
+ x_with_letters(data)
26
+ } catch (error) {
27
+ console.log(error)
28
+ }
29
+ }
30
+ // calling function
31
+ getData(serachValue.toLowerCase())
32
+
33
+ function x_with_letters(data) {
34
+ if (typeof data === 'string') {
35
+ errorMsg.innerHTML = 'No words found'
36
+ wordCount.innerHTML = `<strong> 0 words with letters ${serachValue.split(
37
+ ''
38
+ )}</strong>`
39
+ } else {
40
+ let newWordsLength = 0
41
+ let filterData = ''
42
+
43
+ if (window.location.pathname == '/thirteen-letter-word-finder/result') {
44
+ filterData = data.filter((item) => item.length == 13)
45
+ } else if (
46
+ window.location.pathname == '/twelve-letter-word-finder/result'
47
+ ) {
48
+ filterData = data.filter((item) => item.length == 12)
49
+ } else if (
50
+ window.location.pathname == '/eleven-letter-word-finder/result'
51
+ ) {
52
+ filterData = data.filter((item) => item.length == 11)
53
+ } else if (window.location.pathname == '/ten-letter-word-finder/result') {
54
+ filterData = data.filter((item) => item.length == 10)
55
+ } else if (window.location.pathname == '/nine-letter-word-finder/result') {
56
+ filterData = data.filter((item) => item.length == 9)
57
+ } else if (window.location.pathname == '/eight-letter-word-finder/result') {
58
+ filterData = data.filter((item) => item.length == 8)
59
+ } else if (window.location.pathname == '/seven-letter-word-finder/result') {
60
+ filterData = data.filter((item) => item.length == 7)
61
+ } else if (window.location.pathname == '/six-letter-word-finder/result') {
62
+ filterData = data.filter((item) => item.length == 6)
63
+ } else if (window.location.pathname == '/five-letter-word-finder/result') {
64
+ filterData = data.filter((item) => item.length == 5)
65
+ } else if (window.location.pathname == '/four-letter-word-finder/result') {
66
+ filterData = data.filter((item) => item.length == 4)
67
+ } else if (window.location.pathname == '/three-letter-word-finder/result') {
68
+ filterData = data.filter((item) => item.length == 3)
69
+ } else if (window.location.pathname == '/two-letter-word-finder/result') {
70
+ filterData = data.filter((item) => item.length == 2)
71
+ }
72
+
73
+ if (filterData.length === 0) {
74
+ main.innerHTML += ''
75
+ errorMsg.innerHTML = 'No words Found with this length'
76
+ } else {
77
+ newWordsLength += filterData.length
78
+ let itemLength = ''
79
+ const result = filterData.map((item) => {
80
+ itemLength = item.length
81
+ let ScrabbleLetterScore = ScrabbleScore()
82
+ sum = 0
83
+ item = item.toLowerCase()
84
+ for (let i = 0; i < item.length; i++) {
85
+ sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
86
+ }
87
+ return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
88
+ <li>${item}
89
+ <span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
90
+ </li></a>`
91
+ })
92
+
93
+ tab_container.innerHTML += `
94
+ <a href="#${itemLength}">
95
+ <input type="button" value="${itemLength} Letter" id="Tab${itemLength}" onclick="addFilter(${itemLength})"
96
+ class="tab_link">
97
+ </a>
98
+ `
99
+ let tabs = document.getElementsByClassName('tab_link')
100
+ tabs[0] ? tabs[0].classList.add('active-tab') : ''
101
+
102
+ main.innerHTML += `
103
+ <div class="allGroupWords">
104
+ <div class="wordListHeading">
105
+ <h3 class="lead">${itemLength} Letter Words</h3>
106
+ </div>
107
+ <div class="wordList">
108
+ <ul class="ul list-unstyled">
109
+ ${result.join('')}
110
+ </ul>
111
+ </div>
112
+ </div>
113
+ `
114
+ }
115
+ wordCount.innerHTML = `<strong>${newWordsLength} words with letters ${serachValue.split(
116
+ ''
117
+ )}</strong>`
118
+ }
119
+ }
120
+
121
+ // Implement Active class
122
+ const addFilter = () => {
123
+ let tabs = document.getElementsByClassName('tab_link')
124
+ tabs[0] ? tabs[0].classList.add('active-tab') : ''
125
+
126
+ Array.from(tabs).map((item) => {
127
+ item.classList.remove('active-tab')
128
+ })
129
+ main.innerHTML += ``
130
+ let activeLetter = event.target
131
+ // console.log(activeLetter)
132
+ activeLetter.classList.add('active-tab')
133
+ }
134
+
135
+ // Scrabble Point Counts
136
+ const ScrabbleScore = () => {
137
+ let twl06_sowpods = {
138
+ a: 1,
139
+ e: 1,
140
+ i: 1,
141
+ o: 1,
142
+ u: 1,
143
+ l: 1,
144
+ n: 1,
145
+ r: 1,
146
+ s: 1,
147
+ t: 1,
148
+ d: 2,
149
+ g: 2,
150
+ b: 3,
151
+ c: 3,
152
+ m: 3,
153
+ p: 3,
154
+ f: 4,
155
+ h: 4,
156
+ v: 4,
157
+ w: 4,
158
+ y: 4,
159
+ k: 5,
160
+ j: 8,
161
+ x: 8,
162
+ q: 10,
163
+ z: 10,
164
+ }
165
+
166
+ let wwfScore = {
167
+ a: 1,
168
+ b: 4,
169
+ c: 4,
170
+ d: 2,
171
+ e: 1,
172
+ f: 4,
173
+ g: 3,
174
+ h: 3,
175
+ i: 1,
176
+ j: 10,
177
+ k: 5,
178
+ l: 2,
179
+ m: 4,
180
+ n: 2,
181
+ o: 1,
182
+ p: 4,
183
+ q: 10,
184
+ r: 1,
185
+ s: 1,
186
+ t: 1,
187
+ u: 2,
188
+ v: 5,
189
+ w: 4,
190
+ x: 8,
191
+ y: 3,
192
+ z: 10,
193
+ }
194
+
195
+ if (dictonary === 'wwf') {
196
+ return wwfScore
197
+ } else {
198
+ return twl06_sowpods
199
+ }
200
+ }
@@ -0,0 +1,5 @@
1
+ const Advancedbtn = document.querySelector('.Advancedbtn')
2
+ Advancedbtn.style.display = 'none'
3
+
4
+ const sortSelect = document.querySelector('#sort-select')
5
+ sortSelect.style.display = 'none'
@@ -0,0 +1,5 @@
1
+ const advancedFilter = document.querySelector('.advancedFilter')
2
+ const fillterWrapper = document.querySelector('.fillterWrapper')
3
+ advancedFilter.addEventListener('click', () => {
4
+ fillterWrapper.classList.toggle('active')
5
+ })
@@ -0,0 +1,2 @@
1
+ const advancedFilter = document.querySelector('.advancedFilter')
2
+ advancedFilter.style.display = ' none'
@@ -0,0 +1,162 @@
1
+ // getqueryUrl from form
2
+ const params = new URLSearchParams(window.location.search)
3
+ let serachValue = params.get('search')
4
+
5
+ // DICTONARY
6
+ const fetchTWL06Dic = async (serachValue) => {
7
+ let newAlphabet = {
8
+ a: 1,
9
+ e: 1,
10
+ i: 1,
11
+ o: 1,
12
+ u: 1,
13
+ l: 1,
14
+ n: 1,
15
+ r: 1,
16
+ s: 1,
17
+ t: 1,
18
+ d: 2,
19
+ g: 2,
20
+ b: 3,
21
+ c: 3,
22
+ m: 3,
23
+ p: 3,
24
+ f: 4,
25
+ h: 4,
26
+ v: 4,
27
+ w: 4,
28
+ y: 4,
29
+ k: 5,
30
+ j: 8,
31
+ x: 8,
32
+ q: 10,
33
+ z: 10,
34
+ }
35
+
36
+ let sum = 0
37
+ let item = serachValue.toLowerCase()
38
+
39
+ for (let i = 0; i < item.length; i++) {
40
+ sum += newAlphabet[item[i]] || 0 // for unknown characters
41
+ }
42
+
43
+ try {
44
+ let res = await fetch(`/.netlify/functions/gettwl06?search=${serachValue}`)
45
+ let getData = await res.text()
46
+
47
+ if (getData) {
48
+ document.getElementsByClassName('found-word')[0].innerHTML = 'Yes'
49
+ document.getElementsByClassName('word-score')[0].innerHTML =
50
+ sum + ' ' + 'Points'
51
+ } else {
52
+ document.getElementsByClassName('found-word')[0].style.background =
53
+ '#F34423'
54
+ document.getElementsByClassName('found-word')[0].innerHTML = 'No'
55
+ }
56
+ } catch (error) {
57
+ console.log(error)
58
+ }
59
+ }
60
+ fetchTWL06Dic(serachValue)
61
+
62
+ const fetchSOWPODSDic = async (serachValue) => {
63
+ let newAlphabet = {
64
+ a: 1,
65
+ e: 1,
66
+ i: 1,
67
+ o: 1,
68
+ u: 1,
69
+ l: 1,
70
+ n: 1,
71
+ r: 1,
72
+ s: 1,
73
+ t: 1,
74
+ d: 2,
75
+ g: 2,
76
+ b: 3,
77
+ c: 3,
78
+ m: 3,
79
+ p: 3,
80
+ f: 4,
81
+ h: 4,
82
+ v: 4,
83
+ w: 4,
84
+ y: 4,
85
+ k: 5,
86
+ j: 8,
87
+ x: 8,
88
+ q: 10,
89
+ z: 10,
90
+ }
91
+ let sum = 0
92
+
93
+ let item = serachValue.toLowerCase()
94
+
95
+ for (let i = 0; i < item.length; i++) {
96
+ sum += newAlphabet[item[i]] || 0 // for unknown characters
97
+ }
98
+
99
+ let res = await fetch(`/.netlify/functions/getsowpods?search=${serachValue}`)
100
+ let getData = await res.text()
101
+ if (getData) {
102
+ document.getElementsByClassName('found-word')[1].innerHTML = 'Yes'
103
+ document.getElementsByClassName('word-score')[1].innerHTML =
104
+ sum + ' ' + 'Points'
105
+ } else {
106
+ document.getElementsByClassName('found-word')[1].style.background =
107
+ '#F34423'
108
+ document.getElementsByClassName('found-word')[1].innerHTML = 'No'
109
+ }
110
+ }
111
+ fetchSOWPODSDic(serachValue)
112
+
113
+ const fetchEnableDic = async (serachValue) => {
114
+ let newAlphabet = {
115
+ a: 1,
116
+ b: 4,
117
+ c: 4,
118
+ d: 2,
119
+ e: 1,
120
+ f: 4,
121
+ g: 3,
122
+ h: 3,
123
+ i: 1,
124
+ j: 10,
125
+ k: 5,
126
+ l: 2,
127
+ m: 4,
128
+ n: 2,
129
+ o: 1,
130
+ p: 4,
131
+ q: 10,
132
+ r: 1,
133
+ s: 1,
134
+ t: 1,
135
+ u: 2,
136
+ v: 5,
137
+ w: 4,
138
+ x: 8,
139
+ y: 3,
140
+ z: 10,
141
+ }
142
+ let sum = 0
143
+ let item = serachValue.toLowerCase()
144
+
145
+ for (let i = 0; i < item.length; i++) {
146
+ sum += newAlphabet[item[i]] || 0 // for unknown characters
147
+ }
148
+
149
+ let res = await fetch(`/.netlify/functions/getenable?search=${serachValue}`)
150
+ let getData = await res.text()
151
+ if (getData) {
152
+ document.getElementsByClassName('found-word')[2].innerHTML = 'Yes'
153
+ document.getElementsByClassName('word-score')[2].innerHTML =
154
+ sum + ' ' + 'Points'
155
+ } else {
156
+ document.getElementsByClassName('found-word')[2].style.background =
157
+ '#F34423'
158
+ document.getElementsByClassName('found-word')[2].innerHTML = 'No'
159
+ }
160
+ }
161
+
162
+ fetchEnableDic(serachValue)
@@ -0,0 +1,363 @@
1
+ // grab some html elements
2
+ let form = document.querySelector('#form')
3
+ let wordCount = document.querySelector('.wordCount')
4
+ let main = document.querySelector('.main')
5
+ let errorMsg = document.querySelector('.errorMsg')
6
+
7
+ // getqueryUrl from form
8
+ const params = new URLSearchParams(window.location.search)
9
+ let serachValue = params.get('search')
10
+ let prefixValue = params.get('prefix')
11
+ let containsValue = params.get('contains')
12
+ let suffixValue = params.get('suffix')
13
+ let lengthValue = params.get('length')
14
+ let dictonary = params.get('dictonary')
15
+
16
+ let ok = true
17
+
18
+ let tab_container = document.querySelector('.tab_container')
19
+
20
+ var sortValue
21
+ var sortBool = false
22
+ var theSelect = document.getElementById('select_dropDown')
23
+
24
+ // getWords define...
25
+ const getData = async (serachValue) => {
26
+ try {
27
+ main.innerHTML = `<div class="loader">
28
+ <img src='/assets/images/loading.gif'>
29
+ </div>`
30
+ /// loader
31
+ const response = await fetch(
32
+ `/.netlify/functions/getWords?name=${serachValue}`
33
+ )
34
+ const data = await response.json()
35
+ main.innerHTML = ''
36
+ getWords(data)
37
+ //getWords calling...
38
+ } catch (error) {
39
+ console.log(error)
40
+ }
41
+ }
42
+ //getData calling...
43
+ if (lengthValue === '1') {
44
+ errorMsg.innerHTML = 'words length should be more than 1'
45
+ } else {
46
+ getData(serachValue.toLowerCase())
47
+ }
48
+
49
+ // getWords function define...
50
+ function getWords(data) {
51
+ if (typeof data === 'string') {
52
+ errorMsg.innerHTML = 'no words found'
53
+ wordCount.innerHTML = `<strong> 0 words with letters ${serachValue.split(
54
+ ''
55
+ )}</strong>`
56
+ } else {
57
+ let newWordsLength = 0
58
+
59
+ // sort eventlistener
60
+ theSelect.addEventListener('change', () => {
61
+ sortValue = theSelect[theSelect.selectedIndex].text
62
+ if (sortValue == 'Z-A') {
63
+ sortBool = true
64
+ sortby(sortBool, data)
65
+ } else {
66
+ sortBool = false
67
+ sortby(sortBool, data)
68
+ }
69
+ })
70
+
71
+ for (let i = serachValue.length; i >= 1; i--) {
72
+ let newdata = data.filter((item) => item.length === i)
73
+ if (prefixValue) {
74
+ newdata = newdata.filter((item2) =>
75
+ item2.startsWith(prefixValue.toLowerCase())
76
+ )
77
+ }
78
+ if (containsValue) {
79
+ newdata = newdata.filter((item) =>
80
+ item.includes(containsValue.toLowerCase())
81
+ )
82
+ }
83
+ if (suffixValue) {
84
+ newdata = newdata.filter((item) =>
85
+ item.endsWith(suffixValue.toLowerCase())
86
+ )
87
+ }
88
+ if (lengthValue) {
89
+ newdata = newdata.filter((item) => item.length == lengthValue)
90
+ }
91
+ if (newdata.length === 0) {
92
+ main.innerHTML += ''
93
+ } else {
94
+ newWordsLength += newdata.length
95
+
96
+ const result = newdata.map((item) => {
97
+ if (item.length === 1) {
98
+ ok = false
99
+ newWordsLength = newWordsLength - 1
100
+ } else {
101
+ let ScrabbleLetterScore = ScrabbleScore()
102
+ sum = 0
103
+ item = item.toLowerCase()
104
+ for (let i = 0; i < item.length; i++) {
105
+ sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
106
+ }
107
+ return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
108
+ <li>${item}
109
+ <span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
110
+ </li></a>`
111
+ }
112
+ })
113
+
114
+ if (ok) {
115
+ tab_container.innerHTML += `
116
+ <input type="button" id="Tab_${i}" onclick="Filtering(${i})" value="${i} Letter"
117
+ class="tab_link cursorPointer" />
118
+ `
119
+ let tabs = document.getElementsByClassName('tab_link')
120
+ tabs[0] ? tabs[0].classList.add('active-tab') : ''
121
+
122
+ main.innerHTML += `
123
+ <div class="allGroupWords wordlistContainer" id="alpha_${i}">
124
+ <div class="wordListHeading">
125
+ <h3 class="lead">${i} Letter Words</h3>
126
+ </div>
127
+ <div class="wordList">
128
+ <ul class="ul list-unstyled">
129
+ ${result.join('')}
130
+ </ul>
131
+ </div>
132
+ </div>
133
+ `
134
+ }
135
+ }
136
+ }
137
+
138
+ if (newWordsLength === 0) {
139
+ errorMsg.innerHTML = 'no words found'
140
+ } else {
141
+ wordCount.innerHTML = `<strong>${newWordsLength} words with letters ${serachValue.split(
142
+ ''
143
+ )}</strong>`
144
+ }
145
+ }
146
+ }
147
+
148
+ // sort by aplhabets
149
+ function sortby(sortBool, data) {
150
+ if (sortBool) {
151
+ main.innerHTML = ''
152
+ data.reverse()
153
+ let newWordsLength = 0
154
+ for (let i = serachValue.length; i >= 1; i--) {
155
+ var newdata = data.filter((item) => item.length === i)
156
+
157
+ if (newdata.length === 0) {
158
+ main.innerHTML += ''
159
+ } else {
160
+ newWordsLength += newdata.length
161
+
162
+ const result = newdata.map((item) => {
163
+ if (item.length === 1) {
164
+ ok = false
165
+ newWordsLength = newWordsLength - 1
166
+ } else {
167
+ let ScrabbleLetterScore = ScrabbleScore()
168
+ let sum = 0
169
+ item = item.toLowerCase()
170
+ for (let i = 0; i < item.length; i++) {
171
+ sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
172
+ }
173
+
174
+ return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
175
+ <li>${item}
176
+ <span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
177
+ </li></a>`
178
+ }
179
+ })
180
+
181
+ main.innerHTML += `
182
+ <div class="allGroupWords wordlistContainer" id="alpha_${i}">
183
+ <div class="wordListHeading">
184
+ <h3 class="lead">${i} Letter Words</h3>
185
+ </div>
186
+ <div class="wordList">
187
+ <ul class="ul list-unstyled">
188
+ ${result.join('')}
189
+ </ul>
190
+ </div>
191
+ </div>
192
+ `
193
+ }
194
+ }
195
+ } else {
196
+ main.innerHTML = ''
197
+ data.sort()
198
+ for (let i = serachValue.length; i >= 1; i--) {
199
+ var newdata = data.filter((item) => item.length === i)
200
+ if (newdata.length === 0) {
201
+ main.innerHTML += ''
202
+ } else {
203
+ const result = newdata.map((item) => {
204
+ if (item.length === 1) {
205
+ ok = false
206
+ } else {
207
+ let ScrabbleLetterScore = ScrabbleScore()
208
+ let sum = 0
209
+ item = item.toLowerCase()
210
+ for (let i = 0; i < item.length; i++) {
211
+ sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
212
+ }
213
+
214
+ return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
215
+ <li>${item}
216
+ <span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
217
+ </li></a>`
218
+ }
219
+ })
220
+ main.innerHTML += `
221
+ <div class="allGroupWords wordlistContainer" id="alpha_${i}">
222
+ <div class="wordListHeading">
223
+ <h3 class="lead">${i} Letter Words</h3>
224
+ </div>
225
+ <div class="wordList">
226
+ <ul class="ul list-unstyled">
227
+ ${result.join('')}
228
+ </ul>
229
+ </div>
230
+ </div>
231
+ `
232
+ }
233
+ }
234
+ }
235
+ }
236
+
237
+ // Scrabble Point Counts
238
+ const ScrabbleScore = () => {
239
+ let twl06_sowpods = {
240
+ a: 1,
241
+ e: 1,
242
+ i: 1,
243
+ o: 1,
244
+ u: 1,
245
+ l: 1,
246
+ n: 1,
247
+ r: 1,
248
+ s: 1,
249
+ t: 1,
250
+ d: 2,
251
+ g: 2,
252
+ b: 3,
253
+ c: 3,
254
+ m: 3,
255
+ p: 3,
256
+ f: 4,
257
+ h: 4,
258
+ v: 4,
259
+ w: 4,
260
+ y: 4,
261
+ k: 5,
262
+ j: 8,
263
+ x: 8,
264
+ q: 10,
265
+ z: 10,
266
+ }
267
+
268
+ let wwfScore = {
269
+ a: 1,
270
+ b: 4,
271
+ c: 4,
272
+ d: 2,
273
+ e: 1,
274
+ f: 4,
275
+ g: 3,
276
+ h: 3,
277
+ i: 1,
278
+ j: 10,
279
+ k: 5,
280
+ l: 2,
281
+ m: 4,
282
+ n: 2,
283
+ o: 1,
284
+ p: 4,
285
+ q: 10,
286
+ r: 1,
287
+ s: 1,
288
+ t: 1,
289
+ u: 2,
290
+ v: 5,
291
+ w: 4,
292
+ x: 8,
293
+ y: 3,
294
+ z: 10,
295
+ }
296
+
297
+ if (dictonary === 'wwf') {
298
+ return wwfScore
299
+ } else {
300
+ return twl06_sowpods
301
+ }
302
+ }
303
+
304
+ // Implement Filtering
305
+ let sections = {}
306
+ function Filtering(id) {
307
+ let tabs = document.getElementsByClassName('tab_link')
308
+ tabs[0] ? tabs[0].classList.add('active-tab') : ''
309
+
310
+ Array.from(tabs).map((item) => {
311
+ item.classList.remove('active-tab')
312
+ })
313
+ main.innerHTML += ``
314
+ let activeLetter = event.target
315
+ // console.log(activeLetter)
316
+ activeLetter.classList.add('active-tab')
317
+
318
+ var section = document.querySelectorAll('.wordlistContainer')
319
+ var sort_val = document.querySelector('.sort-select').value
320
+ sections = {}
321
+ Array.prototype.forEach.call(section, function (e) {
322
+ if (document.body.clientWidth > 991) {
323
+ sections[e.id] = e.offsetTop - 10
324
+ } else {
325
+ sections[e.id] = e.offsetTop - 10
326
+ console.log(sections)
327
+ }
328
+ })
329
+ document.body.scrollTop = sections[sort_val + '_' + id] + 5
330
+ }
331
+
332
+ let prev = document.getElementById('prev')
333
+ let next = document.getElementById('next')
334
+
335
+ if (prev) {
336
+ prev.onclick = scroll_Right
337
+ }
338
+ if (next) {
339
+ next.onclick = scroll_Left
340
+ }
341
+ window.addEventListener('resize', function () {
342
+ scroll_visible()
343
+ })
344
+ function scroll_visible() {
345
+ let tab_container = document.querySelector('#tab-container')
346
+ console.log(tab_container)
347
+ if (tab_container) {
348
+ if (tab_container.clientWidth === tab_container.scrollWidth) {
349
+ prev.style.display = 'none'
350
+ next.style.display = 'none'
351
+ } else {
352
+ prev.style.display = 'block'
353
+ next.style.display = 'block'
354
+ }
355
+ }
356
+ }
357
+ scroll_visible()
358
+ function scroll_Left() {
359
+ tab_container.scrollLeft += 130
360
+ }
361
+ function scroll_Right() {
362
+ tab_container.scrollLeft -= 130
363
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscms-tools-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms
@@ -151,7 +151,13 @@ files:
151
151
  - assets/images/rating.png
152
152
  - assets/instagram.svg
153
153
  - assets/js/TopScroll.js
154
+ - assets/js/X-letter.js
155
+ - assets/js/advancedFilter.js
156
+ - assets/js/advancedFilter2.js
157
+ - assets/js/advancedFilter3.js
154
158
  - assets/js/googledrive.js
159
+ - assets/js/scrabbleDictonary.js
160
+ - assets/js/wordScrabble.js
155
161
  - assets/linkdin.svg
156
162
  - assets/noserverupload.svg
157
163
  - assets/pdf.svg