word-games-theme 2.9.5 → 2.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/wordgames/head/head.html +9 -7
- data/assets/js/theme.js +24 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c98904560055d0f2c42398d1b9e4b7ac197e0e74870dc2467c431c12a87a52e
|
4
|
+
data.tar.gz: 55241b01608d1d986b1a4422c3f30af16a82d17bd668195a77be05f818321c54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f116421297f717576fc2020da33ed2c100a1643b5f5a48274d5b90bd228cb61a4c01024447655c03f59cd43624887c8e20b15293e8d578d961264276aed19842
|
7
|
+
data.tar.gz: 9e4039a255d4a41a48892d21658977c4bbee65d6f7c6bd95f1e71ea993f718291c9e0448dbca2b67dbec068d92c847bb760cc67f652c0f4b9fa6714d451b96bc
|
@@ -32,17 +32,19 @@
|
|
32
32
|
<meta name="robots" content="noindex" />
|
33
33
|
{%- endif -%}
|
34
34
|
|
35
|
-
|
36
|
-
|
35
|
+
|
36
|
+
|
37
|
+
{% assign whitelist_urls = site.data.noindexURLs.whitelist_urls %}
|
38
|
+
{% assign noindex_languages = site.data.noindexURLs.noindex_languages %}
|
39
|
+
{% if noindex_languages contains page.lang %}
|
37
40
|
{% unless whitelist_urls contains page.url %}
|
38
41
|
<meta name="robots" content="noindex" />
|
39
42
|
{% endunless %}
|
40
43
|
{% endif %}
|
41
|
-
|
42
|
-
{%
|
43
|
-
{% if
|
44
|
-
<meta name="robots" content="noindex"
|
45
|
-
{% endif %}
|
44
|
+
|
45
|
+
{% assign blacklist_urls = site.data.noindexURLs.blacklist_urls %}
|
46
|
+
{% if blacklist_urls contains page.url %}
|
47
|
+
<meta name="robots" content="noindex" />
|
46
48
|
{% endif %}
|
47
49
|
|
48
50
|
|
data/assets/js/theme.js
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
---
|
3
3
|
|
4
4
|
console.log(document.querySelectorAll('*').length);
|
5
|
-
|
6
5
|
if ("{{ site.removeBootstrapJs }}" === "true") {
|
7
6
|
const languagesModal = document.querySelector("#staticBackdrop");
|
8
7
|
const intModalBtn = document.querySelector("#int-modal-btn");
|
@@ -25,7 +24,7 @@ if ("{{ site.removeBootstrapJs }}" === "true") {
|
|
25
24
|
}
|
26
25
|
|
27
26
|
var mediaQuery = window.matchMedia("(max-width: 768px)")
|
28
|
-
|
27
|
+
|
29
28
|
const wordGamesToolbarListItems = document.querySelectorAll(
|
30
29
|
".wordgames-toolbar-list-item-span"
|
31
30
|
);
|
@@ -73,22 +72,26 @@ if ("{{ site.removeBootstrapJs }}" === "true") {
|
|
73
72
|
|
74
73
|
}
|
75
74
|
|
75
|
+
const searchWorker = new Worker('/assets/js/search-worker.js');
|
76
|
+
function fetchData() {
|
77
|
+
return new Promise((resolve, reject) => {
|
78
|
+
searchWorker.postMessage({
|
79
|
+
type: "api",
|
80
|
+
endpoint: `/alllinks.json`
|
81
|
+
});
|
76
82
|
|
83
|
+
searchWorker.onmessage = (event) => {
|
84
|
+
resolve(event.data.data.featuredLinks);
|
85
|
+
};
|
77
86
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
const data = await response.json();
|
83
|
-
return data.featuredLinks;
|
87
|
+
searchWorker.onerror = (error) => {
|
88
|
+
reject(error);
|
89
|
+
};
|
90
|
+
});
|
84
91
|
}
|
85
|
-
|
86
|
-
// Filter data based on search query
|
87
92
|
function filterData(data, query) {
|
88
93
|
return data.filter(item => item.name.toLowerCase().includes(query.toLowerCase()));
|
89
94
|
}
|
90
|
-
|
91
|
-
// Display filtered results
|
92
95
|
function displayResults(results) {
|
93
96
|
const resultsContainer = document.getElementById('results');
|
94
97
|
resultsContainer.style.display = results.length ? 'block' : 'none';
|
@@ -96,11 +99,15 @@ function displayResults(results) {
|
|
96
99
|
? results.map(result => `<div class="result-item"><a href="${result.url}" target="_blank">${result.name}</a></div>`).join('')
|
97
100
|
: '<p>No results found</p>';
|
98
101
|
}
|
99
|
-
|
100
|
-
// Handle search input
|
101
102
|
const searchInput = document.querySelector('.searchBar input');
|
102
103
|
let data;
|
103
104
|
searchInput.addEventListener('input', async (event) => {
|
105
|
+
if (searchInput.value !== '') {
|
106
|
+
searchInput.classList.add('blinkBoxShadow');
|
107
|
+
} else {
|
108
|
+
searchInput.classList.remove('blinkBoxShadow');
|
109
|
+
}
|
110
|
+
|
104
111
|
const query = event.target.value;
|
105
112
|
if (!data) {
|
106
113
|
// Fetch the data only if it hasn't been fetched before
|
@@ -115,8 +122,10 @@ searchInput.addEventListener('input', async (event) => {
|
|
115
122
|
'value': query
|
116
123
|
});
|
117
124
|
});
|
125
|
+
searchInput.addEventListener('blur', () => {
|
126
|
+
searchInput.classList.remove('blinkBoxShadow');
|
127
|
+
});
|
118
128
|
|
119
|
-
// Hide results when clicking outside search input and results container
|
120
129
|
document.addEventListener('click', (event) => {
|
121
130
|
const resultsContainer = document.getElementById('results');
|
122
131
|
if (!searchInput.contains(event.target) && !resultsContainer.contains(event.target)) {
|
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.7
|
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-07-
|
11
|
+
date: 2024-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|