word-games-theme 0.1.1 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,20 @@
1
+ .tick {
2
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAL7SURBVEhL7ZZdSBRRFMf/s+PWSrsUFGoUfi1ooWISFUQPvfRhH1hUL5agvogvaQ/hamBRbz0W2VNBQb2IgqJsGL2VVBK11UNpPkhGKmWK6wfu7kznzFxGx5lxZ+tN/MGdOefOzP3PnTn3noN11jySOLvnWamfniqGJGVovqpOQMVnHI9ENd8l7oTDe/zwSGfp7nPkHaPm0/qXWKD2kl7gERS1A+Uf5vVuZ1YXbg9KCAT2kWgjeaeoBbR+Z/gFupFQWhGNDuLCsKp3W3EW1kQ3HYRHfkhegd7pmkEoiVrMzPY7iXvE2YrfXyJEg3pHShTQsw9oDMcXthfuLfNDlq+RxQ/KWl/qFNIYN7WxbLAX9uIMhWu58P4D9TSNVSEcE06fmqM3WSAZ+DwbcCXnEk5sO7QyaNKpVeumGWtw9ZYE4E2bIGvlkrGFRZtyqxHKq8HQ3HfsfVOJmBIXVzUWEItn4OSnGeFrWGcspxXR0ZXolrQAmkgwlFeL4blRtAzdRVxJiKsGPhqzUNgGVmFJzRSWCVmSqZlvb8ipRCi3BtPxGYSG7qD3F+8hNqtHUncIy8DpH5tg0VvBeoTL7iHbl6XN9HqwDjfy6zCy8BPnI1edRXUsv9QqrEo/hGXAA+7fXIwjWw+gbXczmunTNmZX4uvcCFq/teHVVGQ1UR5zTFgGroMrJz0LbbtatMhlxhd/azNNKuoQXNbN4enEIqq2HyYrX+/QmY5H8XzyNYr8QSwqMVz+chsvJgeSiTI9KI88FraB/V7dV3aRjvepWdYyz3znxkz0T310I8qzrMfR9090dwn74Iqhk94pLDwTI/Njbj6vQOqhsbqEY8J+xky4lPZaTzdZqWYmhhfzMBSligqEt3qXGeflxPmUUxunuNQhUU6L0QHhW3DOPO1/gAr/KLzePioEuMzhYPNq15zhf9pJhUADorPv/q0QWA6XPrLEWYaTB2ctu9KHY6IDCbWLSp+k9Zc74eVwseehXAuJt0GJir1xirOUi7111jrAXwKK6K/PgrsYAAAAAElFTkSuQmCC)
3
+ no-repeat;
4
+ background-position: 95% 50%;
5
+ }
6
+ .filter_count {
7
+ width: 20px;
8
+ color: white;
9
+ height: 20px;
10
+ text-align: center;
11
+ background-color: #808080;
12
+ padding-top: 2px;
13
+ border-radius: 50%;
14
+ margin-right: 1px;
15
+ position: relative;
16
+ left: 150px;
17
+ }
1
18
  .Advancedbtn .filterButton {
2
19
  background: #f8f9fa;
3
20
  box-shadow: 0 0 3px #343a4063;
@@ -19,7 +36,7 @@
19
36
  background: #fff;
20
37
  position: absolute;
21
38
  z-index: 999;
22
- top: 155px;
39
+ top: unset;
23
40
  right: 123px;
24
41
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
25
42
  padding: 30px 15px;
@@ -45,7 +62,7 @@
45
62
  .sticky_nav {
46
63
  position: sticky;
47
64
  width: inherit;
48
- top: 63px;
65
+ top: 58px;
49
66
  background-color: #fff;
50
67
  z-index: 99;
51
68
  }
@@ -114,16 +131,24 @@ a {
114
131
  .Advancedbtn .filterButton {
115
132
  position: fixed;
116
133
  bottom: 0;
117
- width: 100%;
118
- left: 0;
134
+ width: 50%;
135
+ left: 0px;
136
+ border-radius: 0;
119
137
  }
120
138
  .fillterWrapper {
121
139
  right: auto;
122
140
  position: fixed;
123
141
  left: 0;
124
- top: 215px;
142
+ bottom: 39px;
125
143
  width: 100%;
126
144
  }
145
+ .filter_count {
146
+ z-index: 999;
147
+ display: inline-block;
148
+ position: fixed;
149
+ left: 112px;
150
+ bottom: 8px;
151
+ }
127
152
  }
128
153
 
129
154
  @media (min-width: 576px) {
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: 50vh;
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: 60px;
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: 500;
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/right2.svg) no-repeat;
35
- background-size: cover;
36
- height: 50px;
37
- width: 50px;
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: 6px;
41
- right: 9px;
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;
@@ -89,18 +118,20 @@
89
118
  }
