Skip to content

Commit

Permalink
Replicate infrastructure from Day 1
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-crouch committed Aug 28, 2019
1 parent cc64bdd commit 939c3f7
Show file tree
Hide file tree
Showing 134 changed files with 33,620 additions and 39 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.pyc
*~
.DS_Store
.ipynb
.ipynb_checkpoints
.sass-cache
.jekyll-cache/
__pycache__
_site
.Rproj.user
.Rhistory
.RData
.idea/
_site/
venv/
30 changes: 28 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ JEKYLL=jekyll
JEKYLL_VERSION=3.8.5
PARSER=bin/markdown_ast.rb
DST=_site
SLIDES_DIR=slides
SLIDES_MD=$(wildcard $(SLIDES_DIR)/[0-9][0-9]-*.md)
SLIDES_HTML=$(patsubst %.md, %.html, $(SLIDES_MD))
SLIDES_THEME=white

# Controls
.PHONY : commands clean files
Expand All @@ -22,11 +26,11 @@ docker-serve :
docker run --rm -it -v ${PWD}:/srv/jekyll -p 127.0.0.1:4000:4000 jekyll/jekyll:${JEKYLL_VERSION} make serve

## serve : run a local server.
serve : lesson-md
serve : lesson-md slides
${JEKYLL} serve

## site : build files but do not run a server.
site : lesson-md
site : lesson-md slides
${JEKYLL} build

# repo-check : check repository settings.
Expand All @@ -38,6 +42,8 @@ clean :
@rm -rf ${DST}
@rm -rf .sass-cache
@rm -rf bin/__pycache__
@rm -f ${SLIDES_HTML}
@rm -f ${SLIDES_DIR}/index.html
@find . -name .DS_Store -exec rm {} \;
@find . -name '*~' -exec rm {} \;
@find . -name '*.pyc' -exec rm {} \;
Expand Down Expand Up @@ -119,3 +125,23 @@ lesson-fixme :
#-------------------------------------------------------------------------------

-include commands.mk

.PHONY: slides
slides: $(SLIDES_HTML) $(SLIDES_DIR)/index.html

$(SLIDES_DIR)/index.html: $(SLIDES_DIR)/index.md
@cd $(SLIDES_DIR)
pandoc $< -o $@ -s
@cd ..

$(SLIDES_DIR)/%.html: $(SLIDES_DIR)/%.md
@cd $(SLIDES_DIR)
pandoc -t revealjs -s -o $@ $< -V theme=$(SLIDES_THEME)
@cd ..

.PHONY: variables
variables:
@echo SLDIES_MD: $(SLIDES_MD)
@echo SLIDES_HTML: $(SLIDES_HTML)
@echo THEME: $(THEME)

5 changes: 3 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kind: "lesson"
repository: <USERNAME>/<PROJECT>

# Email address, no mailto:
email: "[email protected]"
email: "[email protected]"

# Sites.
amy_site: "https://amy.software-carpentry.org/workshops"
Expand Down Expand Up @@ -62,7 +62,7 @@ instructor_post_survey: "https://www.surveymonkey.com/r/instructor_training_post


# Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am).
start_time: 0
start_time: 570

# Specify that things in the episodes collection should be output.
collections:
Expand Down Expand Up @@ -96,6 +96,7 @@ exclude:
- Makefile
- bin/
- .Rproj.user/
- venv/

