hematite 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/img/loading_icon.svg +70 -0
- data/_layouts/remark_slideshow.html +18 -7
- data/_sass/_layout.scss +3 -0
- data/assets/html/remark_presentation_frame.html +8 -1
- data/assets/js/layout/remark_slideshow.mjs +29 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bf0eaea458e2c4fba03dbcc759aaa04eb811832e1850b210d5e5a378fab2526
|
4
|
+
data.tar.gz: 80dcbb081d5342365d4f119ffcb6f1dfd2be5b6533e23b0c23a18bde93709b54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23b88d8d1249320f6b4712e19d9a00f0a2bc0de0ef1e191aab371e56e019f38da43b8f26726e0e6d22a9a271bd647dc175bae4d58997222a04a4939700642908
|
7
|
+
data.tar.gz: 916e067da5e530e001003b82f83d3a91241ba268823112662ff87102c16e5800c70b2d909d8e150c9a9c08017d9f6f4d7c5c76ac980f2faf4a8e22caa77bb625
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<svg
|
2
|
+
viewBox="0 0 64.0 64.0"
|
3
|
+
version="1.1"
|
4
|
+
class="loading-icon-root"
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
7
|
+
<style>
|
8
|
+
.loading-icon-root {
|
9
|
+
cursor: pointer;
|
10
|
+
width: 64px;
|
11
|
+
height: 64px;
|
12
|
+
}
|
13
|
+
|
14
|
+
.loading-icon-root .rect {
|
15
|
+
fill: var(--primary-text-color);
|
16
|
+
|
17
|
+
transform: translate(0, 0);
|
18
|
+
transform-origin: 32px 32px;
|
19
|
+
animation: loading-icon-anim 1.5s ease infinite;
|
20
|
+
}
|
21
|
+
|
22
|
+
.loading-icon-root .rect2 {
|
23
|
+
animation-delay: 0.25s;
|
24
|
+
}
|
25
|
+
|
26
|
+
.loading-icon-root .rect3 {
|
27
|
+
animation-delay: 0.5s;
|
28
|
+
}
|
29
|
+
|
30
|
+
.loading-icon-root .rect4 {
|
31
|
+
animation-delay: 0.65s;
|
32
|
+
}
|
33
|
+
|
34
|
+
@keyframes loading-icon-anim {
|
35
|
+
0% { transform: rotate(0); }
|
36
|
+
100% { transform: rotate(-360deg) scale(1, 1); }
|
37
|
+
}
|
38
|
+
</style>
|
39
|
+
<g
|
40
|
+
id="layer1">
|
41
|
+
<rect
|
42
|
+
width="9"
|
43
|
+
height="9"
|
44
|
+
x="10"
|
45
|
+
y="10"
|
46
|
+
ry="4.5"
|
47
|
+
class="rect" />
|
48
|
+
<rect
|
49
|
+
width="9"
|
50
|
+
height="9"
|
51
|
+
x="10"
|
52
|
+
y="10"
|
53
|
+
ry="4.5"
|
54
|
+
class="rect rect2" />
|
55
|
+
<rect
|
56
|
+
width="9"
|
57
|
+
height="9"
|
58
|
+
x="10"
|
59
|
+
y="10"
|
60
|
+
ry="4.5"
|
61
|
+
class="rect rect3" />
|
62
|
+
<rect
|
63
|
+
width="9"
|
64
|
+
height="9"
|
65
|
+
x="10"
|
66
|
+
y="10"
|
67
|
+
ry="4.5"
|
68
|
+
class="rect rect4" />
|
69
|
+
</g>
|
70
|
+
</svg>
|
@@ -14,6 +14,12 @@ layout: default
|
|
14
14
|
|
15
15
|
{% assign frame_resource_url = 'assets/html/remark_presentation_frame.html' | relative_url %}
|
16
16
|
|
17
|
+
<div class='loading-icon-container'>
|
18
|
+
<center>
|
19
|
+
{% include img/loading_icon.svg %}
|
20
|
+
</center>
|
21
|
+
</div>
|
22
|
+
|
17
23
|
<main class="slideshow-mode">
|
18
24
|
<iframe
|
19
25
|
id="presentation_frame"
|
@@ -113,13 +119,18 @@ layout: default
|
|
113
119
|
`);
|
114
120
|
|
115
121
|
presentationWin.initPresentation = (async () => {
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
presentationWin.mermaid
|
122
|
-
|
122
|
+
try {
|
123
|
+
presentationDoc.title = presentationFrame.title;
|
124
|
+
await slideshow.start(presentationFrame.contentWindow, config);
|
125
|
+
|
126
|
+
// Ensure that mermaid has already been run!
|
127
|
+
if (presentationWin.mermaid) {
|
128
|
+
presentationWin.mermaid.init();
|
129
|
+
}
|
130
|
+
}
|
131
|
+
finally {
|
132
|
+
// Hide the loading icon
|
133
|
+
document.querySelector(".loading-icon-container")?.remove();
|
123
134
|
}
|
124
135
|
});
|
125
136
|
|
data/_sass/_layout.scss
CHANGED
@@ -20,7 +20,14 @@ h1, h2, h3 {
|
|
20
20
|
font-weight: normal;
|
21
21
|
}
|
22
22
|
|
23
|
-
.remark-code, .remark-inline-code
|
23
|
+
.remark-code, .remark-inline-code, body.mdSourceView {
|
24
|
+
font-family: 'Ubuntu Mono', monospace;
|
25
|
+
}
|
26
|
+
|
27
|
+
body.mdSourceView {
|
28
|
+
background: white;
|
29
|
+
color: black;
|
30
|
+
}
|
24
31
|
|
25
32
|
/* Show hidden slides to allow preprocessors (e.g. mermaid) to
|
26
33
|
properly account for container size.
|
@@ -77,6 +77,20 @@ function focusSlideFromHash(slideshow) {
|
|
77
77
|
}
|
78
78
|
}
|
79
79
|
|
80
|
+
/// Returns true iff the slide viewer should only display markdown.
|
81
|
+
function shouldOnlyDisplayMd() {
|
82
|
+
let pageArgs = UrlHelper.getPageArgs();
|
83
|
+
if (!pageArgs) {
|
84
|
+
return false;
|
85
|
+
}
|
86
|
+
|
87
|
+
if (pageArgs.md_only) {
|
88
|
+
return true;
|
89
|
+
}
|
90
|
+
|
91
|
+
return false;
|
92
|
+
}
|
93
|
+
|
80
94
|
async function main(targetWindow, config) {
|
81
95
|
// True if touch navigation is enabled.
|
82
96
|
let usingCustomTouchNav = false;
|
@@ -88,6 +102,13 @@ async function main(targetWindow, config) {
|
|
88
102
|
}));
|
89
103
|
}
|
90
104
|
|
105
|
+
// If the user has requested that only the page's markdown be shown,
|
106
|
+
if (shouldOnlyDisplayMd()) {
|
107
|
+
targetWindow.document.body.innerText = config?.source;
|
108
|
+
targetWindow.document.body.classList.add('mdSourceView');
|
109
|
+
return;
|
110
|
+
}
|
111
|
+
|
91
112
|
// Customize touchscreen navigation — the default remark
|
92
113
|
// navigation can break buttons, zooming.
|
93
114
|
if (config?.navigation?.touch === true
|
@@ -150,6 +171,7 @@ async function main(targetWindow, config) {
|
|
150
171
|
|
151
172
|
if (handlingGesture) {
|
152
173
|
evt.preventDefault();
|
174
|
+
elemContainer.setPointerCapture();
|
153
175
|
}
|
154
176
|
}
|
155
177
|
});
|
@@ -205,16 +227,20 @@ function addExtendedControls(targetWindow, slideshow) {
|
|
205
227
|
targetWindow.print();
|
206
228
|
};
|
207
229
|
|
230
|
+
let updateBtns = (slideIdx) => {
|
231
|
+
prevSlideBtn.disabled = (slideIdx == 0);
|
232
|
+
nextSlideBtn.disabled = (slideIdx + 1 >= slideshow.getSlideCount());
|
233
|
+
};
|
234
|
+
|
208
235
|
slideshow.on('showSlide', function(newSlide) {
|
209
236
|
if (!newSlide) {
|
210
237
|
return;
|
211
238
|
}
|
212
239
|
|
213
|
-
|
214
|
-
nextSlideBtn.disabled = (newSlide.getSlideIndex() + 1 >= slideshow.getSlideCount());
|
240
|
+
updateBtns(newSlide.getSlideIndex());
|
215
241
|
});
|
216
242
|
|
217
|
-
|
243
|
+
updateBtns(0);
|
218
244
|
|
219
245
|
nav.replaceChildren(prevSlideBtn, nextSlideBtn, spacer, printBtn);
|
220
246
|
targetWindow.document.body.appendChild(nav);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hematite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henry Heino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- _includes/extern_library_imports.html
|
38
38
|
- _includes/footer.html
|
39
39
|
- _includes/img/hamburger_menu.svg
|
40
|
+
- _includes/img/loading_icon.svg
|
40
41
|
- _includes/img/search_icon.svg
|
41
42
|
- _includes/katex_includes.html
|
42
43
|
- _includes/mermaid_includes.html
|