summaryrefslogtreecommitdiffstats
path: root/theme
diff options
context:
space:
mode:
Diffstat (limited to 'theme')
-rwxr-xr-xtheme/javascript/core/state.js1
-rwxr-xr-xtheme/javascript/gitbook.js5
-rw-r--r--theme/templates/page.html11
-rw-r--r--theme/templates/site.html2
4 files changed, 10 insertions, 9 deletions
diff --git a/theme/javascript/core/state.js b/theme/javascript/core/state.js
index 2f7c633..de5c65c 100755
--- a/theme/javascript/core/state.js
+++ b/theme/javascript/core/state.js
@@ -7,7 +7,6 @@ define([
var $book = $(dom.find(".book"));
state.$book = $book;
- state.githubId = $book.data("github");
state.level = $book.data("level");
state.basePath = $book.data("basepath");
state.revision = $book.data("revision");
diff --git a/theme/javascript/gitbook.js b/theme/javascript/gitbook.js
index 0682b2f..77c7ae0 100755
--- a/theme/javascript/gitbook.js
+++ b/theme/javascript/gitbook.js
@@ -18,11 +18,6 @@ define([
var $book;
$book = state.$book;
- if (state.githubId) {
- // Initialize storage
- storage.setBaseKey(state.githubId);
- }
-
// Init sidebar
sidebar.init();
diff --git a/theme/templates/page.html b/theme/templates/page.html
index 9c58ab1..5966cda 100644
--- a/theme/templates/page.html
+++ b/theme/templates/page.html
@@ -4,6 +4,13 @@
{% block style %}
<link rel="stylesheet" href="{{ staticBase }}/print.css">
+{% for resource in plugins.resources.css %}
+ {% if resource.url %}
+ <link rel="stylesheet" href="{{ resource.url }}">
+ {% else %}
+ <link rel="stylesheet" href="{{ staticBase }}/plugins/{{ resource.path }}">
+ {% endif %}
+{% endfor %}
{% endblock %}
@@ -41,7 +48,7 @@
<article id="{{ article.path }}">
<h1 class="book-chapter book-chapter-{{ item.level|lvl }}">{{ item.title }}</h1>
{% if pages[item.path] %}
- {{ articleContent(pages[item.path].content) }}
+ {{ articleContent(pages[item.path].sections) }}
{% endif %}
</article>
{% endfor %}
@@ -56,7 +63,7 @@
{% for item in progress.chapters %}
{% if pages[item.path] %}
- {% for section in pages[item.path].content %}
+ {% for section in pages[item.path].sections %}
{% if section.type == "exercise" %}
<div class="exercise">
<div class="exercise-header">Exercise #{{ exercise }}</div>
diff --git a/theme/templates/site.html b/theme/templates/site.html
index 7db7449..cf90c9a 100644
--- a/theme/templates/site.html
+++ b/theme/templates/site.html
@@ -17,7 +17,7 @@
{% block description %}{% if progress.current.level == "0" %}{{ description }}{% endif %}{% endblock %}
{% block content %}
- <div class="book" {% if githubId %}data-github="{{ githubId }}"{% endif %} data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}">
+ <div class="book" data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}">
{% include "includes/book/summary.html" %}
<div class="book-body">
<div class="body-inner">