word-games-theme 2.9.5 → 2.9.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0811628371d094ba8e6511f09dc9d4e8baf5c607bb413d1c12f87266d352a1b7'
4
- data.tar.gz: f2d94a24451e5cd3b6334f727dbc06422a51faa9ee8d830106f746093284ae69
3
+ metadata.gz: d4cdc2afd0e570d207ead4677ebf3eb23ba3f68724ed092c9988d94bed79aa0a
4
+ data.tar.gz: 566c252604863daad298e81d96167e9b5a345b64c7674288f61d91ceae79277f
5
5
  SHA512:
6
- metadata.gz: f30f2fefe4113e7fc6ac556fcba8f6bab4e5539b04708066e00eca28cb1a8e49a9b38fa7c1093072b7f1382da3d01dbe127674cb506c17646b79682e7225b617
7
- data.tar.gz: a77777769b56d97c5fa3c9e195678ea0adbef2de82387de2fdac649118b396bca8fd896d3abb1d9830602c96ed4b56bace01e32b6b3277cd6c5d8d00bb125e53
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
- {% assign whitelist_urls = site.whitelist_urls %}
36
- {% if site.noindex_languages contains page.lang %}
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
- {% if site.blacklist_urls %}
43
- {% if site.blacklist_urls contains page.url %}
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
- console.log(document.querySelectorAll('*').length);
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
- // Fetch data from data.json
80
- async function fetchData() {
81
- const response = await fetch('/alllinks.json');
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.5
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-08 00:00:00.000000000 Z
11
+ date: 2024-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll