word-games-theme 2.3.8 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,6 +18,56 @@ body {
18
18
  overflow-x: hidden !important;
19
19
  }
20
20
 
21
+ /* placeholder loader css */
22
+
23
+ .placeholder-loader{
24
+ display: flex;
25
+ justify-content: center;
26
+ }
27
+
28
+ .skeleton-box {
29
+ display: inline-block;
30
+ height: 1em;
31
+ position: relative;
32
+ overflow: hidden;
33
+ background-color: #DDDBDD;
34
+ }
35
+
36
+ .skeleton-box::after {
37
+ position: absolute;
38
+ top: 0;
39
+ right: 0;
40
+ bottom: 0;
41
+ left: 0;
42
+ transform: translateX(-100%);
43
+ background-image: linear-gradient(90deg,
44
+ rgba(255, 255, 255, 0) 0,
45
+ rgba(255, 255, 255, 0.2) 20%,
46
+ rgba(255, 255, 255, 0.5) 60%,
47
+ rgba(255, 255, 255, 0));
48
+ animation: shimmer 5s infinite;
49
+ content: '';
50
+ }
51
+
52
+ @keyframes shimmer {
53
+ 100% {
54
+ transform: translateX(100%);
55
+ }
56
+ }
57
+
58
+ .o-media {
59
+ display: flex;
60
+ }
61
+
62
+ .o-media__body {
63
+ flex-grow: 1;
64
+ }
65
+
66
+ .o-vertical-spacing>*+* {
67
+ margin-top: 0.75em;
68
+ }
69
+
70
+
21
71
  /* header && navbar css */
