word-games-theme 2.9.2 → 2.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/header/en/data.json +96 -73
- data/_data/wordgames/en/root.json +308 -156
- data/_data/wordgames/hi/words-with-these-letters-and-2-blanks.json +197 -0
- data/_includes/alternates/alternates.html +77 -7
- data/_includes/wordgames/head/head.html +10 -0
- data/_includes/wordgames/header/blog-header.html +80 -25
- data/_includes/wordgames/header/new-header.html +132 -0
- data/_layouts/wordgames-blog.html +1 -1
- data/_layouts/wordgames-home.html +1 -1
- data/_layouts/wordgames-word-meaning.html +43 -27
- data/assets/css/wordgames-theme.css +497 -171
- data/assets/css/wordgames-variables.css +1 -1
- data/assets/images/close-menu.svg +2 -2
- data/assets/js/scrabbleDictonary.js +7 -4
- data/assets/js/theme.js +128 -51
- metadata +4 -2
@@ -1,9 +1,9 @@
|
|
1
|
-
<svg height="50px" width="1em" style="font-size: 25px" viewBox="0 0 24 24" fill="
|
1
|
+
<svg height="50px" width="1em" style="font-size: 25px" viewBox="0 0 24 24" fill="white" xmlns="http://www.w3.org/2000/svg" stroke="white">
|
2
2
|
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
3
3
|
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
|
4
4
|
<g id="SVGRepo_iconCarrier">
|
5
5
|
<g clip-path="url(#clip0_429_11083)">
|
6
|
-
<path d="M7 7.00006L17 17.0001M7 17.0001L17 7.00006" stroke="
|
6
|
+
<path d="M7 7.00006L17 17.0001M7 17.0001L17 7.00006" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
7
7
|
</g>
|
8
8
|
<defs>
|
9
9
|
<clipPath id="clip0_429_11083">
|
@@ -1,14 +1,17 @@
|
|
1
1
|
// getqueryUrl from form
|
2
2
|
const params = new URLSearchParams(window.location.search)
|
3
3
|
let serachValue = params.get('search')
|
4
|
+
let defintions = document.querySelector("#Defintions")
|
4
5
|
|
5
6
|
let txtBox = document.querySelector('.txtBox')
|
6
7
|
txtBox.value = serachValue
|
7
8
|
|
9
|
+
defintions.innerHTML = `Defintion(s) for ${serachValue}`
|
10
|
+
|
8
11
|
// DICTONARY
|
9
12
|
const fetchMeaning = async (serachValue) => {
|
10
13
|
try {
|
11
|
-
let resMeaning = await fetch(
|
14
|
+
let resMeaning = await fetch(`http://127.0.0.1:9000/wordMeaning?search=${serachValue}`)
|
12
15
|
let getDef = await resMeaning.text()
|
13
16
|
|
14
17
|
if (getDef && resMeaning.status == 200) {
|
@@ -144,7 +147,7 @@ const fetchTWL06Dic = async (serachValue) => {
|
|
144
147
|
}
|
145
148
|
|
146
149
|
try {
|
147
|
-
let res = await fetch(
|
150
|
+
let res = await fetch(`http://127.0.0.1:9000/gettwl06?search=${serachValue}`)
|
148
151
|
|
149
152
|
let getData = await res.text()
|
150
153
|
|
@@ -201,7 +204,7 @@ const fetchSOWPODSDic = async (serachValue) => {
|
|
201
204
|
sum += newAlphabet[item[i]] || 0 // for unknown characters
|
202
205
|
}
|
203
206
|
|
204
|
-
let res = await fetch(
|
207
|
+
let res = await fetch(`http://127.0.0.1:9000/getsowpods?search=${serachValue}`)
|
205
208
|
|
206
209
|
let getData = await res.text()
|
207
210
|
|
@@ -254,7 +257,7 @@ const fetchEnableDic = async (serachValue) => {
|
|
254
257
|
sum += newAlphabet[item[i]] || 0 // for unknown characters
|
255
258
|
}
|
256
259
|
|
257
|
-
let res = await fetch(
|
260
|
+
let res = await fetch(`http://127.0.0.1:9000/getenable?search=${serachValue}`)
|
258
261
|
|
259
262
|
let getData = await res.text()
|
260
263
|
|
data/assets/js/theme.js
CHANGED
@@ -8,64 +8,141 @@ if ("{{ site.removeBootstrapJs }}" === "true") {
|
|
8
8
|
const intModalBtn = document.querySelector("#int-modal-btn");
|
9
9
|
const closeBtn = document.querySelector("#close-modal");
|
10
10
|
|
11
|
-
if(intModalBtn){
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
}
|
11
|
+
if (intModalBtn) {
|
12
|
+
intModalBtn.addEventListener("click", () => {
|
13
|
+
languagesModal.style.display = "block";
|
14
|
+
languagesModal.classList.add("show");
|
15
|
+
let modal = document.createElement("div");
|
16
|
+
modal.classList.add("modal-backdrop", "show");
|
17
|
+
document.body.appendChild(modal);
|
18
|
+
});
|
19
|
+
closeBtn.addEventListener("click", () => {
|
20
|
+
languagesModal.style.display = "none";
|
21
|
+
languagesModal.classList.remove("show");
|
22
|
+
let modal = document.querySelector(".modal-backdrop");
|
23
|
+
document.body.removeChild(modal);
|
24
|
+
});
|
25
|
+
}
|
26
26
|
|
27
27
|
|
28
|
-
var mediaQuery = window.matchMedia("(max-width: 768px)")
|
29
|
-
let navbarDropdown = document.querySelector("#navbarDropdown");
|
30
|
-
let dropmenu = document.querySelector(".dropmenu");
|
31
|
-
navbarDropdown.addEventListener("click", () => {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
28
|
+
var mediaQuery = window.matchMedia("(max-width: 768px)")
|
29
|
+
let navbarDropdown = document.querySelector("#navbarDropdown");
|
30
|
+
let dropmenu = document.querySelector(".dropmenu");
|
31
|
+
// navbarDropdown.addEventListener("click", () => {
|
32
|
+
// if (dropmenu.classList.contains("show")) {
|
33
|
+
// dropmenu.classList.remove("show");
|
34
|
+
// dropmenu.style.display = "none"
|
35
|
+
// } else {
|
36
|
+
// dropmenu.classList.add("show");
|
37
|
+
// if (mediaQuery.matches) {
|
38
|
+
// dropmenu.style.display = "block"
|
39
|
+
// } else {
|
40
|
+
// dropmenu.style.display = "grid"
|
41
|
+
// dropmenu.style.padding = "3.5rem"
|
42
|
+
// dropmenu.style.gridTemplateColumns = "auto auto";
|
43
|
+
// dropmenu.style.columnGap = "5rem";
|
44
|
+
// dropmenu.style.rowGap = "1rem";
|
45
|
+
// dropmenu.style.borderBottom = "1px solid rgba(0, 0, 0, 0.1)"
|
46
|
+
// dropmenu.style.borderLeft = "1px solid rgba(0, 0, 0, 0.1)"
|
47
|
+
// dropmenu.style.borderRight = "1px solid rgba(0, 0, 0, 0.1)"
|
48
|
+
// }
|
49
|
+
|
50
|
+
// }
|
51
|
+
// });
|
52
|
+
|
53
|
+
|
54
|
+
const wordGamesToolbarListItems = document.querySelectorAll(
|
55
|
+
".wordgames-toolbar-list-item-span"
|
56
|
+
);
|
57
|
+
|
58
|
+
Array.from(wordGamesToolbarListItems).map((item) => {
|
59
|
+
item.addEventListener("click", (e) => {
|
60
|
+
e.preventDefault();
|
61
|
+
var style = window.getComputedStyle(item.nextElementSibling);
|
62
|
+
var maxHeight = style.getPropertyValue("max-height");
|
63
|
+
console.log(maxHeight)
|
64
|
+
if (maxHeight && maxHeight !== "0px") {
|
65
|
+
// If the item is expanded, collapse it
|
66
|
+
item.nextElementSibling.style.maxHeight = "0";
|
67
|
+
item.nextElementSibling.style.opacity = "0";
|
68
|
+
item.nextElementSibling.style.height = "0";
|
39
69
|
} else {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
dropmenu.style.borderBottom= "1px solid rgba(0, 0, 0, 0.1)"
|
46
|
-
dropmenu.style.borderLeft= "1px solid rgba(0, 0, 0, 0.1)"
|
47
|
-
dropmenu.style.borderRight= "1px solid rgba(0, 0, 0, 0.1)"
|
70
|
+
// If the item is collapsed, expand it
|
71
|
+
item.nextElementSibling.style.maxHeight =
|
72
|
+
item.nextElementSibling.scrollHeight + "px";
|
73
|
+
item.nextElementSibling.style.opacity = "1";
|
74
|
+
item.nextElementSibling.style.height = "auto";
|
48
75
|
}
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
const navbarToggler = document.querySelector('.navbar-toggler');
|
53
|
-
const navBar = document.querySelector('#navbarSupportedContent');
|
54
|
-
const menuIcon = '/assets/images/hamburger-menu.svg';
|
55
|
-
const closeIcon = '/assets/images/close-menu.svg';
|
56
|
-
const imgElement = navbarToggler.querySelector('img');
|
76
|
+
});
|
77
|
+
});
|
78
|
+
|
57
79
|
|
58
|
-
|
80
|
+
|
81
|
+
const navbarToggler = document.querySelector('.navbar-toggler');
|
82
|
+
const navBar = document.querySelector('#navbarSupportedContent');
|
83
|
+
const menuIcon = '/assets/images/hamburger-menu.svg';
|
84
|
+
const closeIcon = '/assets/images/close-menu.svg';
|
85
|
+
const imgElement = navbarToggler.querySelector('img');
|
86
|
+
|
87
|
+
navbarToggler.addEventListener('click', () => {
|
59
88
|
if (navBar.classList.contains('show')) {
|
60
|
-
|
61
|
-
|
62
|
-
|
89
|
+
navBar.classList.remove('show');
|
90
|
+
navBar.style.display = 'none';
|
91
|
+
imgElement.src = menuIcon; // Change to hamburger menu icon when closing
|
63
92
|
} else {
|
64
|
-
|
65
|
-
|
66
|
-
|
93
|
+
navBar.classList.add('show');
|
94
|
+
navBar.style.display = 'block';
|
95
|
+
imgElement.src = closeIcon; // Change to close icon when opening
|
67
96
|
}
|
68
|
-
});
|
97
|
+
});
|
69
98
|
|
70
99
|
|
71
|
-
}
|
100
|
+
}
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
// Fetch data from data.json
|
106
|
+
async function fetchData() {
|
107
|
+
const response = await fetch('/alllinks.json');
|
108
|
+
const data = await response.json();
|
109
|
+
return data.featuredLinks;
|
110
|
+
}
|
111
|
+
|
112
|
+
// Filter data based on search query
|
113
|
+
function filterData(data, query) {
|
114
|
+
return data.filter(item => item.name.toLowerCase().includes(query.toLowerCase()));
|
115
|
+
}
|
116
|
+
|
117
|
+
// Display filtered results
|
118
|
+
function displayResults(results) {
|
119
|
+
const resultsContainer = document.getElementById('results');
|
120
|
+
resultsContainer.style.display = results.length ? 'block' : 'none';
|
121
|
+
resultsContainer.innerHTML = results.length
|
122
|
+
? results.map(result => `<div class="result-item"><a href="${result.url}" target="_blank">${result.name}</a></div>`).join('')
|
123
|
+
: '<p>No results found</p>';
|
124
|
+
}
|
125
|
+
|
126
|
+
// Handle search input
|
127
|
+
const searchInput = document.querySelector('.searchBar input');
|
128
|
+
searchInput.addEventListener('input', async (event) => {
|
129
|
+
const query = event.target.value;
|
130
|
+
const data = await fetchData();
|
131
|
+
const filteredResults = filterData(data, query);
|
132
|
+
displayResults(filteredResults);
|
133
|
+
|
134
|
+
gtag('event', 'search', {
|
135
|
+
'event_category': 'engagement',
|
136
|
+
'event_label': 'Search Box',
|
137
|
+
'value': query
|
138
|
+
});
|
139
|
+
|
140
|
+
});
|
141
|
+
|
142
|
+
// Hide results when clicking outside search input and results container
|
143
|
+
document.addEventListener('click', (event) => {
|
144
|
+
const resultsContainer = document.getElementById('results');
|
145
|
+
if (!searchInput.contains(event.target) && !resultsContainer.contains(event.target)) {
|
146
|
+
resultsContainer.style.display = 'none';
|
147
|
+
}
|
148
|
+
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: word-games-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- manpreet-appscms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -110,6 +110,7 @@ files:
|
|
110
110
|
- _data/wordgames/en/word-meaning.json
|
111
111
|
- _data/wordgames/en/words_with_friends_word_finder.json
|
112
112
|
- _data/wordgames/hi/four_letter_word_finder.json
|
113
|
+
- _data/wordgames/hi/words-with-these-letters-and-2-blanks.json
|
113
114
|
- _data/wordleSolver/en/data.json
|
114
115
|
- _data/wordleSolver/en/resultData.json
|
115
116
|
- _data/xyzPagesData/en/unscramble-letters-jumble.json
|
@@ -178,6 +179,7 @@ files:
|
|
178
179
|
- _includes/wordgames/head/head.html
|
179
180
|
- _includes/wordgames/header/blog-header.html
|
180
181
|
- _includes/wordgames/header/header.html
|
182
|
+
- _includes/wordgames/header/new-header.html
|
181
183
|
- _includes/wordgames/headings/headings.html
|
182
184
|
- _includes/wordgames/howto/howto.html
|
183
185
|
- _includes/wordgames/infographics/infographics.html
|