Merge pull request #119 from itcarroll/gh-pages
authorRaniere Silva <raniere@rgaiacs.com>
Mon, 9 Jan 2017 23:47:24 +0000 (23:47 +0000)
committerGitHub <noreply@github.com>
Mon, 9 Jan 2017 23:47:24 +0000 (23:47 +0000)
Knit episodes only when any one RMarkdown source changes

_includes/carpentries.html
_includes/episode_keypoints.html
_includes/episode_navbar.html
_includes/javascript.html
_includes/lesson_footer.html
_includes/main_title.html
_includes/navbar.html
_includes/workshop_ad.html
_includes/workshop_footer.html
assets/css/lesson.scss

index 69e2e1cc59b859a60245e02ffb3e9f3eeafd3f4e..c42bfcf2feef253fd63a7dab23ed521458fa8510 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  General description of Software and Data Carpentry.
+{% endcomment %}
 <div class="row">
   <div class="col-md-2" align="center">
     <a href="{{ site.swc_site }}"><img src="{{ page.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /></a>
@@ -23,5 +26,3 @@
     building on learners' existing knowledge to enable them to quickly apply skills learned to their own research.
   </div>
 </div>
-
-
index 85378a568bca3cc554ee32a2e324e17f9382461b..2baa53ef0c4f4be23a0d291e60c44341f816be81 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Display key points for an episode.
+{% endcomment %}
 <blockquote class="keypoints">
   <h2>Key Points</h2>
   <ul>
index a789d3d9908eca4b6a61a1588259b26006c35982..1f6e033dc7825788fc159e3c5f085da20f61bef3 100644 (file)
@@ -1,26 +1,11 @@
 {% 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.
+  Navigation bar for an episode.
 {% endcomment %}
 <div class="row">
   <div class="col-md-1">
     <h3>
-      {% if prev_episode %}
-      <a href="{{ page.root }}{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><span class="sr-only">previous episode</span></a>
+      {% if page.previous.url %}
+      <a href="{{ page.root }}{{ page.previous.url }}"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><span class="sr-only">previous episode</span></a>
       {% else %}
       <a href="{{ page.root }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
       {% endif %}
@@ -34,8 +19,8 @@
   </div>
   <div class="col-md-1">
     <h3>
-      {% if next_episode %}
-      <a href="{{ page.root }}{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
+      {% if page.next.url %}
+      <a href="{{ page.root }}{{ page.next.url }}"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
       {% else %}
       <a href="{{ page.root }}/"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
       {% endif %}
index 010ae4af13d0e3b8c1c10e36d5a91527e3e51bf0..a2066c202809b465acc364e63211461f435bbc8f 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Javascript used in lesson and workshop pages.
+{% endcomment %}
 <script src="{{ page.root }}/assets/js/jquery.min.js"></script>
 <script src="{{ page.root }}/assets/js/bootstrap.min.js"></script>
 <script src="{{ page.root }}/assets/js/lesson.js"></script>
index a37ba3eceb1bcf6b3a31fa05210219cd8bdb0366..be46c2d46d59e182b9c99d8aedfa2a4e989ccb3d 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Footer for lesson pages.
+{% endcomment %}
 <footer>
   <div class="row">
     <div class="col-md-6" align="left">
index 60b8b06937c72e5125f392ba34c7327db92de906..8e22ced110926139022b54a201d66a46c34d491d 100644 (file)
@@ -1 +1,4 @@
+{% comment %}
+  Main title for lesson pages.
+{% endcomment %}
 <h1 class="maintitle"><a href="{{ page.root }}/">{{ site.title }}</a>{% if page.title %}: {{ page.title }}{% endif %}</h1>
index 6a4df8a7c83d81f5fdec28ebf07f7511af3cd2d2..effea29dbd061db10d1b68d47a3a4ca82e45f4a9 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Lesson navigation bar.
+{% endcomment %}
 <nav class="navbar navbar-default">
   <div class="container-fluid">
     <div class="navbar-header">
index bffe9b9e25a088782f65e92408d5d26867b67cd8..e8e72e34db7bdb3f44955e76c7c13ec1fddbfdc1 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Advertising box at the top of a workshop website home page.
+{% endcomment %}
 <div class="jumbotron">
   <div class="row">
     <div class="col-md-10 col-md-offset-1">
index 31e5f37f36c83c88ac522c3d77b7e1d8894af690..c618999e70a63557e1e9f0ae482b7f47061f0937 100644 (file)
@@ -1,3 +1,6 @@
+{% comment %}
+  Footer for a standard workshop.
+{% endcomment %}
 <footer>
   <div class="row">
     <div class="col-md-6" align="left">
index 752d7c9602fc36e2a3ccc0a4ce5c43f35aa0aee8..bcc010d0c1b0a11ce4c6ddfe5c5b273b16c228c7 100644 (file)
@@ -133,7 +133,7 @@ div.branding {
 
 ul,
 ol {
-  padding-left: 1em;
+  padding-left: 2em;
 }
 
 span.fold-unfold {