Skip to content

Commit

Permalink
Merge pull request swcarpentry#393 from rgaiacs/v9.1.1
Browse files Browse the repository at this point in the history
Update style to v9.1.1
  • Loading branch information
iglpdc authored Mar 10, 2017
2 parents 95c3c11 + 6027e68 commit 1bb693a
Show file tree
Hide file tree
Showing 21 changed files with 300 additions and 69 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## Trademark

"Software Carpentry" an "Data Carpentry" and their respective logos
"Software Carpentry" and "Data Carpentry" and their respective logos
are registered trademarks of [NumFOCUS][numfocus].

[cc-by-human]: https://creativecommons.org/licenses/by/4.0/
Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ DST=_site

# Controls
.PHONY : commands clean files
.NOTPARALLEL:
all : commands

## commands : show all commands.
commands :
@grep -h -E '^##' ${MAKEFILES} | sed -e 's/## //g'

## serve : run a local server.
serve : lesson-rmd
serve : lesson-md
${JEKYLL} serve

## site : build files but do not run a server.
site : lesson-rmd
site : lesson-md
${JEKYLL} build

# repo-check : check repository settings.
Expand Down Expand Up @@ -53,7 +54,7 @@ workshop-check :
## ----------------------------------------
## Commands specific to lesson websites.

.PHONY : lesson-check lesson-rmd lesson-files lesson-fixme
.PHONY : lesson-check lesson-md lesson-files lesson-fixme

