jekyll-theme-centos 2.52.0.beta.52 → 2.52.0.beta.53

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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/_data/base/bits_schema.yml +5 -4
  3. data/_data/base/content_schema.yml +1 -1
  4. data/_data/base/footer.yml +9 -0
  5. data/_data/base/footer_schema.yml +55 -0
  6. data/_data/base/heading_anchor.yml +4 -0
  7. data/_data/base/heading_anchor_schema.yml +37 -0
  8. data/_data/base/link_schema.yml +101 -67
  9. data/_data/base/locales_schema.yml +1 -1
  10. data/_data/base/project_schema.yml +8 -4
  11. data/_data/base/title_schema.yml +1 -1
  12. data/_data/base/toc_schema.yml +16 -2
  13. data/_includes/base/announcement.html.liquid +19 -7
  14. data/_includes/base/artwork.html.liquid +18 -6
  15. data/_includes/base/backtotop.html.liquid +20 -6
  16. data/_includes/base/bits.html.liquid +31 -18
  17. data/_includes/base/breadcrumb.html.liquid +7 -1
  18. data/_includes/base/breakingnews.html.liquid +19 -7
  19. data/_includes/base/card.html.liquid +43 -29
  20. data/_includes/base/configuration-variables-nested.html.liquid +1 -1
  21. data/_includes/base/configuration-variables.html.liquid +3 -3
  22. data/_includes/base/copyright.html.liquid +18 -6
  23. data/_includes/base/copyvalue.html.liquid +19 -5
  24. data/_includes/base/datatable.html.liquid +20 -6
  25. data/_includes/base/event.html.liquid +33 -21
  26. data/_includes/base/fontawesome.html.liquid +21 -7
  27. data/_includes/base/footer.html.liquid +36 -29
  28. data/_includes/base/head.html.liquid +60 -68
  29. data/_includes/base/heading_anchor.html.liquid +62 -0
  30. data/_includes/base/highlight.html.liquid +19 -5
  31. data/_includes/base/link.html.liquid +47 -53
  32. data/_includes/base/locales.html.liquid +41 -30
  33. data/_includes/base/navbar.html.liquid +22 -12
  34. data/_includes/base/navindex.html.liquid +14 -2
  35. data/_includes/base/ogp.html.liquid +89 -75
  36. data/_includes/base/project.html.liquid +34 -22
  37. data/_includes/base/script.html.liquid +7 -19
  38. data/_includes/base/shortcut.html.liquid +32 -24
  39. data/_includes/base/social.html.liquid +33 -23
  40. data/_includes/base/sponsors-cards.html.liquid +17 -6
  41. data/_includes/base/sponsors-carousel.html.liquid +21 -8
  42. data/_includes/base/title.html.liquid +21 -10
  43. data/_includes/base/toc.html.liquid +2 -2
  44. data/_layouts/base/default.html +8 -8
  45. data/_sass/base/_customization.scss +47 -0
  46. data/assets/img/base/page-layout-default.png +0 -0
  47. data/assets/img/base/page-layout-default.svg +878 -1241
  48. data/assets/img/base/page-with-backtotop.png +0 -0
  49. data/assets/img/base/page-with-backtotop.svg +800 -573
  50. data/assets/img/base/page-with-copyright.png +0 -0
  51. data/assets/img/base/page-with-copyright.svg +818 -645
  52. data/assets/img/base/page-with-footer.png +0 -0
  53. data/assets/img/base/page-with-footer.svg +1018 -0
  54. data/assets/img/base/page-with-link.png +0 -0
  55. data/assets/img/base/page-with-link.svg +142 -139
  56. data/assets/img/base/page-with-locales.png +0 -0
  57. data/assets/img/base/page-with-locales.svg +795 -577
  58. data/assets/img/base/page-with-shortcut.png +0 -0
  59. data/assets/img/base/page-with-shortcut.svg +796 -569
  60. data/assets/img/base/page-with-social.png +0 -0
  61. data/assets/img/base/page-with-social.svg +811 -673
  62. data/assets/img/base/page-with-sponsors.png +0 -0
  63. data/assets/img/base/page-with-sponsors.svg +795 -568
  64. data/assets/js/base/heading-anchor.js +108 -0
  65. data/assets/js/base/init-tooltips.js +5 -4
  66. metadata +10 -3
  67. data/_data/base/toc_generator_schema.yml +0 -102
  68. /data/_includes/base/{toc_generator.html.liquid → toc-generator.html.liquid} +0 -0
@@ -0,0 +1,108 @@
1
+ // Heading Anchor Component — requires Bootstrap >= 5.3 (tooltip.setContent) and Font Awesome 6+
2
+
3
+ document.addEventListener('DOMContentLoaded', () => {
4
+ if (typeof bootstrap === 'undefined') {
5
+ console.warn('heading-anchor: Bootstrap not available');
6
+ return;
7
+ }
8
+
9
+ const DEFAULT_TEXT = 'Copy link';
10
+ const scriptEl = document.getElementById('centos-heading-anchor');
11
+ const RESET_DELAY = scriptEl?.dataset.resetDelay
12
+ ? parseInt(scriptEl.dataset.resetDelay, 10) : 1500;
13
+ const SUCCESS_TEXT = scriptEl?.dataset.successMessage || 'Copied!';
14
+
15
+ // One shared region: multiple regions would cause simultaneous AT announcements per anchor.
16
+ let liveRegion = document.getElementById('centos-heading-anchor-live');
17
+ if (!liveRegion) {
18
+ liveRegion = document.createElement('div');
19
+ liveRegion.id = 'centos-heading-anchor-live';
20
+ liveRegion.setAttribute('aria-live', 'polite');
21
+ liveRegion.setAttribute('aria-atomic', 'true');
22
+ liveRegion.className = 'visually-hidden';
23
+ document.body.appendChild(liveRegion);
24
+ }
25
+
26
+ document.querySelectorAll('.heading-anchor[data-copy-anchor]').forEach(anchor => {
27
+ // FA SVG+JS replaces <i> with <svg> before this DOMContentLoaded fires.
28
+ // Cache innerHTML after FA has processed so it can be restored on reset.
29
+ const originalIconHTML = anchor.innerHTML;
30
+ // Guards blur/mouseenter handlers from collapsing the tooltip during the success window.
31
+ let isLocked = false;
32
+
33
+ const tooltip = new bootstrap.Tooltip(anchor, {
34
+ title: DEFAULT_TEXT,
35
+ trigger: 'manual', // CSS sets pointer-events:none on hidden anchors, defeating Bootstrap's auto hover/focus triggers.
36
+ placement: 'top',
37
+ animation: false // Prevents Bootstrap's fade and the CSS opacity transition from desyncing.
38
+ });
39
+
40
+ const updateUI = (isSuccess) => {
41
+ tooltip.setContent({ '.tooltip-inner': isSuccess ? SUCCESS_TEXT : DEFAULT_TEXT });
42
+ if (isSuccess) {
43
+ // FA SVG+JS mode: <i> has been replaced by <svg>; swap the path to a checkmark.
44
+ const svg = anchor.querySelector('svg');
45
+ if (svg) {
46
+ const path = svg.querySelector('path');
47
+ if (path) {
48
+ svg.setAttribute('viewBox', '0 0 448 512');
49
+ path.setAttribute('d', 'M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z');
50
+ }
51
+ } else {
52
+ // FA webfont mode: <i> is still in the DOM; toggle classes normally.
53
+ const icon = anchor.querySelector('i');
54
+ if (icon) { icon.classList.remove('fa-link'); icon.classList.add('fa-check'); }
55
+ }
56
+ } else {
57
+ anchor.innerHTML = originalIconHTML;
58
+ }
59
+ anchor.classList.toggle('is-active', isSuccess);
60
+ // Empty string on reset prevents AT from re-announcing stale text on DOM inspection.
61
+ liveRegion.textContent = isSuccess ? SUCCESS_TEXT : '';
62
+ if (isSuccess) tooltip.show();
63
+ };
64
+
65
+ const handleInteraction = (show) => {
66
+ if (!isLocked) show ? tooltip.show() : tooltip.hide();
67
+ };
68
+
69
+ anchor.addEventListener('mouseenter', () => handleInteraction(true));
70
+ anchor.addEventListener('mouseleave', () => handleInteraction(false));
71
+ anchor.addEventListener('focus', () => handleInteraction(true));
72
+ anchor.addEventListener('blur', () => handleInteraction(false));
73
+
74
+ anchor.addEventListener('click', async (e) => {
75
+ e.preventDefault();
76
+ if (isLocked) return;
77
+
78
+ if (!navigator.clipboard) {
79
+ console.warn('heading-anchor: Clipboard API unavailable');
80
+ return;
81
+ }
82
+
83
+ const url = window.location.origin + window.location.pathname + anchor.dataset.copyAnchor;
84
+
85
+ try {
86
+ await navigator.clipboard.writeText(url);
87
+ isLocked = true;
88
+ // isLocked must be true before blur() so the resulting blur event is suppressed
89
+ // and does not hide the tooltip before the success state has been rendered.
90
+ anchor.blur();
91
+ updateUI(true);
92
+
93
+ setTimeout(() => {
94
+ isLocked = false;
95
+ updateUI(false);
96
+ // mouseleave/blur events fired while isLocked was true were suppressed;
97
+ // hide now if the user already moved away during the success window.
98
+ if (!anchor.matches(':hover')) tooltip.hide();
99
+ }, RESET_DELAY);
100
+
101
+ } catch (err) {
102
+ console.warn('heading-anchor: clipboard write failed', err);
103
+ isLocked = false;
104
+ anchor.innerHTML = originalIconHTML;
105
+ }
106
+ });
107
+ });
108
+ });
@@ -1,5 +1,6 @@
1
- // Bootstrap Tooltip Initialization
2
- // Initializes all Bootstrap tooltips on the page
3
- // Data attributes are NOT needed - this is a global initialization
1
+ // Bootstrap Tooltip and Popover Initialization
4
2
  const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
