Skip to content

Commit e465feb

Browse files
committed
Merge branch gh-pages of carpentries/styles
2 parents aa4bedd + df03039 commit e465feb

18 files changed

Lines changed: 289 additions & 73 deletions

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
[*.md]
9+
indent_size = 2
10+
indent_style = space
11+
max_line_length = 100 # Please keep this in sync with bin/lesson_check.py!
12+
13+
[*.r]
14+
max_line_length = 80
15+
16+
[*.py]
17+
indent_size = 4
18+
indent_style = space
19+
max_line_length = 79
20+
21+
[*.sh]
22+
end_of_line = lf
23+
24+
[Makefile]
25+
indent_style = tab

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ clean :
4343
@find . -name '*.pyc' -exec rm {} \;
4444

4545
## clean-rmd : clean intermediate R files (that need to be committed to the repo).
46-
clear-rmd :
46+
clean-rmd :
4747
@rm -rf ${RMD_DST}
4848
@rm -rf fig/rmd-*
4949

@@ -88,9 +88,8 @@ HTML_DST = \
8888
## lesson-md : convert Rmarkdown files to markdown
8989
lesson-md : ${RMD_DST}
9090

91-
# Use of .NOTPARALLEL makes rule execute only once
92-
${RMD_DST} : ${RMD_SRC}
93-
@bin/knit_lessons.sh ${RMD_SRC}
91+
_episodes/%.md: _episodes_rmd/%.Rmd
92+
@bin/knit_lessons.sh $< $@
9493

9594
## lesson-check : validate lesson Markdown.
9695
lesson-check : lesson-fixme

_includes/carpentries.html

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
11
{% comment %}
22
General description of Software and Data Carpentry.
33
{% endcomment %}
4+
<div class="row">
5+
<div class="col-md-2" align="center">
6+
<a href="{{ site.carpentries_site }}"><img src="{{ page.root }}/assets/img/cp-logo-blue.svg" alt="The Carpentries logo" /></a>
7+
</div>
8+
<div class="col-md-8">
9+
<p><a href="{{ site.carpentries_site }}">The Carpentries</a> comprises
10+
Software Carpentry and Data Carpentry, communities of Instructors, Trainers,
11+
Maintainers, helpers, and supporters who share a mission to teach
12+
foundational coding and data science skills to researchers. In January,
13+
2018, The Carpentries was formed by the merger of Software Carpentry and
14+
Data Carpentry.</p>
15+
16+
<p>While individual lessons and workshops continue to be run under each
17+
lesson project, The Carpentries provide overall staffing and governance, as
18+
well as support for assessment, instructor training and mentoring.
19+
Memberships are joint, and the Carpentries project maintains a shared Code
20+
of Conduct. The Carpentries is a fiscally sponsored project of Community
21+
Initiatives, a registered 501(c)3 non-profit based in California, USA.</p>
22+
</div>
23+
</div>
424
<div class="row">
525
<div class="col-md-2" align="center">
626
<a href="{{ site.swc_site }}"><img src="{{ page.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /></a>
727
</div>
828
<div class="col-md-8">
9-
Since 1998,
10-
<a href="{{ site.swc_site }}">Software Carpentry</a>
11-
has been teaching researchers in science, engineering, medicine, and related disciplines
12-
the computing skills they need to get more done in less time and with less pain.
13-
Its volunteer instructors have run hundreds of events
14-
for thousands of learners in the past two and a half years.
29+
<p>Since 1998, <a href="{{ site.swc_site }}">Software Carpentry</a> has
30+
been teaching researchers across all disciplines the foundational coding
31+
skills they need to get more done in less time and with less pain. Its
32+
volunteer instructors have run hundreds of events for thousands of learners
33+
around the world. Now that all research involves some degree of
34+
computational work, whether with big data, cloud computing, or simple task
35+
automation, these skills are needed more than ever.</p>
1536
</div>
1637
</div>
1738
<br/>
@@ -20,10 +41,13 @@
2041
<a href="{{ site.dc_site }}"><img src="{{ page.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo" /></a>
2142
</div>
2243
<div class="col-md-8">
23-
<a href="{{ site.dc_site }}">Data Carpentry</a> develops and teaches workshops on the fundamental data skills needed to conduct research.
24-
Its target audience is researchers who have little to no prior computational experience,
25-
and its lessons are domain specific,
26-
building on learners' existing knowledge to enable them to quickly apply skills learned to their own research.
44+
<p><a href="{{ site.dc_site }}">Data Carpentry</a> develops and teaches
45+
workshops on the fundamental data skills needed to conduct research. Its
46+
target audience is researchers who have little to no prior computational
47+
experience, and its lessons are domain specific, building on learners'
48+
existing knowledge to enable them to quickly apply skills learned to their
49+
own research. Data Carpentry workshops take researchers through the entire
50+
data life cycle.</p>
2751
</div>
2852
</div>
2953
<br/>
@@ -32,13 +56,13 @@
3256
<a href="{{ site.lc_site }}"><img src="{{ page.root }}/assets/img/lc-icon-black.png" alt="Library Carpentry logo" /></a>
3357
</div>
3458
<div class="col-md-8">
35-
<a href="{{ site.lc_site }}">Library Carpentry</a> is made by librarians to help librarians
36-
automate repetitive, boring, error-prone tasks;
37-
create, maintain and analyse sustainable and reusable data;
38-
work effectively with IT and systems colleagues;
39-
better understand the use of software in research;
40-
and much more.
41-
Library Carpentry was the winner of the 2016
42-
<a href="http://labs.bl.uk/British+Library+Labs+Awards">British Library Labs Teaching and Learning Award</a>.
59+
<p><a href="{{ site.lc_site }}">Library Carpentry</a> is in discussions with
60+
The Carpentries to be a Lesson Project, like Software Carpentry*
61+
and Data Carpentry. Library Carpentry develops lessons and
62+
teaches workshops for and with people working in library- and
63+
information-related roles. Its goal is to create an on-ramp to empower this
64+
community to use software and data in their own work, as well as be
65+
advocates for and train others in efficient, effective and reproducible data
66+
and software practices.</p>
4367
</div>
4468
</div>

