appscms-tools-theme 0.9.5 → 1.0.0

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: 036b7a24001add163d19a0503ef4de9c2bd71339762b9e393d93897b11b82d2a
4
- data.tar.gz: 7914a96bb2f2ed3d4f432e407246fd43e6b9916a8fc828baacd3c91038443939
3
+ metadata.gz: b8454cf720ac4e1ddc502362af3bbf805d8f0f247dff74a9cb211e8329253e33
4
+ data.tar.gz: 48c650409656b6d72bab38de956bc753a0956411d56ea770e958b6513906b7c5
5
5
  SHA512:
6
- metadata.gz: b06d6ff126097a8bd827fc5a6f142b0af8d10a0f7a2dbd4ca10f9170b5fbe4a0e426b45c94ec10abf45b40d1bf7243b6cdb6a362cb39a81a8472e3afeab20555
7
- data.tar.gz: 69359ae79aeaeeb0c6d769a9b3901c4800bfb7c4fdebd107943dfef9aa8f3768bfebc212d7be665d0c4da5e79569bf83433006c28c679cbb7db19615b5414349
6
+ metadata.gz: 7a6d468a5c4ffea4ee91aa4e4a050abe5918601b842b8cea5342d705857f4082e368b8d01c2230993389ac363bb89555fb29c5b27e672d78b8702131ad96639b
7
+ data.tar.gz: 76d3ea0e8dc951cddd2206cd47d72b23fee515263bb748aceb631703b6f1997e035364c64947c18726f288d8f09975b37c683f3316670c06ba166fc300a4d5cf
data/_data/blog/nav.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
- "navbarBrandText": "",
3
- "navbarBrandLogo": "/assets/images/logo.png",
4
- "navItems":[
5
- {
6
- "name":"Blog",
7
- "url":"blog"
8
- },
9
- {
10
- "name":"",
11
- "url":""
12
- }
13
- ]
2
+ "navbarBrandText": "",
3
+ "navbarBrandLogo": "/assets/images/logo.png",
4
+ "navItems": [
5
+ {
6
+ "name": "Blog",
7
+ "url": "blog"
8
+ },
9
+ {
10
+ "name": "",
11
+ "url": ""
12
+ }
13
+ ]
14
14
  }
@@ -35,7 +35,7 @@
35
35
  <meta data-rh="true" name="twitter:description" content="{{description}}">
36
36
  <meta data-rh="true" name="twitter:image:src" content="{{site.url}}{{favicon}}">
37
37
  {%- if site.pwa -%}
38
- <link rel="manifest" href="./manifest.json">
38
+ <link rel="manifest" href="/assets/manifest.json">
39
39
  {%- endif -%}
40
40
  {%- for item in variable.langsupport -%}
41
41
  <link data-rh="true" rel="alternate" href="{{site.url | append: item.permalink}}" hreflang="{{item.hreflang}}">
@@ -128,7 +128,7 @@
128
128
  <script>
129
129
  if ('serviceWorker' in navigator) {
130
130
  window.addEventListener('load', () => {
131
- navigator.serviceWorker.register('./serviceworker.js')
131
+ navigator.serviceWorker.register('/assets/serviceworker.js')
132
132
  .then((reg) => console.log('Success: ', reg.scope))
133
133
  .catch((err) => console.log('Failure: ', err));
134
134
  })
@@ -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'
@@ -14,7 +14,7 @@ const addScripts=()=>{
14
14
  const checkgooglescript= Array.from(scripts).find(item=>item.src==='https://apis.google.com/js/api.js')
15
15
  if(!checkgooglescript){
16
16
  const googlescript = document.createElement('script')
17
- googlescript.src = '{{site.googleapisrc}}'
17
+ googlescript.src = 'https://apis.google.com/js/api.js'
18
18
  document.head.append(googlescript)
19
19
  }
20
20
  }
@@ -95,17 +95,19 @@ function chooseFromDropbox() {
95
95
  }
96
96
  var file = files[0]
97
97
  const url = new URL(file.link)
98
+ showLoader()
98
99
  const response = await fetch(url).then((res) => res.blob())
99
100
  let metadata = {
100
101
  type: response.type,
101
102
  }
102
103
  let newFile = new File([response], file.name, metadata)
104
+ closeLoader()
103
105
  getDropBoxFile(newFile)
104
106
  },
105
107
  cancel: function () {},
106
108
  linkType: 'direct',
107
109
  multiselect: false,
108
- extensions: ['.jpg'],
110
+ extensions: [...filemimes],
109
111
  folderselect: false,
110
112
  })
111
113
  }
@@ -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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscms-tools-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-19 00:00:00.000000000 Z
11
+ date: 2021-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -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