Skip to content

Commit

Permalink
update to include c-frame#188 update in HTML without duplication
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kylebakerio authored Jan 11, 2021
1 parent 2dae475 commit 2eb7131
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
clear: both;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
</head>
<body>
<h1>A-Frame Super Hands Component</h1>
Expand Down Expand Up @@ -119,6 +120,14 @@ <h1>A-Frame Super Hands Component</h1>
colliderEndEventProperty: clearedEls"</pre>
<p>This scene also shows the fallback movement that occurs when physics
is not available.</p>
h2>Quick guide to adding making something grabbable with physics on your site</h2>
<div id="dynamic-guide-here"></div>
<script>
var converter = new showdown.Converter();
var md = await (await fetch('https://gitcdn.xyz/repo/wmurphyrd/aframe-super-hands-component/880d2867b98cfaf293233c703c1160a8f7fe0be0/getting-started.md')).text()
var html = converter.makeHtml(md);
document.querySelector('#dynamic-guide-here').innerHTML = html;
</script>
<!--
<a id="sticky" class="example" href="sticky/">Sticky Grab via
Custom Button Mapping<br />
Expand All @@ -141,4 +150,5 @@ <h1>A-Frame Super Hands Component</h1>
<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}}
</style>
</body>

</html>

0 comments on commit 2eb7131

Please sign in to comment.