convert Extras

parent a4e35a00
---
layout: page
title: About
---
{% include carpentries.html %}
TODO
{% include links.md %}
---
layout: page
title: Figures
---
......@@ -6,17 +7,17 @@ title: Figures
<script>
window.onload = function() {
var lesson_episodes = [
{% for episode in site.episodes %}
"{{ episode.url }}"{% unless forloop.last %},{% endunless %}
var lesson_modules = [
{% for module in site.modules %}
"{{ module.url }}"{% unless forloop.last %},{% endunless %}
{% endfor %}
];
var xmlHttp = []; /* Required since we are going to query every episode. */
for (i=0; i < lesson_episodes.length; i++) {
for (i=0; i < lesson_modules.length; i++) {
xmlHttp[i] = new XMLHttpRequest();
xmlHttp[i].episode = lesson_episodes[i]; /* To enable use this later. */
xmlHttp[i].module = lesson_modules[i]; /* To enable use this later. */
xmlHttp[i].onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
......@@ -24,7 +25,7 @@ title: Figures
var htmlDoc = parser.parseFromString(this.responseText,"text/html");
var htmlDocArticle = htmlDoc.getElementsByTagName("article")[0];
var article_here = document.getElementById(this.episode);
var article_here = document.getElementById(this.module);
var images = htmlDocArticle.getElementsByTagName("img");
if (images.length > 0) {
......@@ -52,17 +53,17 @@ title: Figures
}
}
}
episode_url = "{{ relative_root_path }}" + lesson_episodes[i];
xmlHttp[i].open("GET", episode_url);
module_url = "{{ relative_root_path }}" + lesson_modules[i];
xmlHttp[i].open("GET", module_url);
xmlHttp[i].send(null);
}
}
</script>
{% comment %}
Create anchor for each one of the episodes.
Create anchor for each one of the modules.
{% endcomment %}
{% for episode in site.episodes %}
<article id="{{ episode.url }}" class="figures"></article>
{% for module in site.modules %}
<article id="{{ module.url }}" class="figures"></article>
{% endfor %}
{% include links.md %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment