-
-
Notifications
You must be signed in to change notification settings - Fork 502
RSE 0001
- Proposal: in progress
- Prototype demonstrating activecode is here
Create a standard set of HTML tags and attributes that can be expanded into runestone widgets using a Javscript library.
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.
<pre lang="python" class="activecode" id="example1">
def main()
print("hello world")
main()
</pre>
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>
<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>
<pre lang="python" class="codelens" id="example1">
def main()
print("hello world")
main()
</pre>
<pre lang="python" class="datafile" id="example1" edit="true">
def main()
print("hello world")
main()
</pre>
<pre lang="cpp" class="livecode" id="example1" edit="true">
#include <stdio.h>
int main() {
printf("hello world\n");
}
</pre>
<pre class="parsons" id="example1">
def main()
---
print("hello world")
---
main()
</pre>
<ul class="poll">
<li> choice one </li>
<li> choice two </li>
<li> choice N </li>
</ul>
<div class="reveal" id="example1" modal>
any html inside the div will be hidden until the button is clicked
</div>
<div class="tabbedStuff" id="myid">
<div class="tab"></div>
<div class="tab"></div>
<div class="tab"></div>
</div>
<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>