22
72
  header {
23
73
  width: 100%;
@@ -87,6 +137,45 @@ header {
87
137
  }
88
138
 
89
139
 
140
+ /* authors contributorss css */
141
+ .featurePageAuthor {
142
+ display: flex;
143
+ flex-direction: column;
144
+ width: 100%;
145
+ justify-content: center;
146
+ align-items: center;
147
+ }
148
+ .authors-list a {
149
+ color: #4d4d4d;
150
+ }
151
+ .featurePageAuthor .author-meta {
152
+ width: 500px;
153
+ margin: 0 auto;
154
+ padding-bottom: 5rem;
155
+ }
156
+ .featurePageAuthor .author-img{
157
+ width: 100px;
158
+ height: 100px;
159
+ border-radius: 100%;
160
+ }
161
+ .featurePageAuthor .author_bio {
162
+ font-size: 16px;
163
+ }
164
+ .featurePageAuthor .author-meta .authorName {
165
+ font-size: 20px;
166
+ padding: 1rem 0px;
167
+ font-weight: 900;
168
+ text-align: center;
169
+ }
170
+ .authors-heading{
171
+ font-size: 30px;
172
+ }
173
+ .contributor {
174
+ width: 100px;
175
+ }
176
+
177
+
178
+
90
179
  /* Footer design css */
91
180
  .footer-section {
92
181
  padding: 20px 0px;
@@ -224,3 +313,32 @@ header {
224
313
  .footer-bottom .modal .close {
225
314
  font-size: 3rem;
226
315
  }
316
+
317
+
318
+ /* ads css */
319
+ .top-banner-ad{
320
+ display: none;
321
+ width: 100%;
322
+ /* height: 80px; */
323
+ }
324
+
325
+ .bottom-banner-ad{
326
+ width: 100%;
327
+ height: 80px;
328
+ display: none;
329
+ position: fixed;
330
+ bottom: 0;
331
+ z-index: 999;
332
+ }
333
+ @media (max-width: 768px) {
334
+ .top-banner-ad,.bottom-banner-ad{
335
+ display: block;
336
+ }
337
+ .authors-list {
338
+ padding: 25px;
339
+ }
340
+ .featurePageAuthor .author-meta {
341
+ width: 100%;
342
+ }
343
+
344
+ }
@@ -17,4 +17,5 @@
17
17
  --light-gray: rgb(137, 137, 137);
18
18
  --tooltip-padding: 0.5rem;
19
19
  --tooltip-border-style: 0.5rem;
20
- }
20
+ }
21
+
@@ -0,0 +1,198 @@
1
+ let txtBox = document.querySelector('.txtBox')
2
+ txtBox.focus()
3
+ let letterCloseButton = document.querySelector('.letter-close-button')
4
+
5
+ let startsWith = document.getElementById("startsWith");
6
+ let mustInclude = document.getElementById("mustInclude");
7
+ let endsWith = document.getElementById("endsWith");
8
+ let exculdeWith = document.getElementById("exculdeWith");
9
+ let inculdeWith = document.getElementById("inculdeWith");
10
+ let wordLength = document.getElementById("wordLength");
11
+
12
+ // // when typing on input
13
+ txtBox.addEventListener('input', (e) => {
14
+ if (e.target.value === "") {
15
+ // letterCloseButton.style.display = "none"
16
+ }
17
+ else {
18
+ // letterCloseButton.style.display = "block"
19
+ }
20
+ e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, "")
21
+ let rangeOfBlankTile = 3
22
+ if (rangeOfBlankTile === "") {
23
+ rangeOfBlankTile = 3
24
+ }
25
+ e.target.value = e.target.value.replace(/ /g, '?')
26
+ let data = []
27
+ data = e.target.value.split('').filter((i) => i === '?')
28
+ if (data.length > rangeOfBlankTile) {
29
+ e.target.value = e.target.value.replace(/\?$/, '')
30
+ }
31
+ })
32
+ letterCloseButton.addEventListener("click", () => {
33
+ txtBox.value = ""
34
+ letterCloseButton.style.display = "none"
35
+ })
36
+ //tooltips for advanced filter
37
+ const filterInputs = document.querySelectorAll('.filter_val');
38
+ Array.from(filterInputs).forEach((item) => {
39
+ item.addEventListener("input", (e) => {
40
+ const inputValue = e.target.value;
41
+ const parentElement = e.target.parentElement;
42
+ const imgElement = parentElement.querySelector('img');
43
+ const tooltipElement = parentElement.querySelector('.filter-tooltip');
44
+
45
+ if (inputValue == "") {
46
+ imgElement.src = "/assets/images/questionmark.svg"
47
+ setTimeout(() => {
48
+ item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
49
+ }, 100);
50
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
51
+ tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
52
+
53
+ } else {
54
+ item.nextElementSibling.removeAttribute("data-tip")
55
+ imgElement.src = "/assets/images/close-btn.svg"
56
+ tooltipElement.style.setProperty('--tooltip-padding', '0');
57
+ tooltipElement.style.setProperty('--tooltip-border-style', 'none');
58
+ }
59
+ item.nextElementSibling.addEventListener("click", () => {
60
+ e.target.value = ""
61
+ imgElement.src = "/assets/images/questionmark.svg"
62
+ setTimeout(() => {
63
+ item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
64
+ }, 100);
65
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
66
+ tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
67
+ })
68
+ })
69
+ })
70
+
71
+
72
+ // Define the loadScript function first
73
+ const loadScript = (FILE_URL, data = {}, async = true, type = "text/javascript") => {
74
+ return new Promise((resolve, reject) => {
75
+ const scriptEle = document.createElement("script");
76
+ scriptEle.type = type;
77
+ scriptEle.async = async;
78
+ scriptEle.src = FILE_URL;
79
+
80
+ // Set additional data as attributes on the script element
81
+ Object.keys(data).forEach((key) => {
82
+ scriptEle.setAttribute(`data-${key}`, data[key]);
83
+ });
84
+
85
+ scriptEle.addEventListener("load", () => {
86
+ resolve({ status: true });
87
+ });
88
+
89
+ scriptEle.addEventListener("error", () => {
90
+ reject({
91
+ status: false,
92
+ message: `Failed to load the script ${FILE_URL}`,
93
+ });
94
+ });
95
+
96
+ document.body.appendChild(scriptEle);
97
+ });
98
+ };
99
+
100
+ // Now you can use the loadScript function with additional data
101
+ function checkQueryParam() {
102
+ const urlParams = new URLSearchParams(window.location.search);
103
+ const paramName = 'search';
104
+ if (urlParams.has(paramName)) {
105
+ const additionalData = {
106
+ url: "{{site.url}}",
107
+ range: "{{page.blanktilerange}}"
108
+ };
109
+ var p1 = loadScript("/assets/js/wordfinder.js", additionalData)
110
+ .then((data) => {
111
+ console.log(data);
112
+ })
113
+ .catch((error) => {
114
+ console.error(error);
115
+ });
116
+ }
117
+ }
118
+ checkQueryParam();
119
+
120
+ const formElement = document.querySelector("#form");
121
+ formElement.addEventListener("submit", function (e) {
122
+ e.preventDefault();
123
+
124
+ document.querySelector(".fillterWrapper").classList.add("hide")
125
+ let selectedDictionary = document.querySelector(".select_dropDown2").value;
126
+ if (history.pushState) {
127
+ var newurl =
128
+ window.location.protocol +
129
+ "//" +
130
+ window.location.host +
131
+ window.location.pathname +
132
+ "?" +
133
+ "search" +
134
+ "=" +
135
+ txtBox.value.toLowerCase() +
136
+ "&" +
137
+ "dictionary" +
138
+ "=" +
139
+ selectedDictionary +
140
+ "&" +
141
+ "prefix" +
142
+ "=" +
143
+ startsWith.value +
144
+ "&" +
145
+ "contains" +
146
+ "=" +
147
+ mustInclude.value +
148
+ "&" +
149
+ "suffix" +
150
+ "=" +
151
+ endsWith.value +
152
+ "&" +
153
+ "exclude" +
154
+ "=" +
155
+ exculdeWith.value +
156
+ "&" +
157
+ "include" +
158
+ "=" +
159
+ inculdeWith.value +
160
+ "&" +
161
+ "length" +
162
+ "=" +
163
+ wordLength.value;
164
+ window.history.pushState({ path: newurl }, "", newurl);
165
+
166
+ const params = new URLSearchParams(window.location.search);
167
+ serachValue = params.get("search");
168
+ prefixValue = params.get("prefix");
169
+ containsValue = params.get("contains");
170
+ suffixValue = params.get("suffix");
171
+ exculdeValue = params.get("exclude");
172
+ includeValue = params.get("include");
173
+ lengthValue = params.get("length");
174
+ dictonary = params.get("dictionary");
175
+
176
+ gtag("event", "page_view", {
177
+ page_location: window.location.pathname + location.search,
178
+ });
179
+ }
180
+
181
+ const paramName = 'search';
182
+ if (new URLSearchParams(window.location.search).has(paramName)) {
183
+ // Additional data to pass to the script
184
+ const additionalData = {
185
+ url: "{{site.url}}",
186
+ range: "{{page.blanktilerange}}"
187
+ };
188
+
189
+ var p1 = loadScript("/assets/js/wordfinder.js", additionalData)
190
+ .then((data) => {
191
+ console.log(data);
192
+ getData(txtBox.value.toLowerCase());
193
+ })
194
+ .catch((error) => {
195
+ console.error(error);
196
+ });
197
+ }
198
+ });