Skip to content

Commit

Permalink
add styling for lesson in The Carpentries Lab
Browse files Browse the repository at this point in the history
Co-authored-by: Toby Hodges <[email protected]>
  • Loading branch information
fmichonneau and tobyhodges committed Jul 22, 2021
1 parent 674025c commit 332145f
Show file tree
Hide file tree
Showing 4 changed files with 271 additions and 1 deletion.
14 changes: 13 additions & 1 deletion _includes/life_cycle.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@
{% elsif site.life_cycle == "stable" %}

{% comment %}
We don't do anything special for now
We don't do anything special unless this is a Carpentries Lab lesson
{% endcomment %}

{% if site.carpentry == "lab" %}
{% if site.doi contains "zenodo" %}{% assign listing=" on Zenodo" %}
{% elsif site.doi contains "jose" %}{% assign listing=" in JOSE" %}
{% else %}{% assign listing="none" %}
{% endif %}

<div class="panel panel-default life-cycle">
<div id="life-cycle" class="panel-body published">
This lesson has passed peer-review! {% if site.doi != "" %}<a href="{{ site.doi }}">See the publication{{ listing }}.</a>{% endif %}
</div>
</div>
{% endif %}
{% endif %}
4 changes: 4 additions & 0 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
<a href="{{ site.carpentries_site }}" class="pull-left">
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/cp-logo-blue.svg %}" alt="The Carpentries logo" />
</a>
{% elsif site.carpentry == "lab" %}
<a href="{{ relative_root_path }}{% link index.md %}" class="pull-left">
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/carpentrieslab.svg %}" alt="The Carpentries Lab" />
</a>
{% endif %}

{% comment %} Always show link to home page. {% endcomment %}
Expand Down
5 changes: 5 additions & 0 deletions assets/css/lesson.scss
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ div.life-cycle {
background: #d9edf7;
}

.published {
color: #354711;
background: #effbd7;
}

// Remove border around spans of text within code blocks
// that the highlighter (rouge) failed to recognize.
pre.highlight span.err {
Expand Down
249 changes: 249 additions & 0 deletions assets/img/carpentrieslab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 332145f

Please sign in to comment.