Skip to content

Commit 475ef53

Browse files
authored
Update index.html
While I point to a provisional blob URL in this commit, this will be updated to point to master once pulled. This library + script takes the markdown and converts it to HTML client side, live, straight from github so that maintenance overhead is easier in the future and less likely to fall out of date.
1 parent 2dae475 commit 475ef53

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

examples/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
clear: both;
5959
}
6060
</style>
61+
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
6162
</head>
6263
<body>
6364
<h1>A-Frame Super Hands Component</h1>
@@ -119,6 +120,17 @@ <h1>A-Frame Super Hands Component</h1>
119120
colliderEndEventProperty: clearedEls"</pre>
120121
<p>This scene also shows the fallback movement that occurs when physics
121122
is not available.</p>
123+
h2>Quick guide to adding making something grabbable with physics on your site</h2>
124+
<div id="dynamic-guide-here"></div>
125+
<script>
126+
(async function() {
127+
var converter = new showdown.Converter();
128+
var response = await fetch('https://gitcdn.xyz/repo/wmurphyrd/aframe-super-hands-component/880d2867b98cfaf293233c703c1160a8f7fe0be0/getting-started.md');
129+
var md = await response.text()
130+
var html = converter.makeHtml(md);
131+
document.querySelector('#dynamic-guide-here').innerHTML = html;
132+
})()
133+
</script>
122134
<!--
123135
<a id="sticky" class="example" href="sticky/">Sticky Grab via
124136
Custom Button Mapping<br />
@@ -141,4 +153,5 @@ <h1>A-Frame Super Hands Component</h1>
141153
<style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}
142154
</style>
143155
</body>
156+
144157
</html>

0 commit comments

Comments
 (0)