atlasdocs-theme 0.2.2__tar.gz → 0.3.1__tar.gz

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.
Files changed (85) hide show
  1. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/PKG-INFO +1 -1
  2. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/indico_category_loader.js +140 -10
  3. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/pyproject.toml +1 -1
  4. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/.gitignore +0 -0
  5. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/404.html +0 -0
  6. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/AQP.html +0 -0
  7. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/JIRA.html +0 -0
  8. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/__init__.py +0 -0
  9. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/banners/network.jpg +0 -0
  10. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/fonts/OpenSans-Italic-VariableFont_wdth_wght.ttf +0 -0
  11. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/fonts/OpenSans-VariableFont_wdth_wght.ttf +0 -0
  12. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/fonts/RobotoMono-Italic-VariableFont_wght.ttf +0 -0
  13. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/fonts/RobotoMono-VariableFont_wght.ttf +0 -0
  14. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/images/logo.svg +0 -0
  15. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/athena_changelog_loader.js +0 -0
  16. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/extra.js +0 -0
  17. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/jira_project_loader.js +0 -0
  18. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/mathjax.js +0 -0
  19. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/tex.js +0 -0
  20. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
  21. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
  22. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
  23. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
  24. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
  25. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
  26. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
  27. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
  28. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
  29. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
  30. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
  31. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
  32. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
  33. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
  34. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
  35. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
  36. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
  37. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
  38. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
  39. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
  40. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
  41. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
  42. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
  43. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/javascripts/twikiregistry.js +0 -0
  44. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/blocker.svg +0 -0
  45. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/critical.svg +0 -0
  46. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/high.svg +0 -0
  47. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/highest.svg +0 -0
  48. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/icons.jpg +0 -0
  49. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/low.svg +0 -0
  50. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/lowest.svg +0 -0
  51. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/major.svg +0 -0
  52. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/medium.svg +0 -0
  53. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/minor.svg +0 -0
  54. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/jira/trivial.svg +0 -0
  55. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/logo/atlaslogo.svg +0 -0
  56. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/stylesheets/badges.css +0 -0
  57. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/stylesheets/extra.classic.css +0 -0
  58. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/stylesheets/extra.css +0 -0
  59. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/stylesheets/jira.css +0 -0
  60. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/assets/stylesheets/twikiregistry.css +0 -0
  61. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/bookmarks.html +0 -0
  62. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/config/02-assets.toml +0 -0
  63. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/config/04-theme.toml +0 -0
  64. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/config/05-markdown.toml +0 -0
  65. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/config/06-plugins.toml +0 -0
  66. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/feedback.html +0 -0
  67. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/frontpage.html +0 -0
  68. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/main.html +0 -0
  69. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/mkdocs_theme.yml +0 -0
  70. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/actions.html +0 -0
  71. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/announce.html +0 -0
  72. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/aqp.html +0 -0
  73. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/atlas_authors.html +0 -0
  74. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/atlas_pagestatus.html +0 -0
  75. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/content.html +0 -0
  76. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/jira.html +0 -0
  77. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/page-actions.html +0 -0
  78. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/path-item.html +0 -0
  79. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/path.html +0 -0
  80. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/social.html +0 -0
  81. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/partials/source.html +0 -0
  82. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/atlasdocs_theme/user_profile.html +0 -0
  83. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/scripts/release.sh +0 -0
  84. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/scripts/test_css.py +0 -0
  85. {atlasdocs_theme-0.2.2 → atlasdocs_theme-0.3.1}/scripts/test_templates.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atlasdocs-theme
3
- Version: 0.2.2
3
+ Version: 0.3.1
4
4
  Summary: ATLASDocs hub theme for Zensical/MkDocs
5
5
  Author-email: Jason Oliver <jason.oliver@cern.ch>
6
6
  License-Expression: Apache-2.0
@@ -131,11 +131,13 @@
131
131
  }
132
132
 
