Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

RSE 0001

Brad Miller edited this page Mar 21, 2015 · 11 revisions

Status

  • Proposal: in progress
  • Prototype demonstrating activecode is here

Summary

Create a standard set of HTML tags and attributes that can be expanded into runestone widgets using a Javscript library.

Justification

Although the restructuredText directives have made it possible to write a great many books, they do restrict you to writing in one particular format. Lately some people have worked harder than they should have to to hack around that restriction in order to publish course materials outside of Sphinx/RestructuredText that still make use of the Runestone widgets. I am proposing to create a standardized set of HTML tags and attributes that can be converted into the Runestone widgets by Javascript when the page is loaded. This will make it possible to include Runestone Widgets directly into HTML pages using regular HTML editors, Wiki's and other publishing systems like restructuredText that can define their own user friendly macros that expand into the HTML tags.

This is also nice step in the direction of web components wherein we could define our own custom runestone tags.

Details

activecode

<pre lang="python" class="activecode" id="example1">
def main()
print("hello world")

main()
</pre>

animation

assessment

There are two variations on multiple choice questions mchoicemf and mchoicema

<ul class="multiplechoice">
The Question can go right here.
<li class="answer" id="123" correct>Answer one</li>
<li class="feedback" for="123">feedback for one</li>

<li class="answer" id="456" correct>Answer Two</li>
<li class="feedback" for="456">feedback for Two</li>
</ul>

fillintheblank

<p class="fillintheblank" >This is the text of the question <span answer="regex" width=int></span>more text and <span answer="regex" width=int></span> and maybe more</p>

blockly

codelens

<pre lang="python" class="codelens" id="example1">
def main()
print("hello world")

main()
</pre>

datafile

<pre lang="python" class="datafile" id="example1" edit="true">
def main()
print("hello world")

main()
</pre>

disqus

livecode

<pre lang="python" class="livecode" id="example1" edit="true">
def main()
print("hello world")

main()
</pre>

meta

parsons

<pre lang="python" class="parsons" id="example1">
def main()
---
print("hello world")
---
main()
</pre>

poll

<ul class="poll">

</ul>

reveal

<div class="reveal" id="example1" modal>
any html inside the div will be hidden until the button is clicked
</div>

tabbedStuff

<div class="tabbedStuff" id="myid">
<div class="tab"></div>
<div class="tab"></div>
<div class="tab"></div>
</div>

video

<video controls preload="none" poster="_static/thumb.png">
<source src="http://x.y.z/runestone.mov" type="video/mp4"></source>
<source src="http://x.y.z/runestone.webm" type="video/webm"></source>
No supported video types
</video>
Clone this wiki locally