Skip to content

Commit 332145f

Browse files
add styling for lesson in The Carpentries Lab
Co-authored-by: Toby Hodges <tbyhdgs@gmail.com>
1 parent 674025c commit 332145f

File tree

4 files changed

+271
-1
lines changed

4 files changed

+271
-1
lines changed

_includes/life_cycle.html

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

3030
{% comment %}
31-
We don't do anything special for now
31+
We don't do anything special unless this is a Carpentries Lab lesson
3232
{% endcomment %}
3333

34+
{% if site.carpentry == "lab" %}
35+
{% if site.doi contains "zenodo" %}{% assign listing=" on Zenodo" %}
36+
{% elsif site.doi contains "jose" %}{% assign listing=" in JOSE" %}
37+
{% else %}{% assign listing="none" %}
38+
{% endif %}
39+
40+
<div class="panel panel-default life-cycle">
41+
<div id="life-cycle" class="panel-body published">
42+
This lesson has passed peer-review! {% if site.doi != "" %}<a href="{{ site.doi }}">See the publication{{ listing }}.</a>{% endif %}
43+
</div>
44+
</div>
45+
{% endif %}
3446
{% endif %}

_includes/navbar.html

Lines changed: 4 additions & 0 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 %}

assets/css/lesson.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ div.life-cycle {
357357
background: #d9edf7;
358358
}
359359

360+
.published {
361+
color: #354711;
362+
background: #effbd7;
363+
}
364+
360365
// Remove border around spans of text within code blocks
361366
// that the highlighter (rouge) failed to recognize.
362367
pre.highlight span.err {

assets/img/carpentrieslab.svg

Lines changed: 249 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)