Add printable version

This commit is contained in:
rubenwardy 2015-01-01 17:14:18 +00:00
parent a1ed450be8
commit df92b4e95d
3 changed files with 18 additions and 0 deletions

View File

@ -19,6 +19,7 @@
{% assign hr = false %} {% assign hr = false %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<li><a id="printable">Printable Version</a><li>
</ul> </ul>
<div id="page"> <div id="page">
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>

View File

@ -1,4 +1,8 @@
$(function() { $(function() {
$("#printable").click(function() {
$("body").addClass("printable");
});
return $("h2, h3, h4, h5, h6").each(function(i, el) { return $("h2, h3, h4, h5, h6").each(function(i, el) {
var $el, icon, id; var $el, icon, id;
$el = $(el); $el = $(el);

View File

@ -5,6 +5,18 @@ html, body {
background: #333; background: #333;
} }
.printable #navbar{
display: none;
}
.printable #page {
left: 0;
}
.printable .header-link {
display: none !important;
}
a { a {
color: blue; color: blue;
text-decoration: underline; text-decoration: underline;
@ -81,6 +93,7 @@ figure {
padding: 5px; padding: 5px;
color: #ccc; color: #ccc;
text-decoration: none; text-decoration: none;
cursor: pointer;
} }
#navbar li:nth-child(odd) a { #navbar li:nth-child(odd) a {