_includes/lesson_footer.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
<div class="row">
66
<div class="col-md-6 copyright" align="left">
77
{% if site.carpentry == "swc" %}
8-
Copyright &copy; 2018–{{ 'now' | date: "%Y" }}
9-
<a href="{{ site.carpentries_site }}">The Carpentries</a>
8+
Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
9+
by <a href="{{ site.carpentries_site }}">The Carpentries</a>
1010
<br>
11-
Copyright &copy; 2016–2018
12-
<a href="{{ site.swc_site }}">Software Carpentry Foundation</a>
11+
Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–2018
12+
by <a href="{{ site.swc_site }}">Software Carpentry Foundation</a>
1313
{% elsif site.carpentry == "dc" %}
14-
Copyright &copy; 2018–{{ 'now' | date: "%Y" }}
15-
<a href="{{ site.carpentries_site }}">The Carpentries</a>
14+
Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
15+
by <a href="{{ site.carpentries_site }}">The Carpentries</a>
1616
<br>
17-
Copyright &copy; 2016–2018
18-
<a href="{{ site.dc_site }}">Data Carpentry</a>
17+
Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–2018
18+
by <a href="{{ site.dc_site }}">Data Carpentry</a>
1919
{% elsif site.carpentry == "lc" %}
20-
Copyright &copy; 2016–{{ 'now' | date: "%Y" }}
21-
<a href="{{ site.lc_site }}">Library Carpentry</a>
20+
Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–{{ 'now' | date: "%Y" }}
21+
by <a href="{{ site.lc_site }}">Library Carpentry</a>
2222
{% elsif site.carpentry == "cp" %}
23-
Copyright &copy; 2018–{{ 'now' | date: "%Y" }}
24-
<a href="{{ site.carpentries_site }}">The Carpentries</a>
23+
Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
24+
by <a href="{{ site.carpentries_site }}">The Carpentries</a>
2525
{% endif %}
2626
</div>
2727
<div class="col-md-6 help-links" align="right">
@@ -45,7 +45,7 @@
4545
<div class="row">
4646
<div class="col-md-12" align="center">
4747
Using <a href="https://github.com/carpentries/styles/">The Carpentries style</a>
48-
version <a href="https://github.com/carpentries/styles/releases/tag/v9.5.2">9.5.2</a>.
48+
version <a href="https://github.com/carpentries/styles/releases/tag/v9.5.3">9.5.3</a>.
4949
</div>
5050
</div>
5151
</footer>