133
133
  function renderAll(container, events) {
134
- const filtered = events.filter(ev => ev._type !== 'category_metadata' && ev.date);
134
+ if (!events.length) {
135
+ container.innerHTML = '<p><em>No meetings found.</em></p>';
136
+ return;
137
+ }
135
138
 
136
- // Group by month, newest first
137
139
  const byMonth = new Map();
138
- filtered
140
+ events
139
141
  .sort((a, b) => b.date.localeCompare(a.date))
140
142
  .forEach(ev => {
141
143
  const [y, m] = ev.date.split('-').map(Number);
@@ -145,14 +147,93 @@
145
147
  byMonth.get(key).events.push(ev);
146
148
  });
147
149
 
148
- const html = [...byMonth.entries()]
150
+ container.innerHTML = [...byMonth.entries()]
149
151
  .sort(([a], [b]) => b.localeCompare(a))
150
152
  .map(([, { label, events: evs }]) =>
151
153
  `<h2>${label}</h2>\n` + evs.map(renderMeeting).join('\n')
152
154
  )
153
155
  .join('\n');
156
+ }
157
+
158
+ // ---------------------------------------------------------------------------
159
+ // Fuse.js search workers
160
+ // Workers are built from the pre-built _search.json index, not the full
161
+ // category JSON. Each returns a Set<event_url> for the matched events.
162
+ // ---------------------------------------------------------------------------
163
+
164
+ class FuseWorker {
165
+ constructor(items, keys, options = {}) {
166
+ this._items = items;
167
+ this._keys = keys;
168
+ this._options = { threshold: 0.35, ignoreLocation: true, ...options };
169
+ this._fuse = null;
170
+ }
171
+
172
+ init(FuseClass) {
173
+ this._fuse = new FuseClass(this._items, { keys: this._keys, ...this._options });
174
+ }
175
+
176
+ _matchingUrls(query) {
177
+ const hits = (query && this._fuse) ? this._fuse.search(query).map(r => r.item) : this._items;
178
+ return new Set(hits.map(item => item.event_url || item.url));
179
+ }
180
+ }
154
181
 
155
- container.innerHTML = html || '<p><em>No meetings found.</em></p>';
182
+ class MeetingWorker extends FuseWorker {
183
+ constructor(index) {
184
+ super(
185
+ index.filter(r => r.type === 'event'),
186
+ [{ name: 'title', weight: 1 }]
187
+ );
188
+ }
189
+ matchingUrls(query) { return this._matchingUrls(query); }
190
+ }
191
+
192
+ class ContributionWorker extends FuseWorker {
193
+ constructor(index) {
194
+ super(
195
+ index.filter(r => r.type === 'contribution'),
196
+ [{ name: 'title', weight: 1 }]
197
+ );
198
+ }
199
+ matchingUrls(query) { return this._matchingUrls(query); }
200
+ }
201
+
202
+ class SpeakerWorker extends FuseWorker {
203
+ constructor(index) {
204
+ super(
205
+ index.filter(r => r.type === 'speaker'),
206
+ [{ name: 'name', weight: 2 }, { name: 'variants', weight: 1 }]
207
+ );
208
+ }
209
+ matchingUrls(query) { return this._matchingUrls(query); }
210
+ }
211
+
212
+ // ---------------------------------------------------------------------------
213
+ // Search UI
214
+ // ---------------------------------------------------------------------------
215
+
216
+ function buildSearchBar() {
217
+ const wrap = document.createElement('div');
218
+ wrap.className = 'indico-search-bar';
219
+ wrap.innerHTML =
220
+ `<input type="search" placeholder="Search meetings, talks, speakers…" aria-label="Search meetings">` +
221
+ `<span class="indico-search-count"></span>`;
222
+ return wrap;
223
+ }
224
+
225
+ // ---------------------------------------------------------------------------
226
+ // Fuse.js loader — ESM import avoids polluting window.Fuse and
227
+ // conflicting with MkDocs Material's own bundled Fuse instance.
228
+ // ---------------------------------------------------------------------------
229
+
230
+ let _fusePromise = null;
231
+ function loadFuse() {
232
+ if (_fusePromise) return _fusePromise;
233
+ _fusePromise = import('https://cdn.jsdelivr.net/npm/fuse.js@7/dist/fuse.esm.js')
234
+ .then(m => m.default)
235
+ .catch(() => null);
236
+ return _fusePromise;
156
237
  }
157
238
 
158
239
  // ---------------------------------------------------------------------------
@@ -162,13 +243,62 @@
162
243
  function load(container) {
163
244
  const src = container.dataset.json;
164
245
  if (!src) return;
246
+
247
+ // Derive search index path: category_492.json → category_492_search.json
248
+ const searchSrc = container.dataset.search
249
+ || src.replace(/\.json$/, '_search.json');
250
+
165
251
  container.innerHTML = '<p><em>Loading…</em></p>';
166
- fetch(src)
167
- .then(r => { if (!r.ok) throw new Error(`HTTP ${r.status}`); return r.json(); })
168
- .then(data => renderAll(container, Array.isArray(data) ? data : (data.events || [])))
169
- .catch(err => {
170
- container.innerHTML = `<p><em>Could not load meetings: ${err.message}</em></p>`;
252
+
253
+ Promise.all([
254
+ fetch(src).then(r => { if (!r.ok) throw new Error(`HTTP ${r.status}`); return r.json(); }),
255
+ fetch(searchSrc).then(r => r.ok ? r.json() : []).catch(() => []),
256
+ loadFuse(),
257
+ ]).then(([data, index, FuseClass]) => {
258
+ const events = (Array.isArray(data) ? data : (data.events || []))
259
+ .filter(ev => ev._type !== 'category_metadata' && ev.date);
260
+
261
+ const meetingWorker = new MeetingWorker(index);
262
+ const contributionWorker = new ContributionWorker(index);
263
+ const speakerWorker = new SpeakerWorker(index);
264
+
265
+ if (FuseClass) {
266
+ [meetingWorker, contributionWorker, speakerWorker]
267
+ .forEach(w => w.init(FuseClass));
268
+ }
269
+
270
+ const bar = buildSearchBar();
271
+ container.parentNode.insertBefore(bar, container);
272
+ const input = bar.querySelector('input');
273
+ const countEl = bar.querySelector('.indico-search-count');
274
+
275
+ function applySearch(query) {
276
+ let results;
277
+ if (!query) {
278
+ results = events;
279
+ countEl.textContent = '';
280
+ } else {
281
+ const urls = new Set([
282
+ ...meetingWorker.matchingUrls(query),
283
+ ...contributionWorker.matchingUrls(query),
284
+ ...speakerWorker.matchingUrls(query),
285
+ ]);
286
+ results = events.filter(ev => urls.has(ev.url));
287
+ countEl.textContent = `${results.length} result${results.length !== 1 ? 's' : ''}`;
288
+ }
289
+ renderAll(container, results);
290
+ }
291
+
292
+ let timer;
293
+ input.addEventListener('input', e => {
294
+ clearTimeout(timer);
295
+ timer = setTimeout(() => applySearch(e.target.value.trim()), 200);
171
296
  });
297
+
298
+ renderAll(container, events);
299
+ }).catch(err => {
300
+ container.innerHTML = `<p><em>Could not load meetings: ${err.message}</em></p>`;
301
+ });
172
302
  }
173
303
 
174
304
  const container = document.getElementById('indico-meetings');
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "atlasdocs-theme"
7
- version = "0.2.2"
7
+ version = "0.3.1"
8
8
  description = "ATLASDocs hub theme for Zensical/MkDocs"
9
9
  authors = [
10
10
  { name = "Jason Oliver", email = "jason.oliver@cern.ch" }