5
- const tooltipList = [...tooltipTriggerList].map((tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl));
3
+ const tooltipList = [...tooltipTriggerList].map((el) => new bootstrap.Tooltip(el));
4
+
5
+ const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]');
6
+ const popoverList = [...popoverTriggerList].map((el) => new bootstrap.Popover(el));
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-centos
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.52.0.beta.52
4
+ version: 2.52.0.beta.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - ReleaseBot
@@ -298,7 +298,11 @@ files:
298
298
  - _data/base/datatable_schema.yml
299
299
  - _data/base/event_schema.yml
300
300
  - _data/base/fontawesome_schema.yml
301
+ - _data/base/footer.yml
302
+ - _data/base/footer_schema.yml
301
303
  - _data/base/head_schema.yml
304
+ - _data/base/heading_anchor.yml
305
+ - _data/base/heading_anchor_schema.yml
302
306
  - _data/base/highlight_schema.yml
303
307
  - _data/base/image_schema.yml
304
308
  - _data/base/languages.yml
@@ -317,7 +321,6 @@ files:
317
321
  - _data/base/sponsors.yml
318
322
  - _data/base/sponsors_schema.yml
319
323
  - _data/base/title_schema.yml
320
- - _data/base/toc_generator_schema.yml
321
324
  - _data/base/toc_schema.yml
322
325
  - _data/download/cards.yml
323
326
  - _data/download/navbar.yml
@@ -337,6 +340,7 @@ files:
337
340
  - _includes/base/fontawesome.html.liquid
338
341
  - _includes/base/footer.html.liquid
339
342
  - _includes/base/head.html.liquid
343
+ - _includes/base/heading_anchor.html.liquid
340
344
  - _includes/base/highlight.html.liquid
341
345
  - _includes/base/image.html.liquid
342
346
  - _includes/base/link.html.liquid
@@ -351,8 +355,8 @@ files:
351
355
  - _includes/base/sponsors-cards.html.liquid
352
356
  - _includes/base/sponsors-carousel.html.liquid
353
357
  - _includes/base/title.html.liquid
358
+ - _includes/base/toc-generator.html.liquid
354
359
  - _includes/base/toc.html.liquid
355
- - _includes/base/toc_generator.html.liquid
356
360
  - _includes/download/cards-body-commands.html
357
361
  - _includes/download/cards-body-convert.html
358
362
  - _includes/download/cards-body-doc.html
@@ -530,6 +534,8 @@ files:
530
534
  - assets/img/base/page-with-event.svg
531
535
  - assets/img/base/page-with-fontawesome.png
