Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
swc-bb
swc-pages
2019-11-26-Potsdam-Berlin-Python
Commits
5aaa87a4
Commit
5aaa87a4
authored
Nov 05, 2017
by
Raniere Silva
Browse files
Add "Offline" Capable
This is based on
https://github.com/swcarpentry/lesson-example/pull/127/
.
parent
5edc669e
Changes
3
Hide whitespace changes
Inline
Side-by-side
_includes/main_title.html
View file @
5aaa87a4
{% comment %}
Main title for lesson pages.
{% endcomment %}
<h1
class=
"maintitle"
><a
href=
"{{ page.root }}
/
"
>
{{ site.title }}
</a>
{% if page.title %}: {{ page.title }}{% endif %}
</h1>
<h1
class=
"maintitle"
><a
href=
"{{ page.root }}
{% link index.md %}
"
>
{{ site.title }}
</a>
{% if page.title %}: {{ page.title }}{% endif %}
</h1>
_includes/navbar.html
View file @
5aaa87a4
...
...
@@ -12,33 +12,35 @@
</button>
{% comment %} Select what logo to display. {% endcomment %}
{% if
sit
e.carpentry == "swc" %}
{% if
pag
e.carpentry == "swc" %}
<a
href=
"{{ site.swc_site }}"
class=
"pull-left"
>
<img
class=
"navbar-logo"
src=
"{{ page.root }}/assets/img/swc-icon-blue.svg"
alt=
"Software Carpentry logo"
/>
</a>
{% elsif
sit
e.carpentry == "dc" %}
{% elsif
pag
e.carpentry == "dc" %}
<a
href=
"{{ site.dc_site }}"
class=
"pull-left"
>
<img
class=
"navbar-logo"
src=
"{{ page.root }}/assets/img/dc-icon-black.svg"
alt=
"Data Carpentry logo"
/>
</a>
{% elsif
sit
e.carpentry == "lc" %}
{% elsif
pag
e.carpentry == "lc" %}
<a
href=
"{{ site.lc_site }}"
class=
"pull-left"
>
<img
class=
"navbar-logo"
src=
"{{ page.root }}/assets/img/lc-icon-black.png"
alt=
"Library Carpentry logo"
/>
</a>
{% endif %}
{% comment %} Always show link to home page. {% endcomment %}
<a
class=
"navbar-brand"
href=
"{{ page.root }}
/
"
>
Home
</a>
<a
class=
"navbar-brand"
href=
"{{ page.root }}
{% link index.md %}
"
>
Home
</a>
</div>
<div
class=
"collapse navbar-collapse"
id=
"bs-example-navbar-collapse-1"
>
<ul
class=
"nav navbar-nav"
>
{% comment %} Always show code of conduct. {% endcomment %}
<li><a
href=
"{{ page.root }}
/conduct/
"
>
Code of Conduct
</a></li>
<li><a
href=
"{{ page.root }}
{% link CONDUCT.md %}
"
>
Code of Conduct
</a></li>
{% comment %} Show setup instructions, reference guide, and lesson episodes for lessons. {% endcomment %}
{% if site.kind == "lesson" %}
<li><a
href=
"{{ page.root }}/setup/"
>
Setup
</a></li>
{% comment %} Show setup instructions. {% endcomment %}
<li><a
href=
"{{ page.root }}{% link setup.md %}"
>
Setup
</a></li>
{% comment %} Show lesson episodes for lessons. {% endcomment %}
<li
class=
"dropdown"
>
<a
href=
"{{ page.root }}/"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
role=
"button"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Episodes
<span
class=
"caret"
></span></a>
<ul
class=
"dropdown-menu"
>
...
...
@@ -46,7 +48,7 @@
<li><a
href=
"{{ page.root }}{{ episode.url }}"
>
{{ episode.title }}
</a></li>
{% endfor %}
<li
role=
"separator"
class=
"divider"
></li>
<li><a
href=
"{{ page.root }}
/aio/
"
>
All in one page (Beta)
</a></li>
<li><a
href=
"{{ page.root }}
{% link aio.md %}
"
>
All in one page (Beta)
</a></li>
</ul>
</li>
{% endif %}
...
...
@@ -56,7 +58,7 @@
<li
class=
"dropdown"
>
<a
href=
"{{ page.root }}/"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
role=
"button"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Extras
<span
class=
"caret"
></span></a>
<ul
class=
"dropdown-menu"
>
<li><a
href=
"{{ page.root }}
/
reference
/
"
>
Reference
</a></li>
<li><a
href=
"{{ page.root }}
{% link
reference
.md %}
"
>
Reference
</a></li>
{% for extra in site.extras %}
<li><a
href=
"{{ page.root }}{{ extra.url }}"
>
{{ extra.title }}
</a></li>
{% endfor %}
...
...
@@ -65,7 +67,7 @@
{% endif %}
{% comment %} Always show license. {% endcomment %}
<li><a
href=
"{{ page.root }}
/license/
"
>
License
</a></li>
<li><a
href=
"{{ page.root }}
{% link LICENSE.md %}
"
>
License
</a></li>
{% if page.source %}
{% if page.source == "Rmd" %}
<li><a
href=
"{{site.github.repository_url}}/edit/gh-pages/{{page.path|replace: "
_episodes
",
"
_episodes_rmd
"
|
replace:
".
md
",
".
Rmd
"}}"
>
Improve this page
<span
class=
"glyphicon glyphicon-pencil"
aria-hidden=
"true"
></span></a></li>
...
...
bin/lesson_initialize.py
View file @
5aaa87a4
...
...
@@ -222,9 +222,10 @@ start_time: 0
collections:
episodes:
output: true
permalink: /:path/
permalink: /:path/
index.html
extras:
output: true
permalink: /:path/index.html
# Set the default layout for things in the episodes collection.
defaults:
...
...
@@ -249,6 +250,7 @@ ROOT_INDEX_MD = '''\
---
layout: lesson
root: .
permalink: index.html # Is the only page that don't follow the partner /:path/index.html
---
FIXME: home page introduction
...
...
@@ -261,7 +263,6 @@ FIXME: home page introduction
ROOT_REFERENCE_MD
=
'''
\
---
layout: reference
permalink: /reference/
---
## Glossary
...
...
@@ -273,7 +274,6 @@ ROOT_SETUP_MD = '''\
---
layout: page
title: Setup
permalink: /setup/
---
FIXME
'''
...
...
@@ -281,7 +281,6 @@ FIXME
ROOT_AIO_MD
=
'''
\
---
layout: page
permalink: /aio/
---
<script>
window.onload = function() {
...
...
@@ -335,7 +334,6 @@ EXTRAS_ABOUT_MD = '''\
---
layout: page
title: About
permalink: /about/
---
{% include carpentries.html %}
'''
...
...
@@ -344,7 +342,6 @@ EXTRAS_DISCUSS_MD = '''\
---
layout: page
title: Discussion
permalink: /discuss/
---
FIXME
'''
...
...
@@ -353,7 +350,6 @@ EXTRAS_FIGURES_MD = '''\
---
layout: page
title: Figures
permalink: /figures/
---
{% include all_figures.html %}
'''
...
...
@@ -362,7 +358,6 @@ EXTRAS_GUIDE_MD = '''\
---
layout: page
title: "Instructor Notes"
permalink: /guide/
---
FIXME
'''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment