Skip to content

Commit 799fedc

Browse files
committed
update to final version of styles
2 parents 5337d8d + 7bcdf50 commit 799fedc

21 files changed

+581
-183
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Thanks for contributing! :heart:
55

66
If this contribution is for instructor training, please email the link to this contribution to
7-
checkout@carpentries.org so we can record your progress. You've completed your contribution
7+
instructor.training@carpentries.org so we can record your progress. You've completed your contribution
88
step for instructor checkout by submitting this contribution!
99

1010
Keep in mind that **lesson maintainers are volunteers** and it may take them some time to

404.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ permalink: 404.html
55
title: "Page not found"
66
---
77

8-
# Oops! We can't find that page.
8+
# Oops! We cannot find that page.
99
{: style="text-align: center;"}
1010

1111
> ## Our apologies!
1212
>
13-
> We can't seem to find the page you're looking for.
13+
> We cannot seem to find the page you are looking for.
1414
> Try going back to the <a href="javascript:history.back()">previous page</a> or
1515
> navigate to any other page using the navigation bar above
1616
> {%- if site.kind == "lesson" -%} or the schedule below {%- endif -%}.

LICENSE.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ license terms.
2323

2424
Under the following terms:
2525

26-
* **Attribution**---You must give appropriate credit (mentioning that
27-
your work is derived from work that is Copyright © Software
28-
Carpentry and, where practical, linking to
29-
http://software-carpentry.org/), provide a [link to the
30-
license][cc-by-human], and indicate if changes were made. You may do
31-
so in any reasonable manner, but not in any way that suggests the
32-
licensor endorses you or your use.
26+
* **Attribution**---You must give appropriate credit by:
27+
- mentioning that your work is derived from work that is
28+
Copyright © Software Carpentry, Data Carpentry, Library Carpentry,
29+
or The Carpentries.
30+
- where practical, linking to the respective lesson program website
31+
(https://software-carpentry.org/, https://datacarpentry.org, https://librarycarpentry.org, or
32+
https://carpentries.org), provide a [link to the license][cc-by-human]
33+
- and indicate if changes were made. You may do so in any reasonable manner, but not in any way
34+
that suggests the licensor endorses you or your use.
3335

3436
**No additional restrictions**---You may not apply legal terms or
3537
technological measures that legally restrict others from doing
@@ -73,8 +75,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7375

7476
## Trademark
7577

76-
"Software Carpentry" and "Data Carpentry" and their respective logos
77-
are registered trademarks of [Community Initiatives][CI].
78+
"The Carpentries", "Software Carpentry" and "Data Carpentry" and their respective logos are
79+
registered trademarks of [Community Initiatives][CI].
7880

7981
[cc-by-human]: https://creativecommons.org/licenses/by/4.0/
8082
[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode

Makefile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ JEKYLL=bundle config set --local path .vendor/bundle && bundle install && bundle
77
PARSER=bin/markdown_ast.rb
88
DST=_site
99

10+
# Find Docker
11+
DOCKER := $(shell which docker 2>/dev/null)
12+
1013
# Check Python 3 is installed and determine if it's called via python3 or python
1114
# (https://stackoverflow.com/a/4933395)
1215
PYTHON3_EXE := $(shell which python3 2>/dev/null)
@@ -41,23 +44,27 @@ endif
4144
.PHONY: site docker-serve repo-check clean clean-rmd
4245

4346
## * serve : render website and run a local server
44-
serve : lesson-md
47+
serve : lesson-md index.md
4548
${JEKYLL} serve
4649

4750
## * site : build website but do not run a server
48-
site : lesson-md
51+
site : lesson-md index.md
4952
${JEKYLL} build
5053

5154
## * docker-serve : use Docker to serve the site
5255
docker-serve :
53-
@docker pull carpentries/lesson-docker:latest
54-
@docker run --rm -it \
56+
ifeq (, $(DOCKER))
57+
$(error Your system does not appear to have Docker installed)
58+
else
59+
@$(DOCKER) pull carpentries/lesson-docker:latest
60+
@$(DOCKER) run --rm -it \
5561
-v $${PWD}:/home/rstudio \
5662
-p 4000:4000 \
5763
-p 8787:8787 \
5864
-e USERID=$$(id -u) \
5965
-e GROUPID=$$(id -g) \
6066
carpentries/lesson-docker:latest
67+
endif
6168

6269
## * repo-check : check repository settings
6370
repo-check : python
@@ -172,3 +179,10 @@ ifeq (, $(PYTHON))
172179
else
173180
@:
174181
endif
182+
183+
index.md :
184+
ifeq (, $(wildcard index.md))
185+
$(error index.md not found)
186+
else
187+
@:
188+
endif
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% assign date = include.need_transition_date %}
2+
3+
{% if date == "true" %}
4+
{% unless site.transition_date_prebeta %}
5+
<div class="alert alert-danger">
6+
you need to specify the variable <code>transition_date_prebeta</code>
7+
in <code>_config.yml</code>.
8+
</div>
9+
{% endunless %}
10+
{% unless site.transition_date_beta %}
11+
<div class="alert alert-danger">
12+
you need to specify the variable <code>transition_date_beta</code>
13+
in <code>_config.yml</code>.
14+
</div>
15+
{% endunless %}
16+
{% unless site.transition_date_prerelease %}
17+
<div class="alert alert-danger">
18+
you need to specify the variable <code>transition_date_prerelease</code>
19+
in <code>_config.yml</code>.
20+
</div>
21+
{% endunless %}
22+
{% endif %}

_includes/javascript.html

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,27 @@
55
<script src="{{ relative_root_path }}/assets/js/bootstrap.min.js"></script>
66
<script src="{{ relative_root_path }}/assets/js/lesson.js"></script>
77

8+
{% if site.kind == "lesson" %}
9+
<!-- Matomo -->
810
<script>
9-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
10-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
11-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
12-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
13-
ga('create', 'UA-37305346-2', 'auto');
14-
ga('send', 'pageview');
11+
var _paq = window._paq = window._paq || [];
12+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
13+
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
14+
_paq.push(["setDomains", ["*.lessons.carpentries.org","*.datacarpentry.github.io","*.datacarpentry.org","*.librarycarpentry.github.io","*.librarycarpentry.org","*.swcarpentry.github.io"]]);
15+
_paq.push(["setDoNotTrack", true]);
16+
_paq.push(["disableCookies"]);
17+
_paq.push(['trackPageView']);
18+
_paq.push(['enableLinkTracking']);
19+
(function() {
20+
var u="https://carpentries.matomo.cloud/";
21+
_paq.push(['setTrackerUrl', u+'matomo.php']);
22+
_paq.push(['setSiteId', '1']);
23+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
24+
g.async=true; g.src='//cdn.matomo.cloud/carpentries.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
25+
})();
1526
</script>
27+
<!-- End Matomo Code -->
28+
{% endif %}
1629

1730
{% if page.math %}
1831
<script src="{{ relative_root_path }}/assets/js/katex.min.js"></script>

_includes/lesson_footer.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@
2828
{% endif %}
2929
</div>
3030
<div class="col-md-6 help-links" align="right">
31-
{% if page.source %}
32-
{% if page.source == "Rmd" %}
33-
<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Edit on GitHub</a>
34-
{% endif %}
35-
{% else %}
36-
<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path}}" data-checker-ignore>Edit on GitHub</a>
37-
{% endif %}
31+
{% if site.life_cycle == 'transition-step-2' %}
32+
{% assign edit_url = "https://carpentries.github.io/workbench/contributor/beta.html?id=" | append: repo_url %}
33+
{% else %}
34+
{% assign edit_url = repo_url %}
35+
{% endif %}
36+
{% if page.source == "Rmd" %}
37+
<a href="{{edit_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Edit on GitHub</a>
38+
{% else %}
39+
<a href="{{edit_url}}/edit/{{ default_branch }}/{{page.path}}" data-checker-ignore>Edit on GitHub</a>
40+
{% endif %}
3841
/
3942
<a href="{{ repo_url }}/blob/{{ source_branch }}/CONTRIBUTING.md" data-checker-ignore>Contributing</a>
4043
/

_includes/life_cycle.html

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,66 @@
2828
{% elsif site.life_cycle == "stable" %}
2929

3030
{% comment %}
31-
We don't do anything special for now
31+
We do not do anything special for lessons in stable
3232
{% endcomment %}
3333

34+
35+
{% comment %}
36+
Below we cover the 2 phases of lesson transition towards the Carpentries Workbench:
37+
Variables needed:
38+
- transition_date_prebeta: the date of the prebeta stage
39+
- transition_date_beta: the date of the beta stage
40+
- transition_date_prerelease: the date of the prerelease stage
41+
42+
- transition-step-1: We notify that there is a snapshot of the lesson available for testing, and that it will supersede this version.
43+
- transition-step-2 We indicate that this version of the lesson is a snapshot and a new version of the lesson is avaiable and will supersede this version at a given date.
44+
{% endcomment %}
45+
46+
{% elsif site.life_cycle == "transition-step-1" %}
47+
{% include check_transition_variables.html need_transition_date = 'true' %}
48+
49+
<div id="life-cycle" class="alert alert-warning life-cycle panel-body">
50+
A snapshot of this lesson from {{ site.transition_date_prebeta }} is being tested on
51+
<a href='https://carpentries.github.io/workbench'>The Carpentries Workbench</a>:
52+
<a href="https://preview.carpentries.org/{{ repo_name }}">https://preview.carpentries.org/{{ repo_name }}</a>.
53+
<br>
54+
<b>The Workbench version of this lesson will become default on {{ site.transition_date_prerelease }}</b>.
55+
<button type="button" style="border: true; position: absolute; top: 10px; right: 27px; color: #383838;" class="close" data-dismiss="alert" aria-label="Close">
56+
<span aria-hidden="true" style='font-size:34pt'>&times;</span>
57+
</button>
58+
</div>
59+
60+
{% elsif site.life_cycle == "transition-step-2" %}
61+
{% include check_transition_variables.html need_transition_date = 'true' %}
62+
63+
<div id="life-cycle" class="alert alert-danger alert-dismissible life-cycle panel-body" role="alert">
64+
This lesson is a <b>snapshot from {{ site.transition_date_beta }}</b>.
65+
A newer version is being tested on <a href='https://carpentries.github.io/workbench'>The Carpentries Workbench</a>:
66+
<a href="https://preview.carpentries.org/{{ repo_name }}">https://preview.carpentries.org/{{ repo_name }}</a>.
67+
<br>
68+
<b>The Workbench version of this lesson will become default on {{ site.transition_date_prerelease }}</b>.
69+
<button type="button" style="border: true; position: absolute; top: 10px; right: 27px; color: #383838;" class="close" data-dismiss="alert" aria-label="Close">
70+
<span aria-hidden="true" style='font-size:34pt'>&times;</span>
71+
</button>
72+
</div>
73+
74+
{% endif %}
75+
76+
77+
78+
{% comment %}
79+
For Carpentries Lab lessons we add a banner about the review status
80+
{% endcomment %}
81+
82+
{% if site.carpentry == "lab" %}
83+
{% if site.doi contains "zenodo" %}{% assign listing=" on Zenodo" %}
84+
{% elsif site.doi contains "jose" %}{% assign listing=" in JOSE" %}
85+
{% else %}{% assign listing="none" %}
86+
{% endif %}
87+
88+
<div class="panel panel-default life-cycle">
89+
<div id="life-cycle" class="panel-body published">
90+
This lesson has passed peer-review! {% if site.doi != "" %}<a href="{{ site.doi }}">See the publication{{ listing }}.</a>{% endif %}
91+
</div>
92+
</div>
3493
{% endif %}

