word-games-theme 2.9.5 → 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/wordgames/head/head.html +9 -7
- data/assets/js/theme.js +15 -16
- 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: d4cdc2afd0e570d207ead4677ebf3eb23ba3f68724ed092c9988d94bed79aa0a
|
|
4
|
+
data.tar.gz: 566c252604863daad298e81d96167e9b5a345b64c7674288f61d91ceae79277f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5688c177b39d42fb44ada6bf115a5f0f619dec711a1f1a296191d383f565c07a08fa6f6235edfae8883be1d55bde178fffa7dd001e160d5b7adc48c6a7afe6a
|
|
7
|
+
data.tar.gz: 04afdd27295eeff067f1f484885bbdfa1f7dd53e64e250c1fe771ccb53b9dec1556dc3c9def588bdd42fbbb24bf192a8f26345ac1dca4014618afea6bc60e1a9
|
|
@@ -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
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
---
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
console.log(document.querySelectorAll('*').length);
|
|
6
5
|
if ("{{ site.removeBootstrapJs }}" === "true") {
|
|
7
6
|
const languagesModal = document.querySelector("#staticBackdrop");
|
|
8
7
|
const intModalBtn = document.querySelector("#int-modal-btn");
|
|
@@ -73,22 +72,26 @@ if ("{{ site.removeBootstrapJs }}" === "true") {
|
|
|
73
72
|
|
|
74
73
|
}
|
|
75
74
|
|
|
75
|
+
const worker = new Worker('/assets/js/search-worker.js');
|
|
76
|
+
function fetchData() {
|
|
77
|
+
return new Promise((resolve, reject) => {
|
|
78
|
+
worker.postMessage({
|
|
79
|
+
type: "api",
|
|
80
|
+
endpoint: `/alllinks.json`
|
|
81
|
+
});
|
|
76
82
|
|
|
83
|
+
worker.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
|
+
worker.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,8 +99,6 @@ 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) => {
|
|
@@ -115,8 +116,6 @@ searchInput.addEventListener('input', async (event) => {
|
|
|
115
116
|
'value': query
|
|
116
117
|
});
|
|
117
118
|
});
|
|
118
|
-
|
|
119
|
-
// Hide results when clicking outside search input and results container
|
|
120
119
|
document.addEventListener('click', (event) => {
|
|
121
120
|
const resultsContainer = document.getElementById('results');
|
|
122
121
|
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.6
|
|
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
|