lesson.scss: center images
authorMaxim Belkin <maxim.belkin@gmail.com>
Mon, 20 Aug 2018 18:18:04 +0000 (18:18 +0000)
committerGitHub <noreply@github.com>
Mon, 20 Aug 2018 18:18:04 +0000 (18:18 +0000)
Pull Request: carpentries/styles#323

Makefile
_includes/lesson_footer.html
_includes/workshop_calendar.html [new file with mode: 0644]
_layouts/base.html
assets/css/lesson.scss
bin/boilerplate/CODE_OF_CONDUCT.md [deleted file]
bin/boilerplate/_config.yml
bin/lesson_initialize.py

index f0b73e6064bf52e64c6c27967a70c81a21cc2d89..5ee09806c43fdbf2cf8e337211a22f69f664b440 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ clean :
        @find . -name '*.pyc' -exec rm {} \;
 
 ## clean-rmd        : clean intermediate R files (that need to be committed to the repo).
-clear-rmd :
+clean-rmd :
        @rm -rf ${RMD_DST}
        @rm -rf fig/rmd-*
 
index 7df84da7a3c790eca0546192322e372f6879a6fd..9be141815321a2b61bd242306de52d46a3122989 100644 (file)
@@ -5,23 +5,23 @@
   <div class="row">
     <div class="col-md-6 copyright" align="left">
        {% if site.carpentry == "swc" %}
-       Copyright &copy; 2018–{{ 'now' | date: "%Y" }}
-       <a href="{{ site.carpentries_site }}">The Carpentries</a>
+       Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
+       by <a href="{{ site.carpentries_site }}">The Carpentries</a>
         <br>
-        Copyright &copy; 2016–2018
-       <a href="{{ site.swc_site }}">Software Carpentry Foundation</a>
+        Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–2018
+       by <a href="{{ site.swc_site }}">Software Carpentry Foundation</a>
        {% elsif site.carpentry == "dc" %}
-       Copyright &copy; 2018–{{ 'now' | date: "%Y" }}
-       <a href="{{ site.carpentries_site }}">The Carpentries</a>
+       Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
+       by <a href="{{ site.carpentries_site }}">The Carpentries</a>
         <br>
-        Copyright &copy; 2016–2018
-       <a href="{{ site.dc_site }}">Data Carpentry</a>
+        Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–2018
+       by <a href="{{ site.dc_site }}">Data Carpentry</a>
        {% elsif site.carpentry == "lc" %}
-       Copyright &copy; 2016–{{ 'now' | date: "%Y" }}
-       <a href="{{ site.lc_site }}">Library Carpentry</a>
+       Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2016–{{ 'now' | date: "%Y" }}
+       by <a href="{{ site.lc_site }}">Library Carpentry</a>
        {% elsif site.carpentry == "cp" %}
-       Copyright &copy; 2018–{{ 'now' | date: "%Y" }}
-       <a href="{{ site.carpentries_site }}">The Carpentries</a>
+       Licensed under <a href="{{ site.cc_by_human }}">CC-BY 4.0</a> 2018–{{ 'now' | date: "%Y" }}
+       by <a href="{{ site.carpentries_site }}">The Carpentries</a>
        {% endif %}
     </div>
     <div class="col-md-6 help-links" align="right">
diff --git a/_includes/workshop_calendar.html b/_includes/workshop_calendar.html
new file mode 100644 (file)
index 0000000..53a0eac
--- /dev/null
@@ -0,0 +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>
index 99d6567434a839aaeb0ad1f08f701c1483098af9..8a2e4b5134a8857d377f6bd7c2e7bc3a2cfaf119 100644 (file)
@@ -1,5 +1,21 @@
 ---
 ---
+
+{% comment %}
+When rendering websites locally, `site.github.url` doesn't get resolved
+properly unless GitHub PAT are set up and available in the environment.
+This leads to warnings and errors when trying to serve the site locally.
+To work around this, we use the `jekyll.environment` variable which is set to
+`development` when rendering the site locally, and set to `production` on
+GitHub where `site.github.url` will be defined.
+{% endcomment %}
+
+{% if jekyll.environment == "development" %}
+{% assign search_domain_url = "" %}
+{% elsif jekyll.environment == "production" %}
+{% assign search_domain_url = site.github.url  %}
+{% endif %}
+
 <!doctype html>
 <html lang="en">
   <head>
@@ -8,7 +24,7 @@
     <meta http-equiv="last-modified" content="{{ site.time }}">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <!-- meta "search-domain" used for google site search function google_search() -->
-    <meta name="search-domain" value="{{ site.github.url }}">
+    <meta name="search-domain" value="{{ search_domain_url }}">
     <link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/bootstrap.css" />
     <link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/bootstrap-theme.css" />
     <link rel="stylesheet" type="text/css" href="{{ page.root }}/assets/css/lesson.css" />
index c32d7743fb8768c9420bfdb525732bad97bfb916..d5662e065bfaf5580423c89ad5955d469d2d42ed 100644 (file)
@@ -29,10 +29,10 @@ $color-testimonial: #fc8dc1 !default;
 //----------------------------------------
 
 @mixin cdSetup($color) {
-  color: $color;
-  border-left: solid 5px $color;
-  margin-bottom: 0px;
-  border-radius: 4px 0 0 4px;
+    color: $color;
+    border-left: solid 5px $color;
+    margin: 15px;
+    border-radius: 4px 0 0 4px;
 }
 
 .error  { @include cdSetup($color-error); }
@@ -81,8 +81,11 @@ $codeblock-padding: 5px !default;
   padding-right: 0;
   border: 1px solid;
   border-color: $color;
+  border-radius: 4px;
   padding-bottom: $codeblock-padding;
 
+  margin: 15px;
+
   h2 {
     padding-top: $codeblock-padding;
     padding-bottom: $codeblock-padding;
@@ -126,6 +129,10 @@ $codeblock-padding: 5px !default;
 font-size: 18px;
 }
 
+blockquote p {
+    margin: 5px;
+}
+
 //----------------------------------------
 // Override Bootstrap settings.
 //----------------------------------------
@@ -158,7 +165,7 @@ article img {
 footer .copyright,
 footer .help-links
 {
-    font-size: 18px;
+    font-size: inherit;
     margin-top: 10px;
     margin-bottom: 10px;
     font-weight: 500;
diff --git a/bin/boilerplate/CODE_OF_CONDUCT.md b/bin/boilerplate/CODE_OF_CONDUCT.md
deleted file mode 100644 (file)
index c3b9669..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
----
-layout: page
-title: "Contributor Code of Conduct"
----
-As contributors and maintainers of this project,
-we pledge to follow the [Carpentry Code of Conduct][coc].
-
-Instances of abusive, harassing, or otherwise unacceptable behavior
-may be reported by following our [reporting guidelines][coc-reporting].
-
-{% include links.md %}
index c98cb184c94df8921357ea344cc8e61a08a92777..5d6beb1d08c38eac79cb22a30237421c89164fff 100644 (file)
@@ -43,11 +43,19 @@ template_repo: "https://github.com/carpentries/styles"
 training_site: "https://carpentries.github.io/instructor-training"
 workshop_repo: "https://github.com/carpentries/workshop-template"
 workshop_site: "https://carpentries.github.io/workshop-template"
+cc_by_human: "https://creativecommons.org/licenses/by/4.0/"
 
 # Surveys.
-pre_survey: "https://www.surveymonkey.com/r/swc_pre_workshop_v1?workshop_id="
-post_survey: "https://www.surveymonkey.com/r/swc_post_workshop_v1?workshop_id="
+swc_pre_survey: "https://www.surveymonkey.com/r/swc_pre_workshop_v1?workshop_id="
+swc_post_survey: "https://www.surveymonkey.com/r/swc_post_workshop_v1?workshop_id="
 training_post_survey: "https://www.surveymonkey.com/r/post-instructor-training"
+dc_pre_survey: "https://www.surveymonkey.com/r/dcpreworkshopassessment?workshop_id="
+dc_post_survey: "https://www.surveymonkey.com/r/dcpostworkshopassessment?workshop_id="
+lc_pre_survey: "https://www.surveymonkey.com/r/lcpreworkshopsurvey?workshop_id="
+lc_post_survey: "https://www.surveymonkey.com/r/lcpostworkshopsurvey?workshop_id="
+instructor_pre_survey: "https://www.surveymonkey.com/r/instructor_training_pre_survey?workshop_id="
+instructor_post_survey: "https://www.surveymonkey.com/r/instructor_training_post_survey?workshop_id="
+
 
 # Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am).
 start_time: 0
index a96ba383a4046c39527d771872e6158867e502ba..a5eb6d05c63df3ba1d757b00b920241db3907b30 100755 (executable)
@@ -11,7 +11,6 @@ BOILERPLATE = (
     '.travis.yml',
     'AUTHORS',
     'CITATION',
-    'CODE_OF_CONDUCT.md',
     'CONTRIBUTING.md',
     'README.md',
     '_config.yml',