_includes/life_cycle.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
{% if site.life_cycle == "pre-alpha" %}
3+
4+
<div class="panel panel-default life-cycle">
5+
<div id="life-cycle" class="panel-body pre-alpha">
6+
This lesson is still being designed and assembled (Pre-Alpha version)
7+
</div>
8+
</div>
9+
10+
11+
{% elsif site.life_cycle == "alpha" %}
12+
13+
<div class="panel panel-default life-cycle">
14+
<div id="life-cycle" class="panel-body alpha">
15+
This lesson is in the early stages of development (Alpha version)
16+
</div>
17+
</div>
18+
19+
20+
{% elsif site.life_cycle == "beta" %}
21+
22+
<div class="panel panel-default life-cycle">
23+
<div id="life-cycle" class="panel-body beta">
24+
This lesson is being piloted (Beta version)
25+
</div>
26+
</div>
27+
28+
{% elsif site.life_cycle == "stable" %}
29+
30+
{% comment %}
31+
We don't do anything special for now
32+
{% endcomment %}
33+
34+
{% endif %}

_includes/workshop_calendar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="//calendar.google.com/calendar/render?action=TEMPLATE&text={% if page.carpentry == "swc" %}Software{% elsif page.carpentry == "dc" %}Data{% endif %} Carpentry Workshop&dates={{ page.startdate | replace: "-", "" }}/{{ page.enddate | replace: "-", "" | plus: 0}}&trp=false&sprop&sprop=name:&sf=true&output=xml&location={{ page.address }}&details={% if page.carpentry == "swc" %}Software{% elsif page.carpentry == "dc" %}Data{% endif %} Carpentry Workshop at {{ page.venue }}">Add to your Google Calendar.</a>

_layouts/base.html

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
---
22
---
3+
4+
{% comment %}
5+
When rendering websites locally, `site.github.url` doesn't get resolved
6+
properly unless GitHub PAT are set up and available in the environment.
7+
This leads to warnings and errors when trying to serve the site locally.
8+
To work around this, we use the `jekyll.environment` variable which is set to
9+
`development` when rendering the site locally, and set to `production` on
10+
GitHub where `site.github.url` will be defined.
11+
{% endcomment %}
12+
13+
{% if jekyll.environment == "development" %}
14+
{% assign search_domain_url = "" %}
15+
{% elsif jekyll.environment == "production" %}
16+
{% assign search_domain_url = site.github.url %}
17+
{% endif %}
18+
319
<!doctype html>
420
<html lang="en">
521
<head>
@@ -8,7 +24,7 @@
824
<meta http-equiv="last-modified" content="{{ site.time }}">
925
<meta name="viewport" content="width=device-width, initial-scale=1">
1026
<!-- meta "search-domain" used for google site search function google_search() -->
11-
<meta name="search-domain" value="{{ site.github.url }}">
27+
<meta name="search-domain" value="{{ search_domain_url }}">
1228
<link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/bootstrap.css" />
1329
<link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/bootstrap-theme.css" />
1430
<link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/lesson.css" />
@@ -25,6 +41,9 @@
2541
<title>{{ site.title }}{% if page.title %}: {{ page.title }}{% endif %}</title>
2642
</head>
2743
<body>
44+
45+
{% include life_cycle.html %}
46+
2847
<div class="container">
2948
{% include navbar.html %}
3049
{{ content }}