_includes/manual_episode_order.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
GitHub Pages switches to Jekyll that supports it
44
without any major hackery. Note, some logic will
55
be required even when this transition happens
6-
but it won't be as involved as what we have to do
6+
but it will not be as involved as what we have to do
77
in this file.
88

99
To order lesson episodes or extras manually

_includes/navbar.html

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
<a href="{{ site.carpentries_site }}" class="pull-left">
3333
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/cp-logo-blue.svg %}" alt="The Carpentries logo" />
3434
</a>
35+
{% elsif site.carpentry == "lab" %}
36+
<a href="{{ relative_root_path }}{% link index.md %}" class="pull-left">
37+
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/carpentrieslab.svg %}" alt="The Carpentries Lab" />
38+
</a>
3539
{% endif %}
3640

3741
{% comment %} Always show link to home page. {% endcomment %}
@@ -80,20 +84,26 @@
8084
{% else %}
8185
{% assign extra = lesson_extra %}
8286
{% endif %}
83-
<li><a href="{{ relative_root_path }}{{ extra.url }}">{{ extra.title }}</a></li>
87+
{% unless extra.exclude %}
88+
<li><a href="{{ relative_root_path }}{{ extra.url }}">{{ extra.title }}</a></li>
89+
{% endunless %}
8490
{% endfor %}
8591
</ul>
8692
</li>
8793
{% endif %}
8894

8995
{% comment %} Always show license. {% endcomment %}
9096
<li><a href="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
91-
{% if page.source %}
92-
{% if page.source == "Rmd" %}
93-
<li><a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
94-
{% endif %}
97+
{% if site.life_cycle == 'transition-step-2' %}
98+
{% assign edit_url = "https://carpentries.github.io/workbench/contributor/beta.html?id=" | append: repo_url %}
99+
{% else %}
100+
{% assign edit_url = repo_url %}
101+
{% endif %}
102+
103+
{% if page.source == "Rmd" %}
104+
<li><a href="{{edit_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
95105
{% else %}
96-
<li><a href="{{repo_url}}/edit/{{ default_branch}}/{{page.path}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
106+
<li><a href="{{edit_url}}/edit/{{ default_branch }}/{{page.path}}" data-checker-ignore>Improve this page <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></li>
97107
{% endif %}
98108
</ul>
99109
<form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">

0 commit comments

Comments
 (0)