summaryrefslogtreecommitdiffstats
path: root/theme
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-06-02 11:00:22 +0200
committerSamy Pessé <samypesse@gmail.com>2015-06-02 11:00:22 +0200
commita9a230dfc31d9d5092adda51344b0c9f725d9788 (patch)
treee9b864c6c0e08d37afce0df70b1a9bffdb3f94a9 /theme
parent13fb949d6818bc47a2215ee788c392fa38e1e1d6 (diff)
parent6d53e5277100fe6a9372dea4ab9d70c769a28176 (diff)
downloadgitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.zip
gitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.tar.gz
gitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.tar.bz2
Merge pull request #781 from GitbookIO/fix/775
Fix #775: add optional print.css style
Diffstat (limited to 'theme')
-rw-r--r--theme/templates/ebook/page.html4
-rw-r--r--theme/templates/website/page.html2
2 files changed, 4 insertions, 2 deletions
diff --git a/theme/templates/ebook/page.html b/theme/templates/ebook/page.html
index 0951c27..f207184 100644
--- a/theme/templates/ebook/page.html
+++ b/theme/templates/ebook/page.html
@@ -3,7 +3,9 @@
{% block title %}{{ progress.current.title }} | {{ title }}{% endblock %}
{% block style %}
+ {% if not styles.print %}
<link rel="stylesheet" href="{{ staticBase }}/print.css">
+ {% endif %}
{% for resource in plugins.resources.css %}
{% if resource.url %}
<link rel="stylesheet" href="{{ resource.url }}">
@@ -11,7 +13,7 @@
<link rel="stylesheet" href="{{ staticBase }}/plugins/{{ resource.path }}">
{% endif %}
{% endfor %}
- {% for style in styles %}
+ {% for type, style in styles %}
<link rel="stylesheet" href="{{ basePath }}/{{ style }}">
{% endfor %}
{% endblock %}
diff --git a/theme/templates/website/page.html b/theme/templates/website/page.html
index 37fc9dd..7f424e1 100644
--- a/theme/templates/website/page.html
+++ b/theme/templates/website/page.html
@@ -70,7 +70,7 @@ require(["gitbook"], function(gitbook) {
<link rel="stylesheet" href="{{ staticBase }}/plugins/{{ resource.path }}">
{% endif %}
{% endfor %}
- {% for style in styles %}
+ {% for type, style in styles %}
<link rel="stylesheet" href="{{ basePath }}/{{ style }}">
{% endfor %}
{% endblock %}