From 3474a5ff1e54a0f9c0a26230814729138f65768a Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 2 May 2017 11:41:18 +0100 Subject: [PATCH] Add all in one lesson build with Javascript --- _includes/episode_navbar.html | 1 - _includes/episode_title.html | 33 ----------------------------- _includes/navbar.html | 2 ++ _layouts/break.html | 3 +++ _layouts/episode.html | 3 +++ bin/lesson_initialize.py | 40 +++++++++++++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 34 deletions(-) diff --git a/_includes/episode_navbar.html b/_includes/episode_navbar.html index 1f6e033..b9f85f6 100644 --- a/_includes/episode_navbar.html +++ b/_includes/episode_navbar.html @@ -14,7 +14,6 @@
{% if include.episode_navbar_title %}

{{ site.title }}

-

{{ page.title }}

{% endif %}
diff --git a/_includes/episode_title.html b/_includes/episode_title.html index 5b9c821..d0abc65 100644 --- a/_includes/episode_title.html +++ b/_includes/episode_title.html @@ -1,42 +1,9 @@ -{% comment %} - Find previous and next episodes (if any). -{% endcomment %} -{% for episode in site.episodes %} - {% if episode.url == page.url %} - {% unless forloop.first %} - {% assign prev_episode = prev %} - {% endunless %} - {% unless forloop.last %} - {% assign next_episode = site.episodes[forloop.index] %} - {% endunless %} - {% endif %} - {% assign prev = episode %} -{% endfor %} - -{% comment %} - Display title and prev/next links. -{% endcomment %}
-

- {% if prev_episode %} - - {% else %} - - {% endif %} -

-

{{ site.title }}

{{ page.title }}

-

- {% if next_episode %} - - {% else %} - - {% endif %} -

diff --git a/_includes/navbar.html b/_includes/navbar.html index 00fd328..7782c9d 100644 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -45,6 +45,8 @@ {% for episode in site.episodes %}
  • {{ episode.title }}
  • {% endfor %} + +
  • All in one page (Beta)
  • {% endif %} diff --git a/_layouts/break.html b/_layouts/break.html index 6e2a6a0..ac58232 100644 --- a/_layouts/break.html +++ b/_layouts/break.html @@ -2,6 +2,9 @@ layout: base --- {% include episode_navbar.html episode_navbar_title=true %} +
    +{% include episode_title.html %} {% include episode_break.html %} {{content}} +
    {% include episode_navbar.html episode_navbar_title=false %} diff --git a/_layouts/episode.html b/_layouts/episode.html index d774a68..0b276e7 100644 --- a/_layouts/episode.html +++ b/_layouts/episode.html @@ -2,7 +2,10 @@ layout: base --- {% include episode_navbar.html episode_navbar_title=true %} +
    +{% include episode_title.html %} {% include episode_overview.html %} {{content}} {% include episode_keypoints.html %} +
    {% include episode_navbar.html episode_navbar_title=false %} diff --git a/bin/lesson_initialize.py b/bin/lesson_initialize.py index 540bb08..513597a 100755 --- a/bin/lesson_initialize.py +++ b/bin/lesson_initialize.py @@ -278,6 +278,45 @@ permalink: /setup/ FIXME ''' +ROOT_SETUP_MD = '''\ +--- +layout: page +permalink: /aio/ +--- + +{% comment %} +Create anchor for each one of the episodes. +{% endcomment %} +{% for episode in site.episodes %} +
    +{% endfor %} +''' + EPISODES_INTRODUCTION_MD = '''\ --- title: "Introduction" @@ -340,6 +379,7 @@ BOILERPLATE = ( ('index.md', ROOT_INDEX_MD), ('reference.md', ROOT_REFERENCE_MD), ('setup.md', ROOT_SETUP_MD), + ('aio.md', ROOT_AIO_MD), ('_episodes/01-introduction.md', EPISODES_INTRODUCTION_MD), ('_extras/about.md', EXTRAS_ABOUT_MD), ('_extras/discuss.md', EXTRAS_DISCUSS_MD), -- 2.30.2