hematite 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8764d5501c8a2e08a066ff8a3c595e6301544f302a3073505947faa226cd95d9
4
- data.tar.gz: fd4b02059497fd70358abbd0dc7e753e4631c4c8c95347cb1cd201dc56ea9383
3
+ metadata.gz: 05a0aa60a85dd027a9a75e119e54432b2ea0657775d872ae3b0474e9ebab9a5a
4
+ data.tar.gz: 2d93683789b2ecff19bcc54608484e64889488a151f3f668596d3df79a5fcf90
5
5
  SHA512:
6
- metadata.gz: 8e00a63422072524a31554c16c036b0be5a30f3e344cb955354b452506cc735a8eaf48e3ffb77a0c553209bd74596603c44322bf1ec231f5eacea3ad6d9a2b15
7
- data.tar.gz: ec4c74f00d80c83f563727b0415a88408285bf849b8792e454335b582ffb4905a9b06a1708f2ede5d39935b6a87531a6ba2088ccced0ac4c05d66b348ad94368
6
+ metadata.gz: 51770f1f5812dae37c4ff1eaf87c36f799cbb5ed73dbb45bb16cb3517dc34bf3d305c6d2a54fe4baeb2f6e4c623e6e271b7db9b2cdb60b078c326a88b97ce11b
7
+ data.tar.gz: ab0ccb98a0ab44a07d6e1d86c32ef42ab68f3bf0ec1fb626ca53a913c4d4c00fd0602c9373dbfac64af0b7b98b684dd4be523dd6d91fc51825422b8571bd3aeb
@@ -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 %}
@@ -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
- presentationDoc.close();
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) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hematite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Heino