90
119
  .select_dropDown2 {
91
120
  position: absolute;
92
- top: 4px;
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: 16px 0;
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: 15px;
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: 140px;
153
+ width: 190px;
123
154
  outline: none;
124
155
  }
125
156
  .active {
126
- width: 100%;
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
- justify-content: flex-start;
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: 30px !important;
154
- width: 30px !important;
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: 6px 0;
161
- width: 50px;
199
+ padding: 8px 0;
200
+ width: 20%;
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
- width: 100%;
173
- display: inline-flex !important;
174
- flex-direction: column;
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,5 @@
1
1
  .rowHeight2 {
2
- margin-top: 700px;
2
+ margin-top: 300px;
3
3
  }
4
4
  .news {
5
5
  margin-top: -120px;
@@ -44,7 +44,7 @@
44
44
  }
45
45
  @media (max-width: 1125px) {
46
46
  .rowHeight2 {
47
- margin-top: 0px;
47
+ margin-top: 50px;
48
48
  margin-bottom: 120px;
49
49
  }
50
50
  .news {
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;
@@ -224,8 +225,8 @@ header {
224
225
  }
225
226
  .angle-arrow {
226
227
  position: fixed;
227
- bottom: 4px;
228
- right: 32px;
228
+ bottom: 5px;
229
+ right: 52%;
229
230
  z-index: 999;
230
231
  top: auto;
231
232
  }
@@ -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>
@@ -12,6 +12,12 @@ let dictonary = params.get('dictonary')
12
12
 
13
13
  let tab_container = document.querySelector('.tab_container')
14
14
 
15
+ let txtBox = document.querySelector('.txtBox')
16
+ txtBox.value = serachValue
17
+
18
+ var theSelect = document.getElementById('select_dropDown')
19
+ document.querySelector('.select_dropDown2').value = dictonary
20
+
15
21
  const getData = async (serachValue) => {
16
22
  try {
17
23
  main.innerHTML = `<div class="loader">
@@ -70,10 +76,48 @@ function x_with_letters(data) {
70
76
  filterData = data.filter((item) => item.length == 2)
71
77
  }
72
78
 
79
+ if (prefixValue) {
80
+ filterData = filterData.filter((item2) =>
81
+ item2.startsWith(prefixValue.toLowerCase())
82
+ )
83
+ startsWith.classList.add('tick')
84
+ startsWith.value = prefixValue
85
+ }
86
+ if (containsValue) {
87
+ filterData = filterData.filter((item) =>
88
+ item.includes(containsValue.toLowerCase())
89
+ )
90
+ mustInclude.classList.add('tick')
91
+ mustInclude.value = containsValue
92
+ }
93
+ if (suffixValue) {
94
+ filterData = filterData.filter((item) =>
95
+ item.endsWith(suffixValue.toLowerCase())
96
+ )
97
+ endsWith.classList.add('tick')
98
+ endsWith.value = suffixValue
99
+ }
100
+
73
101
  if (filterData.length === 0) {
74
102
  main.innerHTML += ''
75
103
  errorMsg.innerHTML = 'No words Found with this length'
76
104
  } else {
105
+ // sort eventlistener
106
+ theSelect.addEventListener('change', () => {
107
+ sortValue = theSelect[theSelect.selectedIndex].text
108
+ if (sortValue == 'Z-A') {
109
+ sortBool = true
110
+ sortby(sortBool, filterData, itemLength)
111
+ } else {
112
+ sortBool = false
113
+ sortby(sortBool, filterData, itemLength)
114
+ }
115
+ if (sortValue == 'Points') {
116
+ sortBool = true
117
+ sortPointsby(sortBool, filterData, itemLength)
118
+ }
119
+ })
120
+
77
121
  newWordsLength += filterData.length
78
122
  let itemLength = ''
79
123
  const result = filterData.map((item) => {
@@ -118,6 +162,138 @@ function x_with_letters(data) {
118
162
  }
119
163
  }
120
164
 
165
+ //Handling of filter counter in advanced filter
166
+ function addFilterCount() {
167
+ let filter_val = document.getElementsByClassName('filter_val')
168
+ let filter = document.querySelector('.filter_count')
169
+ let filter_count = 0
170
+
171
+ filter_val[0].value = prefixValue
172
+ filter_val[1].value = containsValue
173
+ filter_val[2].value = suffixValue
174
+ filter_val[3].value = lengthValue
175
+
176
+ for (var i = 0; i < 4; i++) {
177
+ if (filter_val[i].value != '') {
178
+ filter_count += 1
179
+ }
180
+ if (filter_count === 0) {
181
+ filter.style.display = 'none'
182
+ } else {
183
+ filter.style.display = 'inline-block'
184
+ }
185
+
186
+ filter.innerHTML = filter_count
187
+ }
188
+ }
189
+ addFilterCount()
190
+
191
+ // sorting by points
192
+ function sortPointsby(sortValue, data, i) {
193
+ if (sortValue) {
194
+ main.innerHTML = ''
195
+ let newArray = []
196
+ data.map((item) => {
197
+ let ScrabbleLetterScore = ScrabbleScore()
198
+ let points = 0
199
+ item = item.toLowerCase()
200
+ for (let i = 0; i < item.length; i++) {
201
+ points += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
202
+ }
203
+ const value = {
204
+ words: item,
205
+ points: points,
206
+ }
207
+ newArray.push(value)
208
+ newArray.sort(function (a, b) {
209
+ return b.points - a.points
210
+ })
211
+ })
212
+ const result = newArray.map((item) => {
213
+ return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item.words}">
214
+ <li>${item.words}
215
+ <span class="points" value="${item.points}" style="position:relative; top:4px; font-size:12px"> ${item.points}</span>
216
+ </li></a>`
217
+ })
218
+
219
+ main.innerHTML += `
220
+ <div class="allGroupWords wordlistContainer" id="alpha_${i}">
221
+ <div class="wordListHeading">
222
+ <h3 class="lead">${i} Letter Words</h3>
223
+ </div>
224
+ <div class="wordList">
225
+ <ul class="ul list-unstyled">
226
+ ${result.join('')}
227
+ </ul>
228
+ </div>
229
+ </div>
230
+ `
231
+ }
232
+ }
233
+
234
+ // sort by aplhabets
235
+ function sortby(sortBool, data, i) {
236
+ if (sortBool) {
237
+ main.innerHTML = ''
238
+ data.reverse()
239
+ const result = data.map((item) => {
240
+ let ScrabbleLetterScore = ScrabbleScore()
241
+ let sum = 0
242
+ item = item.toLowerCase()
243
+ for (let i = 0; i < item.length; i++) {
244
+ sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
245
+ }
246
+ return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
247
+ <li>${item}
248
+ <span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
249
+ </li></a>`
250
+ })
251
+
252
+ main.innerHTML += `
253
+ <div class="allGroupWords wordlistContainer" id="alpha_${i}">
254
+ <div class="wordListHeading">
255
+ <h3 class="lead">${i} Letter Words</h3>
256
+ </div>
257
+ <div class="wordList">
258
+ <ul class="ul list-unstyled">
259
+ ${result.join('')}
260
+ </ul>
261
+ </div>
262
+ </div>
263
+
264
+ `
265
+ } else {
266
+ main.innerHTML = ''
267
+ data.sort()
268
+ const result = data.map((item) => {
269
+ let ScrabbleLetterScore = ScrabbleScore()
270
+ let sum = 0
271
+ item = item.toLowerCase()
272
+ for (let i = 0; i < item.length; i++) {
273
+ sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
274
+ }
275
+ return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
276
+ <li>${item}
277
+ <span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
278
+ </li></a>`
279
+ })
280
+
281
+ main.innerHTML += `
282
+ <div class="allGroupWords wordlistContainer" id="alpha_${i}">
283
+ <div class="wordListHeading">
284
+ <h3 class="lead">${i} Letter Words</h3>
285
+ </div>
286
+ <div class="wordList">
287
+ <ul class="ul list-unstyled">
288
+ ${result.join('')}
289
+ </ul>
290
+ </div>
291
+ </div>
292
+
293
+ `
294
+ }
295
+ }
296
+
121
297
  // Implement Active class
122
298
  const addFilter = () => {
123
299
  let tabs = document.getElementsByClassName('tab_link')