jekyll-slides 0.1.0

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 (53) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +25 -0
  3. data/LICENSE.txt +203 -0
  4. data/README.md +180 -0
  5. data/_includes/slides/controls.html +28 -0
  6. data/_includes/slides/overview.html +1 -0
  7. data/_includes/slides/progress.html +3 -0
  8. data/_layouts/presentation.html +36 -0
  9. data/assets/css/presentation.css +2 -0
  10. data/assets/fonts/OFL-atkinson-hyperlegible-mono.txt +93 -0
  11. data/assets/fonts/OFL-atkinson-hyperlegible-next.txt +93 -0
  12. data/assets/fonts/README.md +56 -0
  13. data/assets/fonts/atkinson-hyperlegible-mono-italic.woff2 +0 -0
  14. data/assets/fonts/atkinson-hyperlegible-mono.woff2 +0 -0
  15. data/assets/fonts/atkinson-hyperlegible-next-italic.woff2 +0 -0
  16. data/assets/fonts/atkinson-hyperlegible-next.woff2 +0 -0
  17. data/assets/js/presentation.js +370 -0
  18. data/doc/CHANGELOG.md +25 -0
  19. data/doc/Jekyll/Slides/Assets/SiteAssetFile.md +10 -0
  20. data/doc/Jekyll/Slides/Assets.md +12 -0
  21. data/doc/Jekyll/Slides/ComponentRenderer/RenderedDocument.md +15 -0
  22. data/doc/Jekyll/Slides/ComponentRenderer.md +33 -0
  23. data/doc/Jekyll/Slides/JekyllIntegration.md +28 -0
  24. data/doc/Jekyll/Slides/Layout.md +10 -0
  25. data/doc/Jekyll/Slides/Presentation.md +19 -0
  26. data/doc/Jekyll/Slides/PresentationParser.md +17 -0
  27. data/doc/Jekyll/Slides/RangeParser.md +21 -0
  28. data/doc/Jekyll/Slides/Renderer.md +10 -0
  29. data/doc/Jekyll/Slides/RougeRenderer.md +16 -0
  30. data/doc/Jekyll/Slides/SlideMetadata.md +43 -0
  31. data/doc/Jekyll/Slides/SlideRenderer.md +13 -0
  32. data/doc/Jekyll/Slides/Support.md +12 -0
  33. data/doc/Jekyll/Slides.md +50 -0
  34. data/doc/Jekyll.md +5 -0
  35. data/doc/README.md +180 -0
  36. data/doc/index.csv +71 -0
  37. data/lib/jekyll/slides/assets.rb +47 -0
  38. data/lib/jekyll/slides/component_renderer.rb +237 -0
  39. data/lib/jekyll/slides/jekyll_integration.rb +126 -0
  40. data/lib/jekyll/slides/layout.rb +20 -0
  41. data/lib/jekyll/slides/presentation.rb +22 -0
  42. data/lib/jekyll/slides/presentation_parser.rb +102 -0
  43. data/lib/jekyll/slides/range_parser.rb +52 -0
  44. data/lib/jekyll/slides/renderer.rb +21 -0
  45. data/lib/jekyll/slides/rouge_renderer.rb +58 -0
  46. data/lib/jekyll/slides/slide_metadata.rb +85 -0
  47. data/lib/jekyll/slides/slide_renderer.rb +93 -0
  48. data/lib/jekyll/slides/support.rb +25 -0
  49. data/lib/jekyll/slides/version.rb +7 -0
  50. data/lib/jekyll/slides.rb +39 -0
  51. data/lib/jekyll-slides.rb +3 -0
  52. data/llm.txt +50 -0
  53. metadata +175 -0
