diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-06-02 10:23:31 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-06-02 10:23:31 +0200 |
commit | 52e10b7cfe9c79eb3b8d2a6a5d9540f46d6914df (patch) | |
tree | 206083b7aa2a4285e0c059dc4fab4449c0607930 /theme | |
parent | addac85696aa836f504993b5536b3ecbf7c124c5 (diff) | |
download | gitbook-52e10b7cfe9c79eb3b8d2a6a5d9540f46d6914df.zip gitbook-52e10b7cfe9c79eb3b8d2a6a5d9540f46d6914df.tar.gz gitbook-52e10b7cfe9c79eb3b8d2a6a5d9540f46d6914df.tar.bz2 |
Remove default print.css when styles/print.css is present
Diffstat (limited to 'theme')
-rw-r--r-- | theme/templates/ebook/layout.html | 2 | ||||
-rw-r--r-- | theme/templates/ebook/page.html | 4 | ||||
-rw-r--r-- | theme/templates/website/page.html | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/theme/templates/ebook/layout.html b/theme/templates/ebook/layout.html index c2501b6..982618f 100644 --- a/theme/templates/ebook/layout.html +++ b/theme/templates/ebook/layout.html @@ -11,11 +11,11 @@ {% if options.author %}<meta name="author" content="{{ options.author }}">{% endif %} {% if options.isbn %}<meta name="identifier" content="{{ options.isbn }}" scheme="ISBN">{% endif %} {% block head %}{% endblock %} + {% block style %}{% endblock %} {{ htmlSnippet("head:end")|default("", true)|safe }} </head> <body> {{ htmlSnippet("body:start")|default("", true)|safe }} - {% block style %}{% endblock %} {% block content %}{% endblock %} {% block javascript %}{% endblock %} {{ htmlSnippet("body:end")|default("", true)|safe }} 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 %} |