appscms-tools-theme 0.9.7 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/blog/nav.json +12 -12
- data/_data/fileinfo/en/fileinfo.json +11 -0
- data/_includes/head/index.html +2 -2
- data/_layouts/fileInfo.html +23 -0
- data/assets/js/X-letter.js +200 -0
- data/assets/js/advancedFilter.js +5 -0
- data/assets/js/advancedFilter2.js +5 -0
- data/assets/js/advancedFilter3.js +2 -0
- data/assets/js/googledrive.js +2 -0
- data/assets/js/manifest.json +17 -0
- data/assets/js/scrabbleDictonary.js +162 -0
- data/assets/js/serviceworker.js +42 -0
- data/assets/js/wordScrabble.js +363 -0
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a41211fc8d44ebfa389dd9f5a20cf5a27b2dc32ec1dc318d1ca25440176ee02c
|
4
|
+
data.tar.gz: 731d07cc6823a831d6e90a4ee2ccb24a0ac1d1ee0648df7b5243ca7f69937444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c1a491f1a5a171b6841147f4ea8d2c9f48162ffdd81bc91de8e1cd897df290893349f71474b8a31290b339f2e9dcb866f541e7f499c073b42423ed4aea34a7f
|
7
|
+
data.tar.gz: 0c151390113ab1f4fa40a5171fc252fff03e4e5f85956e932009b6a37570f033f757c5b7cae62eefbf260772bdc26b60132aa89476303e7f37ff16ae86e1161c
|
data/_data/blog/nav.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"Language": "English",
|
3
|
+
"htmlLangAtt": "en",
|
4
|
+
"H1": "Set alarm for $variable minutes from now",
|
5
|
+
"H2": "Simplest online alarm clock to set alarms. Do not close browser tab.",
|
6
|
+
"TITLE": "Set alarm for $variable minutes from now",
|
7
|
+
"META": "Easiest way to set alarm for $variable minutes from now. Choose sound for alarm from multiple options.",
|
8
|
+
"keywords": "key1,key2,key3,key4",
|
9
|
+
"filelang": "en",
|
10
|
+
"display_formats": ["JPG", "png"]
|
11
|
+
}
|
data/_includes/head/index.html
CHANGED
@@ -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="
|
38
|
+
<link rel="manifest" href="/assets/js/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('
|
131
|
+
navigator.serviceWorker.register('/assets/js/serviceworker.js')
|
132
132
|
.then((reg) => console.log('Success: ', reg.scope))
|
133
133
|
.catch((err) => console.log('Failure: ', err));
|
134
134
|
})
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{% assign file = page.fileName %}
|
2
|
+
{% assign lang = page.lang %}
|
3
|
+
{% assign folder = page.folderName %}
|
4
|
+
{% assign fileinfoData= site.data[folder][lang][file] %}
|
5
|
+
<!DOCTYPE html>
|
6
|
+
<html lang="{{fileinfoData.htmlLangAtt}}">
|
7
|
+
{% include head/index.html %}
|
8
|
+
<body>
|
9
|
+
{% include header/index.html %}
|
10
|
+
{%- if fileinfoData.display_formats -%}
|
11
|
+
|
12
|
+
<div class="container px-md-5 compare-table ">
|
13
|
+
<div class="px-md-4">
|
14
|
+
{%- include fileformat/fileformatdetail.html -%}
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
{%- endif -%}
|
18
|
+
|
19
|
+
{% include footer/index.html %}
|
20
|
+
{% include script.html %}
|
21
|
+
</body>
|
22
|
+
|
23
|
+
</html>
|
@@ -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
|
+
}
|
data/assets/js/googledrive.js
CHANGED
@@ -95,11 +95,13 @@ 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 () {},
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
---
|
3
|
+
{
|
4
|
+
"short_name": "{{site.name}}",
|
5
|
+
"name": "{{site.name}}",
|
6
|
+
"icons": [
|
7
|
+
{
|
8
|
+
"src": "/assets/images/avatar.png",
|
9
|
+
"type": "image/png",
|
10
|
+
"sizes": "1024x1024"
|
11
|
+
}
|
12
|
+
],
|
13
|
+
"start_url": ".",
|
14
|
+
"display": "standalone",
|
15
|
+
"theme_color": "#000000",
|
16
|
+
"background_color": "#ffffff"
|
17
|
+
}
|
@@ -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,42 @@
|
|
1
|
+
const CACHE_NAME = 'v1'
|
2
|
+
const urlsToCache = ['.']
|
3
|
+
|
4
|
+
const self = this
|
5
|
+
|
6
|
+
// Install SW
|
7
|
+
self.addEventListener('install', (event) => {
|
8
|
+
event.waitUntil(
|
9
|
+
caches.open(CACHE_NAME).then((cache) => {
|
10
|
+
console.log('Opened cache')
|
11
|
+
|
12
|
+
return cache.addAll(urlsToCache)
|
13
|
+
})
|
14
|
+
)
|
15
|
+
})
|
16
|
+
|
17
|
+
// Listen for requests
|
18
|
+
self.addEventListener('fetch', (event) => {
|
19
|
+
event.respondWith(
|
20
|
+
caches.match(event.request).then(() => {
|
21
|
+
return fetch(event.request).catch(() => caches.match('index.html'))
|
22
|
+
})
|
23
|
+
)
|
24
|
+
})
|
25
|
+
|
26
|
+
// Activate the SW
|
27
|
+
self.addEventListener('activate', (event) => {
|
28
|
+
const cacheWhitelist = []
|
29
|
+
cacheWhitelist.push(CACHE_NAME)
|
30
|
+
|
31
|
+
event.waitUntil(
|
32
|
+
caches.keys().then((cacheNames) =>
|
33
|
+
Promise.all(
|
34
|
+
cacheNames.map((cacheName) => {
|
35
|
+
if (!cacheWhitelist.includes(cacheName)) {
|
36
|
+
return caches.delete(cacheName)
|
37
|
+
}
|
38
|
+
})
|
39
|
+
)
|
40
|
+
)
|
41
|
+
)
|
42
|
+
})
|
@@ -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.
|
4
|
+
version: 1.0.2
|
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-
|
11
|
+
date: 2021-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- _data/feature/en/compress-pdf.json
|
75
75
|
- _data/feature/en/split-pdf.json
|
76
76
|
- _data/feature/hi/compress-pdf.json
|
77
|
+
- _data/fileinfo/en/fileinfo.json
|
77
78
|
- _data/files/en/jpg.json
|
78
79
|
- _data/files/en/png.json
|
79
80
|
- _data/footer/en/data.json
|
@@ -125,6 +126,7 @@ files:
|
|
125
126
|
- _layouts/disclaimer.html
|
126
127
|
- _layouts/download.html
|
127
128
|
- _layouts/feature.html
|
129
|
+
- _layouts/fileInfo.html
|
128
130
|
- _layouts/help.html
|
129
131
|
- _layouts/home.html
|
130
132
|
- _layouts/page.html
|
@@ -151,7 +153,15 @@ files:
|
|
151
153
|
- assets/images/rating.png
|
152
154
|
- assets/instagram.svg
|
153
155
|
- assets/js/TopScroll.js
|
156
|
+
- assets/js/X-letter.js
|
157
|
+
- assets/js/advancedFilter.js
|
158
|
+
- assets/js/advancedFilter2.js
|
159
|
+
- assets/js/advancedFilter3.js
|
154
160
|
- assets/js/googledrive.js
|
161
|
+
- assets/js/manifest.json
|
162
|
+
- assets/js/scrabbleDictonary.js
|
163
|
+
- assets/js/serviceworker.js
|
164
|
+
- assets/js/wordScrabble.js
|
155
165
|
- assets/linkdin.svg
|
156
166
|
- assets/noserverupload.svg
|
157
167
|
- assets/pdf.svg
|