_layouts/lesson.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
layout: base
33
---
44
{% include main_title.html %}
5-
{{ content }}
6-
{% include syllabus.html %}
5+
<article>
6+
{{ content }}
7+
</article>
8+
{% include syllabus.html %}

_layouts/page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
layout: base
33
---
44
{% include main_title.html %}
5+
<article>
56
{{content}}
7+
</article>

assets/css/lesson.scss

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ $color-testimonial: #fc8dc1 !default;
2929
//----------------------------------------
3030

3131
@mixin cdSetup($color) {
32-
color: $color;
33-
border-left: solid 5px $color;
34-
margin-bottom: 0px;
35-
border-radius: 4px 0 0 4px;
32+
color: $color;
33+
border-left: solid 5px $color;
34+
margin: 15px;
35+
border-radius: 4px 0 0 4px;
3636
}
3737

3838
.error { @include cdSetup($color-error); }
@@ -81,8 +81,11 @@ $codeblock-padding: 5px !default;
8181
padding-right: 0;
8282
border: 1px solid;
8383
border-color: $color;
84+
border-radius: 4px;
8485
padding-bottom: $codeblock-padding;
8586

87+
margin: 15px;
88+
8689
h2 {
8790
padding-top: $codeblock-padding;
8891
padding-bottom: $codeblock-padding;
@@ -126,6 +129,10 @@ $codeblock-padding: 5px !default;
126129
font-size: 18px;
127130
}
128131

132+
blockquote p {
133+
margin: 5px;
134+
}
135+
129136
//----------------------------------------
130137
// Override Bootstrap settings.
131138
//----------------------------------------
@@ -137,14 +144,27 @@ code {
137144
background-color: #e7e7e7;
138145
}
139146

140-
img {
141-
max-width: 100%;
147+
article img {
148+
display: block;
149+
margin: 20px auto;
150+
max-width: 100%;
151+
}
152+
153+
article h2 {
154+
margin: 48px 0 16px;
155+
border-bottom: solid 1px #eaecef;
156+
padding-bottom: 0.3em;
157+
line-height: 1.25;
142158
}
143159

160+
article h3 { margin: 40px 0 16px; }
161+
144162
//----------------------------------------
145163
// Miscellaneous.
146164
//----------------------------------------
147165

166+
.figures h2 { margin-top: 100px; }
167+
148168
.maintitle {
149169
text-align: center;
150170
}
@@ -156,7 +176,7 @@ img {
156176
footer .copyright,
157177
footer .help-links
158178
{
159-
font-size: 18px;
179+
font-size: inherit;
160180
margin-top: 10px;
161181
margin-bottom: 10px;
162182
font-weight: 500;
@@ -184,6 +204,37 @@ span.fold-unfold {
184204
}
185205

186206

207+
//----------------------------------------
208+
// Life cycle box
209+
//----------------------------------------
210+
211+
div.life-cycle {
212+
position: -webkit-sticky; /* Safari */
213+
position: sticky;
214+
top: 0;
215+
z-index: 100;
216+
font-size: 1.2em;
217+
text-align: center;
218+
margin-bottom: -1px;
219+
border-radius: 0;
220+
}
221+
222+
.pre-alpha {
223+
color: #a94442;
224+
background: #f2dede;
225+
}
226+
227+
.alpha {
228+
color: #8a6d3b;
229+
background: #fcf8e3;
230+
}
231+
232+
.beta {
233+
color: #31708f;
234+
background: #d9edf7;
235+
}
236+
237+
187238
//----------------------------------------
188239
// keyboard key style, from StackExchange.
189240
//----------------------------------------

0 commit comments

Comments
 (0)