@@ -0,0 +1,93 @@
1
+ Copyright 2020-2024 The Atkinson Hyperlegible Mono Project Authors (https://github.com/googlefonts/atkinson-hyperlegible-next-mono)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,93 @@
1
+ Copyright 2020-2024 The Atkinson Hyperlegible Next Project Authors (https://github.com/googlefonts/atkinson-hyperlegible-next)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,56 @@
1
+ # Bundled Atkinson fonts
2
+
3
+ Unmodified upstream variable WOFF2 fonts, distributed under the SIL Open Font
4
+ License 1.1. The gem's Apache-2.0 license does not replace the font licenses.
5
+
6
+ Both families include the upstream character coverage (Latin and extended Latin),
7
+ upright and italic styles, and a variable weight axis from 200 to 800. These files
8
+ are self-hosted; presentation pages do not request fonts from an external service.
9
+
10
+ Retrieved: 2026-09-05. No conversion or subsetting was performed.
11
+
12
+ ## Atkinson Hyperlegible Next
13
+
14
+ Upstream: https://github.com/googlefonts/atkinson-hyperlegible-next
15
+
16
+ Pinned source revision: `7925f50f649b3813257faf2f4c0b381011f434f1`
17
+
18
+ Font version: 2.001 (verified in the matching upstream variable TTF name table).
19
+ The matching upright and italic TTFs each contain 392 glyphs and a 200–800 weight axis.
20
+
21
+ License: [OFL-atkinson-hyperlegible-next.txt](OFL-atkinson-hyperlegible-next.txt) (copied from `OFL.txt`).
22
+
23
+ ### atkinson-hyperlegible-next.woff2
24
+
25
+ - Source: https://raw.githubusercontent.com/googlefonts/atkinson-hyperlegible-next/7925f50f649b3813257faf2f4c0b381011f434f1/fonts/webfonts/AtkinsonHyperlegibleNext%5Bwght%5D.woff2
26
+ - Bytes: 48188
27
+ - SHA-256: `abde1ad5cf78b9ac575ef90d991f2e9101eb0b3b6668bde9a00e2e1e27d99afd`
28
+
29
+ ### atkinson-hyperlegible-next-italic.woff2
30
+
31
+ - Source: https://raw.githubusercontent.com/googlefonts/atkinson-hyperlegible-next/7925f50f649b3813257faf2f4c0b381011f434f1/fonts/webfonts/AtkinsonHyperlegibleNext-Italic%5Bwght%5D.woff2
32
+ - Bytes: 52692
33
+ - SHA-256: `34491c5a87f711d314637962f69267d28c7df3ed498082c990cdfbbc02ebf3f2`
34
+
35
+ ## Atkinson Hyperlegible Mono
36
+
37
+ Upstream: https://github.com/googlefonts/atkinson-hyperlegible-next-mono
38
+
39
+ Pinned source revision: `154d50362016cc3e873eb21d242cd0772384c8f9`
40
+
41
+ Font version: 2.001 (verified in the matching upstream variable TTF name table).
42
+ The matching upright and italic TTFs each contain 380 glyphs and a 200–800 weight axis.
43
+
44
+ License: [OFL-atkinson-hyperlegible-mono.txt](OFL-atkinson-hyperlegible-mono.txt) (copied from `OFL.txt`).
45
+
46
+ ### atkinson-hyperlegible-mono.woff2
47
+
48
+ - Source: https://raw.githubusercontent.com/googlefonts/atkinson-hyperlegible-next-mono/154d50362016cc3e873eb21d242cd0772384c8f9/fonts/webfonts/AtkinsonHyperlegibleMono%5Bwght%5D.woff2
49
+ - Bytes: 25600
50
+ - SHA-256: `4cf41c5cacdb2e98311929f3a482e95b2299ca34e6f389e8968a9075e355d58a`
51
+
52
+ ### atkinson-hyperlegible-mono-italic.woff2
53
+
54
+ - Source: https://raw.githubusercontent.com/googlefonts/atkinson-hyperlegible-next-mono/154d50362016cc3e873eb21d242cd0772384c8f9/fonts/webfonts/AtkinsonHyperlegibleMono-Italic%5Bwght%5D.woff2
55
+ - Bytes: 27552
56
+ - SHA-256: `6cc3d58e20a4126f837f96ad2ff750628cae6112b8b915794b5c82712b3c1550`
@@ -0,0 +1,370 @@
1
+ (function (global, factory) {
2
+ var runtime = factory();
3
+ if (typeof module === "object" && module.exports) {
4
+ module.exports = runtime;
5
+ } else {
6
+ global.PresentationRuntime = runtime;
7
+ if (global.document) {
8
+ var start = function () { runtime.init(global.document, global); };
9
+ if (global.document.readyState === "loading") global.document.addEventListener("DOMContentLoaded", start, { once: true });
10
+ else start();
11
+ }
12
+ }
13
+ }(typeof globalThis === "object" ? globalThis : this, function () {
14
+ "use strict";
15
+
16
+ var controllers = new WeakMap();
17
+
18
+ function clamp(value, minimum, maximum) { return Math.min(Math.max(value, minimum), maximum); }
19
+ function requestedSlideFromHash(hash) {
20
+ var match = /^#(\d+)$/.exec(String(hash || ""));
21
+ return match ? Number(match[1]) : null;
22
+ }
23
+ function slideFromHash(hash, total) {
24
+ var requested = requestedSlideFromHash(hash);
25
+ if (requested === null) requested = 1;
26
+ return clamp(Number.isFinite(requested) ? requested : 1, 1, Math.max(total, 1));
27
+ }
28
+ function hashForSlide(number) { return "#" + number; }
29
+ function asArray(collection) { return Array.prototype.slice.call(collection || []); }
30
+ function dataValue(element, name) {
31
+ if (!element) return "";
32
+ if (element.dataset && element.dataset[name] !== undefined) return element.dataset[name];
33
+ return element.getAttribute ? (element.getAttribute("data-" + name) || "") : "";
34
+ }
35
+ function enabled(element, name) { return dataValue(element, name).toLowerCase() === "true"; }
36
+ function addClass(element, name) { if (element && element.classList && name) element.classList.add(name); }
37
+ function removeClass(element, name) { if (element && element.classList && name) element.classList.remove(name); }
38
+ function setAttribute(element, name, value) { if (element && element.setAttribute) element.setAttribute(name, String(value)); }
39
+ function isEditableTarget(target) {
40
+ if (!target) return false;
41
+ var element = target;
42
+ var tag = String(element.tagName || element.nodeName || "").toLowerCase();
43
+ if (["input", "textarea", "select", "button", "a"].indexOf(tag) !== -1 || element.isContentEditable) return true;
44
+ while (element) {
45
+ if (element.getAttribute && element.getAttribute("contenteditable") !== null) return true;
46
+ element = element.parentNode;
47
+ }
48
+ return false;
49
+ }
50
+ function hasNonCollapsedSelection(document) {
51
+ if (!document || !document.getSelection) return false;
52
+ var selection = document.getSelection();
53
+ return Boolean(selection && !selection.isCollapsed);
54
+ }
55
+ function guarded(event, document) {
56
+ return Boolean(event && (event.ctrlKey || event.metaKey || event.altKey || event.shiftKey)) ||
57
+ isEditableTarget(event && event.target) || hasNonCollapsedSelection(document);
58
+ }
59
+ function keyName(event) { return event.key === "Spacebar" ? " " : event.key; }
60
+ function contains(ancestor, element) {
61
+ while (element) {
62
+ if (element === ancestor) return true;
63
+ element = element.parentNode;
64
+ }
65
+ return false;
66
+ }
67
+ function interactiveDescendant(target, boundary) {
68
+ var element = target;
69
+ while (element && element !== boundary) {
70
+ var tag = String(element.tagName || element.nodeName || "").toLowerCase();
71
+ if (["input", "textarea", "select", "button", "a"].indexOf(tag) !== -1 || element.isContentEditable ||
72
+ (element.getAttribute && element.getAttribute("contenteditable") !== null)) return true;
73
+ element = element.parentNode;
74
+ }
75
+ return false;
76
+ }
77
+ function hasModifier(event) {
78
+ return Boolean(event && (event.ctrlKey || event.metaKey || event.altKey || event.shiftKey));
79
+ }
80
+ function toolbarTarget(target, root) {
81
+ var element = target;
82
+ while (element && element !== root) {
83
+ if (element.getAttribute && element.getAttribute("data-presentation-chrome") !== null) return true;
84
+ if (element.getAttribute && ["data-slide-previous", "data-slide-next", "data-slide-overview", "data-slide-fullscreen"].some(function (name) {
85
+ return element.getAttribute(name) !== null;
86
+ })) return true;
87
+ element = element.parentNode;
88
+ }
89
+ return false;
90
+ }
91
+
92
+ function createPresentationController(document, window) {
93
+ document = document || (window && window.document);
94
+ window = window || (typeof globalThis === "object" ? globalThis : {});
95
+ if (!document || !document.querySelector) return null;
96
+ var root = document.querySelector("[data-presentation-root]");
97
+ if (!root) return null;
98
+ var existing = controllers.get(root);
99
+ if (existing) return existing;
100
+ var deck = root.querySelector("[data-slide-deck]") || document.querySelector("[data-slide-deck]");
101
+ var slides = asArray(deck && deck.querySelectorAll ? deck.querySelectorAll("[data-slide]") : []);
102
+ var slideSemantics = slides.map(function (slide) {
103
+ return {
104
+ role: slide.getAttribute && slide.getAttribute("role"),
105
+ label: slide.getAttribute && slide.getAttribute("aria-label"),
106
+ tabindex: slide.getAttribute && slide.getAttribute("tabindex")
107
+ };
108
+ });
109
+ var total = slides.length || Number(dataValue(root, "slide-count")) || 1;
110
+ var counter = root.querySelector("[data-slide-counter]");
111
+ var progress = root.querySelector("[data-slide-progress]");
112
+ var previousButton = root.querySelector("[data-slide-previous]");
113
+ var nextButton = root.querySelector("[data-slide-next]");
114
+ var overviewButton = root.querySelector("[data-slide-overview]");
115
+ var fullscreenButton = root.querySelector("[data-slide-fullscreen]");
116
+ var overviewHint = root.querySelector("[data-overview-hint]");
117
+ var overviewEnabled = enabled(root, "overview");
118
+ var fullscreenEnabled = enabled(root, "fullscreen");
119
+ var state = { current: 1, overview: false, printing: false };
120
+ var listeners = [];
121
+
122
+ function on(element, eventName, handler, options) {
123
+ if (!element || !element.addEventListener) return;
124
+ element.addEventListener(eventName, handler, options);
125
+ listeners.push(function () { element.removeEventListener(eventName, handler, options); });
126
+ }
127
+ function locationHash() { return window.location && typeof window.location.hash === "string" ? window.location.hash : ""; }
128
+ function fragmentTarget(hash) {
129
+ if (!hash || hash.charAt(0) !== "#" || !document.getElementById) return null;
130
+ try {
131
+ return document.getElementById(decodeURIComponent(hash.slice(1)));
132
+ } catch (error) {
133
+ return null;
134
+ }
135
+ }
136
+ function containingSlideNumber(element) {
137
+ while (element && element !== root) {
138
+ var index = slides.indexOf(element);
139
+ if (index !== -1) return index + 1;
140
+ element = element.parentNode;
141
+ }
142
+ return null;
143
+ }
144
+ function updateHistory(method, number) {
145
+ var history = window.history;
146
+ if (history && typeof history[method] === "function") history[method]({ slide: number }, "", hashForSlide(number));
147
+ }
148
+ function updateOverviewButton() {
149
+ if (!overviewButton) return;
150
+ setAttribute(overviewButton, "aria-pressed", state.overview ? "true" : "false");
151
+ setAttribute(overviewButton, "aria-label", state.overview ? "Close slide overview" : "Show slide overview");
152
+ }
153
+ function updateOverviewHint() {
154
+ if (!overviewHint) return;
155
+ overviewHint.hidden = !state.overview;
156
+ if (state.overview) {
157
+ if (overviewHint.removeAttribute) overviewHint.removeAttribute("hidden");
158
+ } else setAttribute(overviewHint, "hidden", "");
159
+ }
160
+ function updateOverviewDescription() {
161
+ var descriptionId = overviewHint && (overviewHint.id || (overviewHint.getAttribute && overviewHint.getAttribute("id")));
162
+ if (!descriptionId) return;
163
+ if (state.overview) {
164
+ setAttribute(deck, "aria-describedby", descriptionId);
165
+ setAttribute(overviewButton, "aria-describedby", descriptionId);
166
+ } else {
167
+ if (deck && deck.removeAttribute) deck.removeAttribute("aria-describedby");
168
+ if (overviewButton && overviewButton.removeAttribute) overviewButton.removeAttribute("aria-describedby");
169
+ }
170
+ }
171
+ function updateFullscreenButton() {
172
+ if (!fullscreenButton) return;
173
+ var active = Boolean(document.fullscreenElement);
174
+ setAttribute(fullscreenButton, "aria-pressed", active ? "true" : "false");
175
+ setAttribute(fullscreenButton, "aria-label", active ? "Exit fullscreen" : "Enter fullscreen");
176
+ if (active) { addClass(root, "is-fullscreen"); setAttribute(root, "data-fullscreen-active", "true"); }
177
+ else { removeClass(root, "is-fullscreen"); setAttribute(root, "data-fullscreen-active", "false"); }
178
+ }
179
+ function updateSlideVisibility() {
180
+ slides.forEach(function (slide, index) {
181
+ var active = index + 1 === state.current;
182
+ if (active) addClass(slide, "is-active"); else removeClass(slide, "is-active");
183
+ if (state.printing) addClass(slide, "is-printing"); else removeClass(slide, "is-printing");
184
+ var visible = state.printing || state.overview || active;
185
+ slide.hidden = false;
186
+ setAttribute(slide, "aria-hidden", visible ? "false" : "true");
187
+ if (active) setAttribute(slide, "aria-current", "true"); else if (slide.removeAttribute) slide.removeAttribute("aria-current");
188
+ if (state.overview) {
189
+ setAttribute(slide, "role", "button");
190
+ setAttribute(slide, "aria-label", "Open slide " + (index + 1));
191
+ setAttribute(slide, "tabindex", "0");
192
+ } else {
193
+ var semantics = slideSemantics[index];
194
+ if (semantics.role === null) slide.removeAttribute("role"); else setAttribute(slide, "role", semantics.role);
195
+ if (semantics.label === null) slide.removeAttribute("aria-label"); else setAttribute(slide, "aria-label", semantics.label);
196
+ if (semantics.tabindex === null) slide.removeAttribute("tabindex"); else setAttribute(slide, "tabindex", semantics.tabindex);
197
+ }
198
+ if (slide.removeAttribute) slide.removeAttribute("hidden");
199
+ });
200
+ }
201
+ function setPrinting(value) {
202
+ state.printing = Boolean(value);
203
+ if (state.printing) {
204
+ addClass(root, "is-printing");
205
+ setAttribute(root, "data-printing", "true");
206
+ } else {
207
+ removeClass(root, "is-printing");
208
+ if (root.removeAttribute) root.removeAttribute("data-printing");
209
+ }
210
+ render();
211
+ }
212
+ function updateIndicators() {
213
+ if (previousButton) {
214
+ previousButton.disabled = state.current === 1;
215
+ setAttribute(previousButton, "aria-disabled", previousButton.disabled ? "true" : "false");
216
+ }
217
+ if (nextButton) {
218
+ nextButton.disabled = state.current === total;
219
+ setAttribute(nextButton, "aria-disabled", nextButton.disabled ? "true" : "false");
220
+ }
221
+ if (counter) counter.textContent = state.current + " / " + total;
222
+ if (!progress) return;
223
+ progress.max = total; progress.value = state.current;
224
+ setAttribute(progress, "max", total); setAttribute(progress, "value", state.current);
225
+ if (progress.style && progress.style.setProperty) {
226
+ progress.style.setProperty("--progress", String(state.current / total));
227
+ progress.style.setProperty("--progress-percent", (state.current / total * 100) + "%");
228
+ }
229
+ }
230
+ function render() { updateSlideVisibility(); updateIndicators(); updateOverviewButton(); updateOverviewHint(); updateOverviewDescription(); updateFullscreenButton(); }
231
+ function goTo(number, options) {
232
+ var previous = state.current;
233
+ var validNumber = typeof number === "number" && Number.isFinite(number) && Number.isInteger(number);
234
+ state.current = validNumber ? clamp(number, 1, total) : previous;
235
+ render();
236
+ if ((!options || options.history !== false) && state.current !== previous) updateHistory("pushState", state.current);
237
+ return state.current;
238
+ }
239
+ function syncFromLocation(replace) {
240
+ var hash = locationHash();
241
+ var requested = requestedSlideFromHash(hash);
242
+ if (requested === null) {
243
+ var target = fragmentTarget(hash);
244
+ if (target) {
245
+ var containingSlide = containingSlideNumber(target);
246
+ if (containingSlide !== null) state.current = containingSlide;
247
+ render();
248
+ return state.current;
249
+ }
250
+ if (replace) {
251
+ state.current = slideFromHash(hash, total);
252
+ render();
253
+ updateHistory("replaceState", state.current);
254
+ }
255
+ return state.current;
256
+ }
257
+ state.current = clamp(requested, 1, total);
258
+ render();
259
+ if (replace) updateHistory("replaceState", state.current);
260
+ return state.current;
261
+ }
262
+ function setOverview(value) {
263
+ if (!overviewEnabled) return false;
264
+ var wasOverview = state.overview;
265
+ var focused = document.activeElement;
266
+ state.overview = Boolean(value);
267
+ if (state.overview) { addClass(root, "is-overview"); setAttribute(root, "data-overview-active", "true"); }
268
+ else { removeClass(root, "is-overview"); if (root.removeAttribute) root.removeAttribute("data-overview-active"); }
269
+ render();
270
+ if (wasOverview && !state.overview && !state.printing && focused && slides.some(function (slide, index) {
271
+ return index + 1 !== state.current && slide.getAttribute("aria-hidden") === "true" && contains(slide, focused);
272
+ })) {
273
+ var focusTarget = overviewButton || slides[state.current - 1];
274
+ if (focusTarget && typeof focusTarget.focus === "function") focusTarget.focus();
275
+ }
276
+ return state.overview;
277
+ }
278
+ function toggleOverview() { return setOverview(!state.overview); }
279
+ function toggleFullscreen() {
280
+ if (!fullscreenEnabled) return false;
281
+ try {
282
+ if (document.fullscreenElement) {
283
+ if (typeof document.exitFullscreen === "function") {
284
+ var exitResult = document.exitFullscreen();
285
+ if (exitResult && typeof exitResult.catch === "function") exitResult.catch(function () {});
286
+ }
287
+ } else {
288
+ var target = document.documentElement || root;
289
+ if (!target || typeof target.requestFullscreen !== "function") return false;
290
+ var requestResult = target.requestFullscreen();
291
+ if (requestResult && typeof requestResult.catch === "function") requestResult.catch(function () {});
292
+ }
293
+ } catch (error) { /* Fullscreen permissions and support are browser-dependent. */ }
294
+ return true;
295
+ }
296
+ function handleKeydown(event) {
297
+ if (event.defaultPrevented) return;
298
+ var key = keyName(event);
299
+ var toolbar = toolbarTarget(event.target, root);
300
+ var toolbarEscape = toolbar && key === "Escape" && state.overview;
301
+ var toolbarShortcut = toolbarEscape || (toolbar && ["ArrowRight", "ArrowLeft", "PageDown", "PageUp", "Home", "End", "o", "O", "f", "F"].indexOf(key) !== -1);
302
+ if ((!toolbarShortcut && guarded(event, document)) || (toolbarShortcut && (hasModifier(event) || hasNonCollapsedSelection(document)))) return;
303
+ if (key === "Escape" && state.overview) { setOverview(false); if (event.preventDefault) event.preventDefault(); return; }
304
+ if ((key === "o" || key === "O") && overviewEnabled) { toggleOverview(); return; }
305
+ if ((key === "f" || key === "F") && fullscreenEnabled) { toggleFullscreen(); return; }
306
+ var destination;
307
+ if (key === "ArrowRight" || key === " " || key === "PageDown") destination = state.current + 1;
308
+ else if (key === "ArrowLeft" || key === "PageUp") destination = state.current - 1;
309
+ else if (key === "Home") destination = 1;
310
+ else if (key === "End") destination = total;
311
+ if (destination === undefined) return;
312
+ goTo(destination);
313
+ if (event.preventDefault) event.preventDefault();
314
+ }
315
+ function selectOverviewSlide(number) { goTo(number); setOverview(false); }
316
+ function bindSlide(slide, index) {
317
+ on(slide, "click", function (event) {
318
+ if (state.overview && !interactiveDescendant(event.target, slide)) selectOverviewSlide(index + 1);
319
+ });
320
+ on(slide, "keydown", function (event) {
321
+ if (!state.overview || event.target !== slide || (keyName(event) !== "Enter" && keyName(event) !== " ")) return;
322
+ selectOverviewSlide(index + 1); if (event.preventDefault) event.preventDefault();
323
+ if (event.stopPropagation) event.stopPropagation();
324
+ });
325
+ }
326
+
327
+ addClass(root, "js");
328
+ var motionQuery = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)");
329
+ if (motionQuery && motionQuery.matches) { addClass(root, "is-reduced-motion"); setAttribute(root, "data-reduced-motion", "true"); }
330
+ else setAttribute(root, "data-reduced-motion", "false");
331
+ slides.forEach(bindSlide);
332
+ on(document, "keydown", handleKeydown);
333
+ on(window, "popstate", function () { syncFromLocation(false); });
334
+ on(window, "hashchange", function () { syncFromLocation(false); });
335
+ on(window, "beforeprint", function () { setPrinting(true); });
336
+ on(window, "afterprint", function () { setPrinting(false); });
337
+ on(document, "fullscreenchange", updateFullscreenButton);
338
+ on(previousButton, "click", function () { goTo(state.current - 1); });
339
+ on(nextButton, "click", function () { goTo(state.current + 1); });
340
+ on(overviewButton, "click", toggleOverview);
341
+ on(fullscreenButton, "click", toggleFullscreen);
342
+ syncFromLocation(true);
343
+ var controller = {
344
+ goTo: goTo,
345
+ next: function () { return goTo(state.current + 1); },
346
+ previous: function () { return goTo(state.current - 1); },
347
+ toggleOverview: toggleOverview,
348
+ toggleFullscreen: toggleFullscreen,
349
+ get current() { return state.current; },
350
+ get overview() { return state.overview; },
351
+ destroy: function () {
352
+ state.overview = false;
353
+ state.printing = false;
354
+ removeClass(root, "is-overview");
355
+ removeClass(root, "is-printing");
356
+ if (root.removeAttribute) root.removeAttribute("data-overview-active");
357
+ if (root.removeAttribute) root.removeAttribute("data-printing");
358
+ render();
359
+ listeners.splice(0).forEach(function (remove) { remove(); });
360
+ if (controllers.get(root) === controller) controllers.delete(root);
361
+ }
362
+ };
363
+ controllers.set(root, controller);
364
+ return controller;
365
+ }
366
+
367
+ return { clamp: clamp, slideFromHash: slideFromHash, hashForSlide: hashForSlide,
368
+ createPresentationController: createPresentationController,
369
+ init: function (document, window) { return createPresentationController(document, window); } };
370
+ }));
data/doc/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to Jekyll Slides are documented here.
4
+
5
+ ## Unreleased
6
+
7
+ - Add `bin/prepare_release` to verify the gem, regenerate Markdown API documentation and `llm.txt`, and build a versioned package with a SHA-256 checksum.
8
+ - Ship generated documentation while keeping YARD and release tools development-only.
9
+
10
+ ## 0.1.0 — 2026-09-05
11
+
12
+ Initial release.
13
+
14
+ - Turn Markdown pages and collection documents into 16:9 presentations with eight layouts and four themes, including minimal-light.
15
+ - Provide presentation layouts, includes, and assets without replacing the site's Jekyll theme or overriding site-local files.
16
+ - Render Liquid before parsing each slide as one Markdown document, preserving reference links, footnotes, and generated IDs.
17
+ - Render syntax-highlighted editor and terminal windows with captions, line numbers, highlighted lines, and focused lines.
18
+ - Bundle Atkinson Hyperlegible Next and Mono, including real italics, for offline text and code rendering.
19
+ - Keep surrounding code fully visible and maintain syntax contrast across all themes and selected-line backgrounds.
20
+ - Support keyboard navigation, URL hashes, overview thumbnails, progress, slide numbers, fullscreen, and reduced motion.
21
+ - Scale slides and overview thumbnails with CSS, provide document flow without JavaScript, and paginate printed decks.
22
+ - Honor global and scoped front matter defaults on pages and collection documents.
23
+ - Make long code blocks scrollable and warn for blocks over 20 lines; printed examples should be split across slides.
24
+ - Include technical and light-theme example decks in the source repository.
25
+ - Support Ruby 3.1+ and Jekyll 4.3–4.x without Node or Tailwind at runtime; Ruby 3.4+ requires Jekyll 4.4+.
@@ -0,0 +1,10 @@
1
+ # Class Jekyll::Slides::Assets::SiteAssetFile <a id="class-Jekyll-Slides-Assets-SiteAssetFile"></a>
2
+
3
+ | | |
4
+ | --- | --- |
5
+ | **Inherits** | Jekyll::StaticFile |
6
+ | **Defined in** | lib/jekyll/slides/assets.rb |
7
+
8
+ ## Public Instance Methods
9
+ ### `write(dest)` <a id="method-i-write"></a> <a id="write-instance_method"></a>
10
+ Not documented.