# Turn on built-in syntax highlighting.
highlighter: rouge
2 changes: 1 addition & 1 deletion _includes/carpentries.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>
<div class="row">
<div class="col-md-2" align="center">
<a href="{{ site.swc_site }}"><img src="{{ relative_root_path }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo" /></a>
<a href="{{ site.swc_site }}"><img src="{{ relative_root_path }}/assets/img/sabs-logo.png" alt="Software Carpentry logo" /></a>
</div>
<div class="col-md-8">
<p>Since 1998, <a href="{{ site.swc_site }}">Software Carpentry</a> has
Expand Down
26 changes: 2 additions & 24 deletions _includes/lesson_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,17 @@
<footer>
<div class="row">
<div class="col-md-6 copyright" align="left">
<!--
{% if site.carpentry == "swc" %}
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>
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" %}
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>
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" %}
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" %}
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">
{% if page.source %}
{% if page.source == "Rmd" %}
<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path|replace: "_episodes", "_episodes_rmd" | replace: ".md", ".Rmd"}}" data-checker-ignore>Edit on GitHub</a>
{% endif %}
{% else %}
<a href="{{repo_url}}/edit/{{ default_branch }}/{{page.path}}" data-checker-ignore>Edit on GitHub</a>
{% endif %}
/
<a href="{{ repo_url }}/blob/{{ source_branch }}/CONTRIBUTING.md" data-checker-ignore>Contributing</a>
/
<a href="{{ repo_url }}/">Source</a>
/
<a href="{{ repo_url }}/blob/{{ source_branch }}/CITATION" data-checker-ignore>Cite</a>
/
<a href="mailto:{{ site.email }}">Contact</a>
Expand Down
9 changes: 1 addition & 8 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{% comment %} Select what logo to display. {% endcomment %}
{% if site.carpentry == "swc" %}
<a href="{{ site.swc_site }}" class="pull-left">
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/swc-icon-blue.svg %}" alt="Software Carpentry logo" />
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/sabs-logo.png %}" alt="Software Carpentry logo" />
</a>
{% elsif site.carpentry == "dc" %}
<a href="{{ site.dc_site }}" class="pull-left">
Expand Down Expand Up @@ -75,13 +75,6 @@

{% comment %} Always show license. {% endcomment %}
<li><a href="{{ relative_root_path }}{% link LICENSE.md %}">License</a></li>
{% if page.source %}
{% if page.source == "Rmd" %}
<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>
{% endif %}
{% else %}
<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>
{% endif %}
</ul>
<form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
<div class="form-group">
Expand Down
4 changes: 2 additions & 2 deletions assets/css/lesson.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ footer .help-links
}

img.navbar-logo {
height: 40px; // synchronize with height of navbar
padding-top: 5px;
height: 50px; // synchronize with height of navbar
padding-top: 2px;
padding-right: 10px;
}

Expand Down
Binary file added assets/img/sabs-logo-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/sabs-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ FIXME: home page introduction
> FIXME
{: .prereq}

# Slides
Slides are accessible [here](/slides/index.html).

{% include links.md %}
67 changes: 67 additions & 0 deletions slides/01-introduction.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<meta name="author" content="SSI">
<title>SABS</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="reveal.js/css/reveal.css">
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="reveal.js/css/theme/white.css" id="theme">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'reveal.js/css/print/pdf.css' : 'reveal.js/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="reveal.js/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">

<section id="title-slide">
<h1 class="title">SABS</h1>
<p class="author">SSI</p>
</section>

<section id="day-2-intro" class="slide level1">
<h1>Day 2 intro</h1>
<p>Introduction</p>
</section>
</div>
</div>

<script src="reveal.js/lib/js/head.min.js"></script>
<script src="reveal.js/js/reveal.js"></script>

<script>

// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
// Push each slide change to the browser history
history: true,

// Optional reveal.js plugins
dependencies: [
{ src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'reveal.js/plugin/zoom-js/zoom.js', async: true },
{ src: 'reveal.js/plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>
5 changes: 5 additions & 0 deletions slides/01-introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% SABS
% SSI

# Day 2 intro
Introduction
26 changes: 26 additions & 0 deletions slides/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Slides</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header>
<h1 class="title">Slides</h1>
</header>
<ul>
<li><a href="01-introduction.html">01 Introduction</a></li>
</ul>
</body>
</html>
3 changes: 3 additions & 0 deletions slides/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
% Slides

- [01 Introduction](01-introduction.html)
13 changes: 13 additions & 0 deletions slides/reveal.js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.idea/
*.iml
*.iws
*.eml
out/
.DS_Store
.svn
log/*.log
tmp/**
node_modules/
.sass-cache
css/reveal.min.css
js/reveal.min.js
5 changes: 5 additions & 0 deletions slides/reveal.js/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- 11
after_script:
- npm run build -- retire
23 changes: 23 additions & 0 deletions slides/reveal.js/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Contributing

Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**.


### Personal Support
If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js).


### Bug Reports
When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested.


### Pull Requests
- Should follow the coding style of the file you work in, most importantly:
- Tabs to indent
- Single-quoted strings
- Should be made towards the **dev branch**
- Should be submitted from a feature/topic branch (not your master)


### Plugins
Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines
19 changes: 19 additions & 0 deletions slides/reveal.js/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (C) 2019 Hakim El Hattab, http://hakim.se, and reveal.js contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit 939c3f7

Please sign in to comment.