# RMarkdown files
RMD_SRC = $(wildcard _episodes_rmd/??-*.Rmd)
Expand All @@ -79,13 +80,16 @@ HTML_DST = \
$(patsubst _extras/%.md,${DST}/%/index.html,$(wildcard _extras/*.md)) \
${DST}/license/index.html

## lesson-rmd : convert Rmarkdown files to markdown
lesson-rmd: $(RMD_SRC)
@bin/knit_lessons.sh $(RMD_SRC)
## lesson-md : convert Rmarkdown files to markdown
lesson-md : ${RMD_DST}

# Use of .NOTPARALLEL makes rule execute only once
${RMD_DST} : ${RMD_SRC}
@bin/knit_lessons.sh ${RMD_SRC}

## lesson-check : validate lesson Markdown.
lesson-check :
@bin/lesson_check.py -s . -p ${PARSER}
@bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md

## lesson-check-all : validate lesson Markdown, checking line lengths and trailing whitespace.
lesson-check-all :
Expand Down
21 changes: 19 additions & 2 deletions _includes/carpentries.html
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -23,5 +26,19 @@
building on learners' existing knowledge to enable them to quickly apply skills learned to their own research.
</div>
</div>


<br/>
<div class="row">
<div class="col-md-2" align="center">
<a href="{{ site.lc_site }}"><img src="{{ page.root }}/assets/img/lc-icon-black.svg" alt="Library Carpentry logo" /></a>
</div>
<div class="col-md-8">
Library Carpentry is made by librarians to help librarians
automate repetitive, boring, error-prone tasks;
create, maintain and analyse sustainable and reusable data;
work effectively with IT and systems colleagues;
better understand the use of software in research;
and much more.
Library Carpentry was the winner of the 2016
<a href="http://labs.bl.uk/British+Library+Labs+Awards">British Library Labs Teaching and Learning Award</a>.
</div>
</div>
3 changes: 3 additions & 0 deletions _includes/episode_keypoints.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% comment %}
Display key points for an episode.
{% endcomment %}
<blockquote class="keypoints">
<h2>Key Points</h2>
<ul>
Expand Down
25 changes: 5 additions & 20 deletions _includes/episode_navbar.html
Original file line number Diff line number Diff line change
@@ -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 %}
Expand All @@ -34,8 +19,8 @@ <h1 class="maintitle">{{ page.title }}</h1>
</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 %}
Expand Down
3 changes: 3 additions & 0 deletions _includes/javascript.html
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
28 changes: 23 additions & 5 deletions _includes/lesson_footer.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
{% comment %}
Footer for lesson pages.
{% endcomment %}
<footer>
<div class="row">
<div class="col-md-6" align="left">
<h4>
Copyright &copy; 2016
{% if site.carpentry == "swc" %}<a href="{{ site.swc_site }}">Software Carpentry Foundation</a>{% endif %}
{% if site.carpentry == "dc" %}<a href="{{ site.dc_site }}">Data Carpentry</a>{% endif %}
Copyright &copy; 2016–{{ 'now' | date: "%Y" }}
{% if site.carpentry == "swc" %}
<a href="{{ site.swc_site }}">Software Carpentry Foundation</a>
{% elsif site.carpentry == "dc" %}
<a href="{{ site.dc_site }}">Data Carpentry</a>
{% elsif site.carpentry == "lc" %}
<a href="{{ site.lc_site }}">Library Carpentry</a>
{% endif %}
</h4>
</div>
<div class="col-md-6" align="right">
<h4>
<a href="{{ site.github.repository_url }}/">Source</a>
{% if page.source %}
{% if page.source == "Rmd" %}
<a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}">Edit on GitHub</a>
{% endif %}
{% else %}
<a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path}}">Edit on GitHub</a>
{% endif %}
/
<a href="{{ site.github.repository_url }}/blob/gh-pages/CONTRIBUTING.md">Contributing</a>
/
<a href="mailto:{{ site.email }}">Contact</a>
<a href="{{ site.github.repository_url }}/">Source</a>
/
<a href="{{ site.github.repository_url }}/blob/gh-pages/CITATION">Cite</a>
/
<a href="{{ site.contact }}">Contact</a>
</h4>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions _includes/main_title.html
Original file line number Diff line number Diff line change
@@ -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>
20 changes: 19 additions & 1 deletion _includes/navbar.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{% comment %}
Lesson navigation bar.
{% endcomment %}
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
Expand All @@ -17,6 +20,10 @@
<a href="{{ site.dc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" />
</a>
{% elsif page.carpentry == "lc" %}
<a href="{{ site.lc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/lc-icon-black.svg" alt="Library Carpentry logo" />
</a>
{% elsif site.carpentry == "swc" %}
<a href="{{ site.swc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" />
Expand All @@ -25,6 +32,10 @@
<a href="{{ site.dc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" />
</a>
{% elsif site.carpentry == "lc" %}
<a href="{{ site.lc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ page.root }}/assets/img/lc-icon-black.svg" alt="Library Carpentry logo" />
</a>
{% endif %}

{% comment %} Always show link to home page. {% endcomment %}
Expand All @@ -40,7 +51,6 @@
{% comment %} Show setup instructions, reference guide, and lesson episodes for lessons. {% endcomment %}
{% if site.kind == "lesson" %}
<li><a href="{{ page.root }}/setup/">Setup</a></li>
<li><a href="{{ page.root }}/reference/">Reference</a></li>
<li class="dropdown">
<a href="{{ page.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
<ul class="dropdown-menu">
Expand All @@ -56,6 +66,7 @@
<li class="dropdown">
<a href="{{ page.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ page.root }}/reference/">Reference</a></li>
{% for extra in site.extras %}
<li><a href="{{ page.root }}{{ extra.url }}">{{ extra.title }}</a></li>
{% endfor %}
Expand All @@ -65,6 +76,13 @@

{% comment %} Always show license. {% endcomment %}
<li><a href="{{ page.root }}/license/">License</a></li>
{% if page.source %}
{% if page.source == "Rmd" %}
<li><a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
{% endif %}
{% else %}
<li><a href="{{site.github.repository_url}}/edit/gh-pages/{{page.path}}">Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
{% endif %}
</ul>
<form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
<div class="form-group">
Expand Down
20 changes: 14 additions & 6 deletions _includes/syllabus.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<div class="syllabus">
<h2 id="schedule">Schedule</h2>

{% assign lesson_number = 0 %}
{% assign day = 0 %}
{% assign multiday = false %}
{% for episode in site.episodes %}
Expand All @@ -13,15 +14,21 @@ <h2 id="schedule">Schedule</h2>
{% assign current = site.start_time %}

<table class="table table-striped">
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}"></td>
<td class="col-md-3"><a href="{{ page.root }}/setup">Setup</a></td>
<td class="col-md-7">Dowload files used on the lesson.</td>
</tr>
{% for episode in site.episodes %}
{% if episode.start %} {% comment %} Starting a new day? {% endcomment %}
{% assign day = day | plus: 1 %}
{% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
<tr>
{% if multiday %}<td></td>{% endif %}
<td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">Finish</td>
<td class="col-md-7"></td>
</tr>
Expand All @@ -32,9 +39,10 @@ <h2 id="schedule">Schedule</h2>
{% assign minutes = current | modulo: 60 %}
<tr>
{% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %}
<td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">
<a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a>
{% assign lesson_number = lesson_number | plus: 1 %}
{{ lesson_number }}. <a href="{{ page.root }}{{ episode.url }}">{{ episode.title }}</a>
</td>
<td class="col-md-7">
{% if episode.break %}
Expand All @@ -56,8 +64,8 @@ <h2 id="schedule">Schedule</h2>
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
<tr>
{% if multiday %}<td></td>{% endif %}
<td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">Finish</td>
<td class="col-md-7"></td>
</tr>
Expand Down
3 changes: 3 additions & 0 deletions _includes/workshop_ad.html
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
10 changes: 8 additions & 2 deletions _includes/workshop_footer.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{% comment %}
Footer for a standard workshop.
{% endcomment %}
<footer>
<div class="row">
<div class="col-md-6" align="left">
<div class="col-md-4" align="left">
<h4><a href="{{ site.swc_site }}">Software Carpentry</a></h4>
</div>
<div class="col-md-6" align="right">
<div class="col-md-4" align="right">
<h4><a href="{{ site.dc_site }}">Data Carpentry</a></h4>
</div>
<div class="col-md-4" align="right">
<h4><a href="{{ site.lc_site }}">Library Carpentry</a></h4>
</div>
</div>
</footer>
5 changes: 3 additions & 2 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
<link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/lesson.css" />
{% if site.carpentry == "swc" %}
<link rel="shortcut icon" type="image/x-icon" href="/favicon-swc.ico" />
{% endif %}
{% if site.carpentry == "dc" %}
{% elsif site.carpentry == "dc" %}
<link rel="shortcut icon" type="image/x-icon" href="/favicon-dc.ico" />
{% elsif site.carpentry == "lc" %}
<link rel="shortcut icon" type="image/x-icon" href="/favicon-lc.ico" />
{% endif %}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
Expand Down
5 changes: 3 additions & 2 deletions _layouts/workshop.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
<link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/lesson.css" />
{% if site.carpentry == "swc" %}
<link rel="shortcut icon" type="image/x-icon" href="/favicon-swc.ico" />
{% endif %}
{% if site.carpentry == "dc" %}
{% elsif site.carpentry == "dc" %}
<link rel="shortcut icon" type="image/x-icon" href="/favicon-dc.ico" />
{% elsif site.carpentry == "lc" %}
<link rel="shortcut icon" type="image/x-icon" href="/favicon-lc.ico" />
{% endif %}
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
Expand Down
2 changes: 1 addition & 1 deletion assets/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1bb693a

Please sign in to comment.