Skip to content

Commit

Permalink
Boilerplate code as used in esb1math
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca De Feo committed Dec 9, 2013
1 parent be81577 commit bb0e9ab
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
_site/
*~
3 changes: 3 additions & 0 deletions LICENCE.md
@@ -0,0 +1,3 @@
This work is licensed under the Creative Commons Attribution-ShareAlike
4.0 International License. To view a copy of this license, visit
<http://creativecommons.org/licenses/by-sa/4.0/deed.en_GB>.
4 changes: 2 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
class-boilerplate
Class Boilerplate
=================

Boilerplate code for class material
Boilerplate Jekyll code for class material.
5 changes: 5 additions & 0 deletions _config.yml
@@ -0,0 +1,5 @@
baseurl: /class-boilerplate
github_base: https://github.com/defeo/class-boilerplate/blob/gh-pages
permalink: /:categories/:title

markdown: kramdown
13 changes: 13 additions & 0 deletions _layouts/index.html
@@ -0,0 +1,13 @@
---
layout: main
---

{{ content }}

<h2>Page list</h2>

<ul>
{% for post in site.posts %}
<li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
102 changes: 102 additions & 0 deletions _layouts/main.html
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<head lang="en">
<meta charset="utf-8">
<title>{{ page.title }}</title>

<style>
footer {
border-top: solid thin black;
font-size: smaller;
margin-top: 4ex;
}
body {
width: 85%;
min-width: 200px;
margin: auto;
padding-left: 20px;
counter-reset: section;
}
h1, h2, footer { margin-left: -20px }
h2:before {
counter-increment: section;
content: counter(section) ". ";
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
dt {
font-weight: bold;
}
ul.menu {
list-style-type: none;
}
.menu li {
display: inline-block;
border-right: solid thin;
padding: 0 1ex;
}
.menu li:last-child {
border-right: none;
}
table { border-collapse: collapse }
td { padding: 1ex; }
.centered {
display: block;
margin: auto;
text-align: center;
}

@media print {
.dont-print { display: none }
body { font-size: 9pt }
a.print-link:after { content: " <" attr(href) ">" }
h1, h2, h3, h4 { page-break-after: avoid }
.force-page-break { page-break-after: always }
}
</style>

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/TeX","input/AsciiMath","output/HTML-CSS","output/NativeMML"],
extensions: ["MathMenu.js","MathZoom.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"],
}
});
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="https://github.com/defeo{{ site.baseurl }}/commits/gh-pages.atom" rel="alternate" title="Recent Commits to {{ site.baseurl }}:gh-pages" type="application/atom+xml" />
</head>
<body>

<div class="container">

{{ content }}

</div>

<footer class="footer">
<div class="container">
<p><a rel="license"
href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons Licence" style="border-width:0"
src="http://i.creativecommons.org/l/by-sa/4.0/80x15.png"/>
</a> <a href="http://defeo.lu" class="print-link">Luca De
Feo</a> {{ site.time | date:"%Y" }}, licensed
under <a rel="license" class="print-link"
href="http://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA
4.0</a>.</p>

<p class="dont-print">Source code available
on <a href="https://github.com/defeo{{ site.baseurl }}">GitHub</a>,
static Website generated
with <a href="http://jekyllrb.com/">Jekyll</a> and kindly
hosted by <a href="http://pages.github.com/">GitHub</a>.</p>
</div>
</footer>
</body>
</html>
13 changes: 13 additions & 0 deletions _layouts/post.html
@@ -0,0 +1,13 @@
---
layout: main
---

<ul class="menu dont-print">
<li><a href="{{ site.baseurl }}/">Home</a></li>
<li><a href="{{ site.github_base }}/{{ page.path }}">Source</a></li>
<li><a href="javascript:window.print()">Print</a></li>
</ul>

<h1>{{ page.title }}</h1>

{{ content }}
9 changes: 9 additions & 0 deletions index.md
@@ -0,0 +1,9 @@
---
layout: index
---

# Class boilerplate

This page is generated by [Jekyll](http://jekyllrb.com/) from
boilerplate code at <https://github.com/defeo/class-boilerplate>. It
is a skeleton used for my [class material](http://defeo.lu/#teaching).

0 comments on commit bb0e9ab

Please sign in to comment.