532
536
  - assets/img/base/page-with-fontawesome.svg
537
+ - assets/img/base/page-with-footer.png
538
+ - assets/img/base/page-with-footer.svg
533
539
  - assets/img/base/page-with-heading.png
534
540
  - assets/img/base/page-with-heading.svg
535
541
  - assets/img/base/page-with-highlight.png
@@ -592,6 +598,7 @@ files:
592
598
  - assets/js/base/backtotop.js
593
599
  - assets/js/base/copyvalue.js
594
600
  - assets/js/base/datatable.js
601
+ - assets/js/base/heading-anchor.js
595
602
  - assets/js/base/highlight.js
596
603
  - assets/js/base/init-tooltips.js
597
604
  - assets/js/bootstrap.bundle.js
@@ -1,102 +0,0 @@
1
- title: Table of Contents Generator Component Configuration
2
- description: >-
3
- Schema for configuring the toc_generator component. Parameters are passed
4
- directly as include parameters. The `html` parameter is required.
5
- type: object
6
- properties:
7
- html:
8
- type: string
9
- description: >-
10
- The compiled HTML string of the page content to generate the table
11
- of contents from. Typically set to `content` (the Jekyll page
12
- content variable). This parameter is required.
13
- h_min:
14
- type: integer
15
- default: 1
16
- description: >-
17
- Minimum heading level to include in the table of contents. Headings
18
- below this level are ignored (e.g., set to `2` to exclude `<h1>`
19
- headings).
20
- h_max:
21
- type: integer
22
- default: 6
23
- description: >-
24
- Maximum heading level to include in the table of contents. Headings
25
- above this level are ignored (e.g., set to `3` to exclude `<h4>`
26
- through `<h6>` headings).
27
- sanitize:
28
- type: boolean
29
- default: false
30
- description: >-
31
- When `true`, strips HTML from heading text in the TOC links so that
32
- only plain text is rendered in each list item.
33
- class:
34
- type: string
35
- default: ""
36
- description: >-
37
- CSS class(es) applied to the root list element (`<ul>` or `<ol>`).
38
- Use to apply custom styling to the table of contents container.
39
- id:
40
- type: string
41
- default: ""
42
- description: >-
43
- ID attribute applied to the root list element. Use to target the
44
- table of contents with CSS or JavaScript.
45
- ordered:
46
- type: boolean
47
- default: false
48
- description: >-
49
- When `true`, renders the table of contents as an ordered list
50
- (`<ol>`). When `false` (default), an unordered list (`<ul>`) is
51
- rendered.
52
- flat_toc:
53
- type: boolean
54
- default: false
55
- description: >-
56
- When `true`, renders a flat single-level list regardless of heading
57
- nesting. When `false` (default), the list reflects the heading
58
- hierarchy.
59
- item_class:
60
- type: string
61
- default: ""
62
- description: >-
63
- CSS class(es) applied to each `<li>` list item. Supports the
64
- `%level%` placeholder, which is replaced with the current heading
65
- level number at render time.
66
- submenu_class:
67
- type: string
68
- default: ""
69
- description: >-
70
- CSS class(es) applied to each nested child list element. Supports
71
- the `%level%` placeholder, which is replaced with the submenu
72
- heading level number at render time.
73
- base_url:
74
- type: string
75
- default: ""
76
- description: >-
77
- Base URL prepended to each anchor link in the TOC. Use when the
78
- table of contents is rendered on a different page than the content
79
- it references.
80
- anchor_class:
81
- type: string
82
- default: ""
83
- description: >-
84
- CSS class(es) applied to each `<a>` anchor element inside the TOC
85
- list items.
86
- skip_no_ids:
87
- type: boolean
88
- default: false
89
- description: >-
90
- When `true`, headings that do not have an `id` attribute are skipped
91
- and not included in the table of contents.
92
- baseurl:
93
- type: string
94
- description: >-
95
- Deprecated. Use `base_url` instead. When provided, a deprecation
96
- warning comment is emitted in the HTML output.
97
- skipNoIDs:
98
- type: boolean
99
- description: >-
100
- Deprecated. Use `skip_no_ids` instead. When provided, a deprecation
101
- warning comment is emitted in the HTML output.
102
- additionalProperties: false