hematite 0.1.6 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/extern_library_imports.html +3 -0
- data/_layouts/example_custom_remark_slideshow.html +5 -1
- data/_layouts/remark_slideshow.html +15 -8
- data/_sass/_layout.scss +11 -0
- data/assets/html/{remark_presentation_frame.html.resource → remark_presentation_frame.html} +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b5c50c658bf984e5c096e0279fd2372b06c5d3fad9bb56eb3984c2218fe1aab
|
4
|
+
data.tar.gz: d945cf8f34d17d8b9dc6468e6f2c54d2a19708890d4d54f5411d60b3c3b190df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a28e7505ec67d3e900d7fe85cd8d7cacd6dde237aca06a7b0f27146959d14f06d2760d2f478676513fe076e18432ef33b7bda54038816eb88801b81bab754d8
|
7
|
+
data.tar.gz: 3506d2b3ee5aa0dd81343e8f9a2b08633348ff6692de35a42851498c91a33c12c207729c0971458aff51a1924fc0f83a792bbc3b75052405263a357f0d7717b2
|
@@ -36,9 +36,12 @@ Each [spec]=["key", { property: value, property2: value2, ... }]
|
|
36
36
|
{% assign url = target.url | relative_url %}
|
37
37
|
{% endif %}
|
38
38
|
|
39
|
+
{% if target.context and target.context != include.context %}
|
40
|
+
{% else %}
|
39
41
|
<{{ tag }} {{ options }}
|
40
42
|
{{ target.inline_options | default: "" }}
|
41
43
|
{{url_spec}}={{ url | jsonify }}
|
42
44
|
onload={{ target.onload | default: "" | jsonify }}></{{tag}}>
|
45
|
+
{% endif %}
|
43
46
|
{% endfor %}
|
44
47
|
|
@@ -4,6 +4,10 @@ additional_imports:
|
|
4
4
|
katex:
|
5
5
|
type: js
|
6
6
|
url: /assets/plugin/katex/katex.min.js
|
7
|
+
context: remark_frame
|
8
|
+
comment: >-
|
9
|
+
Setting context to remark_frame means to only run this
|
10
|
+
in the remark-specific iframe.
|
7
11
|
katex_auto_init_math:
|
8
12
|
type: js
|
9
13
|
url: /assets/plugin/katex/contrib/auto-render.min.js
|
@@ -23,7 +27,7 @@ remark_presentation_config:
|
|
23
27
|
|
24
28
|
mermaid: true
|
25
29
|
remark_presentation_config_html: >-
|
26
|
-
Testing...
|
30
|
+
Testing... This should be included at the top of the file.
|
27
31
|
---
|
28
32
|
|
29
33
|
{% comment %}
|
@@ -12,7 +12,7 @@ layout: default
|
|
12
12
|
Either use a non-md extension or wrap its content in a <div markdown=false>...</div>
|
13
13
|
-->
|
14
14
|
|
15
|
-
{% assign frame_resource_url = 'assets/html/remark_presentation_frame.html
|
15
|
+
{% assign frame_resource_url = 'assets/html/remark_presentation_frame.html' | relative_url %}
|
16
16
|
|
17
17
|
<main class="slideshow-mode">
|
18
18
|
<iframe
|
@@ -32,7 +32,7 @@ layout: default
|
|
32
32
|
<script defer type="module">
|
33
33
|
// Matches <div>...</div> or <div markdown=0>...</div>
|
34
34
|
// Jekyll can remove the 'markdown=0' while parsing.
|
35
|
-
const WRAPPING_DIV_EXP =
|
35
|
+
const WRAPPING_DIV_EXP = /^\s*[<]div.*[>]((?:.|[\n\r])*)[<]\/div[>]\s*$/;
|
36
36
|
|
37
37
|
import slideshow from "{{ 'assets/js/layout/remark_slideshow.mjs' | relative_url }}";
|
38
38
|
|
@@ -53,8 +53,6 @@ layout: default
|
|
53
53
|
}
|
54
54
|
}
|
55
55
|
|
56
|
-
console.log(config);
|
57
|
-
|
58
56
|
// Escape the content to prevent liquid from rendering it.
|
59
57
|
config.source = document.querySelector("#source").value;
|
60
58
|
|
@@ -69,7 +67,7 @@ layout: default
|
|
69
67
|
// Library imports intended for this page: Forward to the frame.
|
70
68
|
let libraryImports = unescape(`
|
71
69
|
{% capture library_imports %}
|
72
|
-
{% include extern_library_imports.html %}
|
70
|
+
{% include extern_library_imports.html context='remark_frame' %}
|
73
71
|
{% endcapture %}
|
74
72
|
{{ library_imports | url_encode | replace: "+", " " }}
|
75
73
|
`);
|
@@ -111,8 +109,8 @@ layout: default
|
|
111
109
|
}
|
112
110
|
</${"script"}>
|
113
111
|
`);
|
114
|
-
|
115
|
-
(async () => {
|
112
|
+
|
113
|
+
presentationWin.initPresentation = (async () => {
|
116
114
|
await slideshow.start(presentationFrame.contentWindow, config);
|
117
115
|
|
118
116
|
// Ensure that mermaid has already been run!
|
@@ -120,7 +118,14 @@ layout: default
|
|
120
118
|
presentationWin.mermaid.init();
|
121
119
|
console.log("Ran mermaid!");
|
122
120
|
}
|
123
|
-
})
|
121
|
+
});
|
122
|
+
|
123
|
+
presentationDoc.write(`
|
124
|
+
<${"script"}>
|
125
|
+
window.initPresentation();
|
126
|
+
</${"script"}>
|
127
|
+
`);
|
128
|
+
presentationDoc.close();
|
124
129
|
};
|
125
130
|
|
126
131
|
if (window.presentationFrameLoaded) {
|
@@ -129,4 +134,6 @@ layout: default
|
|
129
134
|
else {
|
130
135
|
presentationFrame.onload = initSlides;
|
131
136
|
}
|
137
|
+
|
138
|
+
document.documentElement.classList.add("slideshow-mode");
|
132
139
|
</script>
|
data/_sass/_layout.scss
CHANGED
@@ -169,6 +169,17 @@ main.slideshow-mode {
|
|
169
169
|
}
|
170
170
|
}
|
171
171
|
|
172
|
+
// Make the main content large enough that the sidebar doesn't
|
173
|
+
// auto-expand.
|
174
|
+
:root.slideshow-mode {
|
175
|
+
.main-container {
|
176
|
+
max-width: 100vw;
|
177
|
+
|
178
|
+
// Transition immediately!
|
179
|
+
transition: width 0s ease, max-width 0s ease;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
172
183
|
// On mobile devices,
|
173
184
|
@media screen and (max-width: $site-content-preferred-width) {
|
174
185
|
.main-container {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
+
permalink: /assets/html/remark_presentation_frame.html
|
3
|
+
noindex: true
|
2
4
|
---
|
3
|
-
<!-- Using a .html.resource file to prevent Jekyll from changing the extension -->
|
4
|
-
|
5
5
|
<!DOCTYPE html>
|
6
6
|
<html class="lightTheme" lang="{{ page.lang | default: site.lang | default: "en-US" }}">
|
7
7
|
<head>
|
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.9
|
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-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -64,7 +64,7 @@ files:
|
|
64
64
|
- _sass/_sizes.scss
|
65
65
|
- _sass/hematite.scss
|
66
66
|
- assets/html/all_tags.html
|
67
|
-
- assets/html/remark_presentation_frame.html
|
67
|
+
- assets/html/remark_presentation_frame.html
|
68
68
|
- assets/html/settings.html
|
69
69
|
- assets/img/favicon-alternate.svg
|
70
70
|
- assets/img/favicon.svg
|