summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-10-08 20:58:57 +0200
committerSamy Pessé <samypesse@gmail.com>2015-10-08 20:58:57 +0200
commit4ae5b2e05001df9bdf8c5b64f8a82725e14d6414 (patch)
tree2e4397d33f90ee7bf1034ec4dea1237e611aff36
parentce1e0e187339976fc3cae7ef70bcfdd0eaf68981 (diff)
parent4369bd8f5e39b1b3563e527fb78c16fc3b34b597 (diff)
downloadgitbook-4ae5b2e05001df9bdf8c5b64f8a82725e14d6414.zip
gitbook-4ae5b2e05001df9bdf8c5b64f8a82725e14d6414.tar.gz
gitbook-4ae5b2e05001df9bdf8c5b64f8a82725e14d6414.tar.bz2
Merge pull request #959 from GitbookIO/improvements/ebooks
Improvements for ebooks
-rw-r--r--.gitignore3
-rwxr-xr-xbin/gitbook.js6
-rw-r--r--gulpfile.js33
-rw-r--r--lib/configuration.js5
-rw-r--r--lib/generators/ebook.js144
-rw-r--r--lib/generators/website.js76
-rw-r--r--lib/utils/fs.js47
-rw-r--r--package.json3
-rw-r--r--test/ebook.js46
-rw-r--r--test/website.js22
-rw-r--r--theme/assets/ebook/ebook.css1
-rw-r--r--theme/assets/ebook/epub.css1
-rw-r--r--theme/assets/ebook/mobi.css1
-rw-r--r--theme/assets/ebook/pdf.css1
-rwxr-xr-xtheme/assets/print.css1
-rw-r--r--theme/assets/website/app.js (renamed from theme/assets/app.js)0
-rw-r--r--theme/assets/website/fonts/fontawesome/FontAwesome.otf (renamed from theme/assets/fonts/fontawesome/FontAwesome.otf)bin75188 -> 75188 bytes
-rwxr-xr-xtheme/assets/website/fonts/fontawesome/fontawesome-webfont.eot (renamed from theme/assets/fonts/fontawesome/fontawesome-webfont.eot)bin72449 -> 72449 bytes
-rwxr-xr-xtheme/assets/website/fonts/fontawesome/fontawesome-webfont.svg (renamed from theme/assets/fonts/fontawesome/fontawesome-webfont.svg)0
-rwxr-xr-xtheme/assets/website/fonts/fontawesome/fontawesome-webfont.ttf (renamed from theme/assets/fonts/fontawesome/fontawesome-webfont.ttf)bin141564 -> 141564 bytes
-rwxr-xr-xtheme/assets/website/fonts/fontawesome/fontawesome-webfont.woff (renamed from theme/assets/fonts/fontawesome/fontawesome-webfont.woff)bin83760 -> 83760 bytes
-rw-r--r--theme/assets/website/images/apple-touch-icon-precomposed-152.png (renamed from theme/assets/images/apple-touch-icon-precomposed-152.png)bin92815 -> 92815 bytes
-rw-r--r--theme/assets/website/images/favicon.ico (renamed from theme/assets/images/favicon.ico)bin4286 -> 4286 bytes
-rwxr-xr-xtheme/assets/website/style.css (renamed from theme/assets/style.css)6
-rw-r--r--theme/stylesheets/base/markdown.less389
-rw-r--r--theme/stylesheets/base/markup.less254
-rw-r--r--[-rwxr-xr-x]theme/stylesheets/base/mixins.less (renamed from theme/stylesheets/mixins.less)14
-rw-r--r--[-rwxr-xr-x]theme/stylesheets/ebook.less44
-rw-r--r--theme/stylesheets/ebook/base.less23
-rw-r--r--theme/stylesheets/ebook/glossary.less28
-rw-r--r--theme/stylesheets/ebook/summary.less56
-rw-r--r--theme/stylesheets/ebook/variables.less6
-rw-r--r--theme/stylesheets/epub.less3
-rw-r--r--theme/stylesheets/mobi.less23
-rw-r--r--theme/stylesheets/pdf.less20
-rwxr-xr-xtheme/stylesheets/website.less5
-rwxr-xr-xtheme/stylesheets/website/markup.less (renamed from theme/stylesheets/website/markdown.less)2
-rw-r--r--theme/stylesheets/website/variables.less2
-rw-r--r--theme/templates/ebook/footer.html8
-rw-r--r--theme/templates/ebook/glossary.html29
-rw-r--r--theme/templates/ebook/header.html7
-rw-r--r--theme/templates/ebook/layout.html2
-rw-r--r--theme/templates/ebook/page.html25
-rw-r--r--theme/templates/ebook/summary.html35
44 files changed, 721 insertions, 650 deletions
diff --git a/.gitignore b/.gitignore
index 204dc58..9550e4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,8 +24,5 @@ build/Release
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
node_modules
-theme/javascript/vendors
-theme/vendors
-
# vim swapfile
*.swp
diff --git a/bin/gitbook.js b/bin/gitbook.js
index 07d1da5..5f47420 100755
--- a/bin/gitbook.js
+++ b/bin/gitbook.js
@@ -2,6 +2,6 @@
var color = require('bash-color');
-console.log(color.red("You need to install 'gitbook-cli' to have access to the gitbook command anywhere on your system."));
-console.log(color.red("If you've installed this package globally, you need to uninstall it."));
-console.log(color.red(">> Run 'npm uninstall -g gitbook' then 'npm install -g gitbook-cli'"));
+console.log(color.red('You need to install "gitbook-cli" to have access to the gitbook command anywhere on your system.'));
+console.log(color.red('If you\'ve installed this package globally, you need to uninstall it.'));
+console.log(color.red('>> Run "npm uninstall -g gitbook" then "npm install -g gitbook-cli"'));
diff --git a/gulpfile.js b/gulpfile.js
index a12c2fb..570b6a0 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1,4 +1,6 @@
+var _ = require('lodash');
var gulp = require('gulp');
+var gutil = require('gulp-util');
var less = require('gulp-less');
var rename = require('gulp-rename');
var minifyCSS = require('gulp-minify-css');
@@ -7,33 +9,36 @@ var mergeStream = require('merge-stream');
var source = require('vinyl-source-stream');
gulp.task('css', function() {
- return mergeStream(
- // Stylesheet for website
- gulp.src('theme/stylesheets/website.less')
- .pipe(less())
- .pipe(minifyCSS())
- .pipe(rename('style.css'))
- .pipe(gulp.dest('theme/assets/')),
+ var merged = mergeStream();
- // Stylesheet for ebooks
- gulp.src('theme/stylesheets/ebook.less')
+ _.each({
+ 'ebook.less': 'ebook/ebook.css',
+ 'pdf.less': 'ebook/pdf.css',
+ 'mobi.less': 'ebook/mobi.css',
+ 'epub.less': 'ebook/epub.css',
+ 'website.less': 'website/style.css'
+ }, function(out, input) {
+ gutil.log('compiling', input, 'into', out);
+ merged.add(gulp.src('theme/stylesheets/'+input)
.pipe(less())
.pipe(minifyCSS())
- .pipe(rename('print.css'))
- .pipe(gulp.dest('theme/assets/'))
- );
+ .pipe(rename(out))
+ .pipe(gulp.dest('theme/assets/')));
+ });
+
+ return merged;
});
gulp.task('js', function() {
return browserify('./theme/javascript/index.js')
.bundle()
.pipe(source('app.js'))
- .pipe(gulp.dest('./theme/assets/'));
+ .pipe(gulp.dest('./theme/assets/website'));
});
gulp.task('assets', function() {
return gulp.src('./node_modules/font-awesome/fonts/*')
- .pipe(gulp.dest('theme/assets/fonts/fontawesome/'));
+ .pipe(gulp.dest('theme/assets/website/fonts/fontawesome/'));
});
gulp.task('default', ['css', 'js', 'assets'], function() {
diff --git a/lib/configuration.js b/lib/configuration.js
index 3b6b47b..7488fae 100644
--- a/lib/configuration.js
+++ b/lib/configuration.js
@@ -1,5 +1,6 @@
var _ = require('lodash');
var Q = require('q');
+var fs = require('fs');
var path = require('path');
var semver = require('semver');
@@ -284,10 +285,10 @@ Configuration.DEFAULT = {
},
// Header HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
- 'headerTemplate': '',
+ 'headerTemplate': null,
// Footer HTML template. Available variables: _PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_.
- 'footerTemplate': ''
+ 'footerTemplate': null
}
};
diff --git a/lib/generators/ebook.js b/lib/generators/ebook.js
index e6a33d3..96775b1 100644
--- a/lib/generators/ebook.js
+++ b/lib/generators/ebook.js
@@ -1,12 +1,13 @@
-var util = require("util");
-var path = require("path");
-var Q = require("q");
-var _ = require("lodash");
-var exec = require("child_process").exec;
+var util = require('util');
+var path = require('path');
+var Q = require('q');
+var _ = require('lodash');
+var juice = require('juice');
+var exec = require('child_process').exec;
-var fs = require("../utils/fs");
-var stringUtils = require("../utils/string");
-var BaseGenerator = require("./website");
+var fs = require('../utils/fs');
+var stringUtils = require('../utils/string');
+var BaseGenerator = require('./website');
var Generator = function(book, format) {
BaseGenerator.apply(this, arguments);
@@ -15,10 +16,10 @@ var Generator = function(book, format) {
this.ebookFormat = format;
// Resources namespace
- this.namespace = "ebook";
+ this.namespace = 'ebook';
// Styles to use
- this.styles = _.compact(["print", "ebook", this.ebookFormat]);
+ this.styles = _.compact(['print', 'ebook', this.ebookFormat]);
// Convert images (svg -> png)
this.convertImages = true;
@@ -26,9 +27,9 @@ var Generator = function(book, format) {
util.inherits(Generator, BaseGenerator);
Generator.prototype.prepareTemplates = function() {
- this.templates.page = this.book.plugins.template("ebook:page") || path.resolve(this.options.theme, "templates/ebook/page.html");
- this.templates.summary = this.book.plugins.template("ebook:summary") || path.resolve(this.options.theme, "templates/ebook/summary.html");
- this.templates.glossary = this.book.plugins.template("ebook:glossary") || path.resolve(this.options.theme, "templates/ebook/glossary.html");
+ this.templates.page = this.book.plugins.template('ebook:page') || path.resolve(this.options.theme, 'templates/ebook/page.html');
+ this.templates.summary = this.book.plugins.template('ebook:summary') || path.resolve(this.options.theme, 'templates/ebook/summary.html');
+ this.templates.glossary = this.book.plugins.template('ebook:glossary') || path.resolve(this.options.theme, 'templates/ebook/glossary.html');
return Q();
};
@@ -37,8 +38,39 @@ Generator.prototype.prepareTemplates = function() {
Generator.prototype.writeSummary = function() {
var that = this;
- that.book.log.info.ln("write SUMMARY.html");
- return this._writeTemplate(this.templates.summary, {}, path.join(this.options.output, "SUMMARY.html"));
+ that.book.log.info.ln('write SUMMARY.html');
+ return this._writeTemplate(this.templates.summary, {}, path.join(this.options.output, 'SUMMARY.html'));
+};
+
+// Return template for footer/header with inlined css
+Generator.prototype.getPDFTemplate = function(id) {
+ var tpl = this.options.pdf[id+'Template'];
+ var defaultTpl = path.resolve(this.options.theme, 'templates/ebook/'+id+'.html');
+ var defaultCSS = path.resolve(this.options.theme, 'assets/pdf.css');
+
+ // Default template from theme
+ if (!tpl && fs.existsSync(defaultTpl)) {
+ tpl = fs.readFileSync(defaultTpl, { encoding: 'utf-8' });
+ }
+
+ // Inline CSS using juice
+ var stylesheets = [];
+
+ // From theme
+ if (fs.existsSync(defaultCSS)) {
+ stylesheets.push(fs.readFileSync(defaultCSS, { encoding: 'utf-8' }));
+ }
+
+ // Custom PDF style
+ if (this.styles.pdf) {
+ stylesheets.push(fs.readFileSync(this.book.resolve(this.styles.pdf), { encoding: 'utf-8' }));
+ }
+
+ tpl = juice(tpl, {
+ extraCss: stylesheets.concat('/n')
+ });
+
+ return tpl;
};
Generator.prototype.finish = function() {
@@ -52,70 +84,70 @@ Generator.prototype.finish = function() {
.then(function() {
if (!that.ebookFormat) return Q();
- if (!that.options.cover && fs.existsSync(path.join(that.options.output, "cover.jpg"))) {
- that.options.cover = path.join(that.options.output, "cover.jpg");
+ if (!that.options.cover && fs.existsSync(path.join(that.options.output, 'cover.jpg'))) {
+ that.options.cover = path.join(that.options.output, 'cover.jpg');
}
var d = Q.defer();
var _options = {
- "--cover": that.options.cover,
- "--title": that.options.title,
- "--comments": that.options.description,
- "--isbn": that.options.isbn,
- "--authors": that.options.author,
- "--language": that.options.language,
- "--book-producer": "GitBook",
- "--publisher": "GitBook",
- "--chapter": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter ')]",
- "--level1-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-1 ')]",
- "--level2-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-2 ')]",
- "--level3-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-3 ')]",
- "--no-chapters-in-toc": true,
- "--max-levels": "1",
- "--breadth-first": true
+ '--cover': that.options.cover,
+ '--title': that.options.title,
+ '--comments': that.options.description,
+ '--isbn': that.options.isbn,
+ '--authors': that.options.author,
+ '--language': that.options.language,
+ '--book-producer': 'GitBook',
+ '--publisher': 'GitBook',
+ '--chapter': 'descendant-or-self::*[contains(concat(\' \', normalize-space(@class), \' \'), \' book-chapter \')]',
+ '--level1-toc': 'descendant-or-self::*[contains(concat(\' \', normalize-space(@class), \' \'), \' book-chapter-1 \')]',
+ '--level2-toc': 'descendant-or-self::*[contains(concat(\' \', normalize-space(@class), \' \'), \' book-chapter-2 \')]',
+ '--level3-toc': 'descendant-or-self::*[contains(concat(\' \', normalize-space(@class), \' \'), \' book-chapter-3 \')]',
+ '--no-chapters-in-toc': true,
+ '--max-levels': '1',
+ '--breadth-first': true
};
- if (that.ebookFormat == "pdf") {
+ if (that.ebookFormat == 'pdf') {
var pdfOptions = that.options.pdf;
_.extend(_options, {
- "--chapter-mark": String(pdfOptions.chapterMark),
- "--page-breaks-before": String(pdfOptions.pageBreaksBefore),
- "--margin-left": String(pdfOptions.margin.left),
- "--margin-right": String(pdfOptions.margin.right),
- "--margin-top": String(pdfOptions.margin.top),
- "--margin-bottom": String(pdfOptions.margin.bottom),
- "--pdf-default-font-size": String(pdfOptions.fontSize),
- "--pdf-mono-font-size": String(pdfOptions.fontSize),
- "--paper-size": String(pdfOptions.paperSize),
- "--pdf-page-numbers": Boolean(pdfOptions.pageNumbers),
- "--pdf-header-template": String(pdfOptions.headerTemplate) || "<p class='header'><span>"+that.options.title+"</span></p>",
- "--pdf-footer-template": String(pdfOptions.footerTemplate) || "<p class='footer'><span>_SECTION_</span> <span style='float:right;'>_PAGENUM_</span></p>"
+ '--chapter-mark': String(pdfOptions.chapterMark),
+ '--page-breaks-before': String(pdfOptions.pageBreaksBefore),
+ '--margin-left': String(pdfOptions.margin.left),
+ '--margin-right': String(pdfOptions.margin.right),
+ '--margin-top': String(pdfOptions.margin.top),
+ '--margin-bottom': String(pdfOptions.margin.bottom),
+ '--pdf-default-font-size': String(pdfOptions.fontSize),
+ '--pdf-mono-font-size': String(pdfOptions.fontSize),
+ '--paper-size': String(pdfOptions.paperSize),
+ '--pdf-page-numbers': Boolean(pdfOptions.pageNumbers),
+ '--pdf-header-template': that.getPDFTemplate('header'),
+ '--pdf-footer-template': that.getPDFTemplate('footer')
});
- } else if (that.ebookFormat == "epub") {
+ } else if (that.ebookFormat == 'epub') {
_.extend(_options, {
- "--dont-split-on-page-breaks": true
+ '--dont-split-on-page-breaks': true
});
}
var command = [
- "ebook-convert",
- path.join(that.options.output, "SUMMARY.html"),
- path.join(that.options.output, "index."+that.ebookFormat),
+ 'ebook-convert',
+ path.join(that.options.output, 'SUMMARY.html'),
+ path.join(that.options.output, 'index.'+that.ebookFormat),
stringUtils.optionsToShellArgs(_options)
- ].join(" ");
+ ].join(' ');
- that.book.log.info("start conversion to", that.ebookFormat, "....");
+ that.book.log.info('start conversion to', that.ebookFormat, '....');
var child = exec(command, function (error, stdout) {
if (error) {
that.book.log.info.fail();
if (error.code == 127) {
- error.message = "Need to install ebook-convert from Calibre";
+ error.message = 'Need to install ebook-convert from Calibre';
} else {
- error.message = error.message + " "+stdout;
+ error.message = error.message + ' '+stdout;
}
return d.reject(error);
}
@@ -124,11 +156,11 @@ Generator.prototype.finish = function() {
d.resolve();
});
- child.stdout.on("data", function (data) {
+ child.stdout.on('data', function (data) {
that.book.log.debug(data);
});
- child.stderr.on("data", function (data) {
+ child.stderr.on('data', function (data) {
that.book.log.debug(data);
});
diff --git a/lib/generators/website.js b/lib/generators/website.js
index e1a3cce..18ec65d 100644
--- a/lib/generators/website.js
+++ b/lib/generators/website.js
@@ -1,18 +1,18 @@
-var util = require("util");
-var path = require("path");
-var Q = require("q");
-var _ = require("lodash");
+var util = require('util');
+var path = require('path');
+var Q = require('q');
+var _ = require('lodash');
-var nunjucks = require("nunjucks");
-var AutoEscapeExtension = require("nunjucks-autoescape")(nunjucks);
-var FilterExtension = require("nunjucks-filter")(nunjucks);
+var nunjucks = require('nunjucks');
+var AutoEscapeExtension = require('nunjucks-autoescape')(nunjucks);
+var FilterExtension = require('nunjucks-filter')(nunjucks);
-var fs = require("../utils/fs");
-var BaseGenerator = require("../generator");
-var links = require("../utils/links");
-var i18n = require("../utils/i18n");
+var fs = require('../utils/fs');
+var BaseGenerator = require('../generator');
+var links = require('../utils/links');
+var i18n = require('../utils/i18n');
-var pkg = require("../../package.json");
+var pkg = require('../../package.json');
var Generator = function() {
BaseGenerator.apply(this, arguments);
@@ -21,10 +21,10 @@ var Generator = function() {
this.revision = new Date();
// Resources namespace
- this.namespace = "website";
+ this.namespace = 'website';
// Style to integrates in the output
- this.styles = ["website"];
+ this.styles = ['website'];
// Convert images (svg -> png)
this.convertImages = false;
@@ -63,9 +63,9 @@ Generator.prototype.prepareStyles = function() {
// Prepare templates
Generator.prototype.prepareTemplates = function() {
- this.templates.page = this.book.plugins.template("site:page") || path.resolve(this.options.theme, "templates/website/page.html");
- this.templates.langs = this.book.plugins.template("site:langs") || path.resolve(this.options.theme, "templates/website/langs.html");
- this.templates.glossary = this.book.plugins.template("site:glossary") || path.resolve(this.options.theme, "templates/website/glossary.html");
+ this.templates.page = this.book.plugins.template('site:page') || path.resolve(this.options.theme, 'templates/website/page.html');
+ this.templates.langs = this.book.plugins.template('site:langs') || path.resolve(this.options.theme, 'templates/website/langs.html');
+ this.templates.glossary = this.book.plugins.template('site:glossary') || path.resolve(this.options.theme, 'templates/website/glossary.html');
return Q();
};
@@ -79,7 +79,7 @@ Generator.prototype.prepareTemplateEngine = function() {
var language = that.book.config.normalizeLanguage();
if (!i18n.hasLocale(language)) {
- that.book.log.warn.ln("Language '"+language+"' is not available as a layout locales (en, "+i18n.getLocales().join(", ")+")");
+ that.book.log.warn.ln('Language "'+language+'" is not available as a layout locales (en, '+i18n.getLocales().join(', ')+')');
}
var folders = _.chain(that.templates)
@@ -96,14 +96,14 @@ Generator.prototype.prepareTemplateEngine = function() {
);
// Add filter
- that.env.addFilter("contentLink", that.book.contentLink.bind(that.book));
- that.env.addFilter("lvl", function(lvl) {
- return lvl.split(".").length;
+ that.env.addFilter('contentLink', that.book.contentLink.bind(that.book));
+ that.env.addFilter('lvl', function(lvl) {
+ return lvl.split('.').length;
});
// Add extension
- that.env.addExtension("AutoEscapeExtension", new AutoEscapeExtension(that.env));
- that.env.addExtension("FilterExtension", new FilterExtension(that.env));
+ that.env.addExtension('AutoEscapeExtension', new AutoEscapeExtension(that.env));
+ that.env.addExtension('FilterExtension', new FilterExtension(that.env));
});
};
@@ -122,20 +122,20 @@ Generator.prototype.convertFile = function(input) {
return that.book.parsePage(input, {
convertImages: that.convertImages,
interpolateTemplate: function(page) {
- return that.callHook("page:before", page);
+ return that.callHook('page:before', page);
},
interpolateContent: function(page) {
- return that.callHook("page", page);
+ return that.callHook('page', page);
}
})
.then(function(page) {
var relativeOutput = that.book.contentPath(page.path);
var output = path.join(that.options.output, relativeOutput);
- var basePath = path.relative(path.dirname(output), that.options.output) || ".";
- if (process.platform === "win32") basePath = basePath.replace(/\\/g, "/");
+ var basePath = path.relative(path.dirname(output), that.options.output) || '.';
+ if (process.platform === 'win32') basePath = basePath.replace(/\\/g, '/');
- that.book.log.debug.ln("write parsed file", page.path, "to", relativeOutput);
+ that.book.log.debug.ln('write parsed file', page.path, 'to', relativeOutput);
return that._writeTemplate(that.templates.page, {
progress: page.progress,
@@ -144,7 +144,7 @@ Generator.prototype.convertFile = function(input) {
content: page.sections,
basePath: basePath,
- staticBase: links.join(basePath, "gitbook")
+ staticBase: links.join(basePath, 'gitbook')
}, output);
});
};
@@ -155,7 +155,7 @@ Generator.prototype.writeLangsIndex = function() {
return this._writeTemplate(this.templates.langs, {
langs: this.book.langs
- }, path.join(this.options.output, "index.html"));
+ }, path.join(this.options.output, 'index.html'));
};
// Write glossary
@@ -163,7 +163,7 @@ Generator.prototype.writeGlossary = function() {
// No glossary
if (this.book.glossary.length === 0) return Q();
- return this._writeTemplate(this.templates.glossary, {}, path.join(this.options.output, "GLOSSARY.html"));
+ return this._writeTemplate(this.templates.glossary, {}, path.join(this.options.output, 'GLOSSARY.html'));
};
// Convert a page into a normalized data set
@@ -180,7 +180,7 @@ Generator.prototype.normalizePage = function(page) {
return Q()
.then(function() {
- return _callHook("page");
+ return _callHook('page');
})
.then(function() {
return page;
@@ -222,10 +222,10 @@ Generator.prototype._writeTemplate = function(tpl, options, output, interpolate)
options: that.options,
- basePath: ".",
- staticBase: path.join(".", "gitbook"),
+ basePath: '.',
+ staticBase: path.join('.', 'gitbook'),
- "__": that.book.i18n.bind(that.book)
+ '__': that.book.i18n.bind(that.book)
}, options)
);
})
@@ -244,15 +244,15 @@ Generator.prototype.copyAssets = function() {
// Copy gitbook assets
return fs.copy(
- path.join(that.options.theme, "assets"),
- path.join(that.options.output, "gitbook")
+ path.join(that.options.theme, 'assets/'+this.namespace),
+ path.join(that.options.output, 'gitbook')
)
// Copy plugins assets
.then(function() {
return Q.all(
_.map(that.book.plugins.list, function(plugin) {
- var pluginAssets = path.join(that.options.output, "gitbook/plugins/", plugin.name);
+ var pluginAssets = path.join(that.options.output, 'gitbook/plugins/', plugin.name);
return plugin.copyAssets(pluginAssets, that.namespace);
})
);
diff --git a/lib/utils/fs.js b/lib/utils/fs.js
index 0a9d846..716e3a0 100644
--- a/lib/utils/fs.js
+++ b/lib/utils/fs.js
@@ -1,10 +1,10 @@
-var _ = require("lodash");
-var Q = require("q");
-var tmp = require("tmp");
-var path = require("path");
-var fs = require("graceful-fs");
-var fsExtra = require("fs-extra");
-var Ignore = require("fstream-ignore");
+var _ = require('lodash');
+var Q = require('q');
+var tmp = require('tmp');
+var path = require('path');
+var fs = require('graceful-fs');
+var fsExtra = require('fs-extra');
+var Ignore = require('fstream-ignore');
var fsUtils = {
tmp: {
@@ -33,7 +33,7 @@ var fsUtils = {
existsSync: fs.existsSync.bind(fs),
readFileSync: fs.readFileSync.bind(fs),
clean: cleanFolder,
- getUniqueFilename: getUniqueFilename,
+ getUniqueFilename: getUniqueFilename
};
// Write a file
@@ -57,14 +57,14 @@ function writeStream(filename, st) {
var wstream = fs.createWriteStream(filename);
- wstream.on("finish", function () {
+ wstream.on('finish', function () {
d.resolve();
});
- wstream.on("error", function (err) {
+ wstream.on('error', function (err) {
d.reject(err);
});
- st.on("error", function(err) {
+ st.on('error', function(err) {
d.reject(err);
});
@@ -77,7 +77,7 @@ function writeStream(filename, st) {
function getUniqueFilename(base, filename) {
if (!filename) {
filename = base;
- base = "/";
+ base = '/';
}
filename = path.resolve(base, filename);
@@ -87,9 +87,8 @@ function getUniqueFilename(base, filename) {
var _filename = filename+ext;
var i = 0;
- while (1) {
- if (!fs.existsSync(filename)) break;
- _filename = filename+"_"+i+ext;
+ while (fs.existsSync(filename)) {
+ _filename = filename+'_'+i+ext;
i = i + 1;
}
@@ -115,20 +114,20 @@ function listFiles(root, options) {
});
// Add extra rules to ignore common folders
- ig.addIgnoreRules(options.ignoreRules, "__custom_stuff");
+ ig.addIgnoreRules(options.ignoreRules, '__custom_stuff');
// Push each file to our list
- ig.on("child", function (c) {
+ ig.on('child', function (c) {
files.push(
- c.path.substr(c.root.path.length + 1) + (c.props.Directory === true ? "/" : "")
+ c.path.substr(c.root.path.length + 1) + (c.props.Directory === true ? '/' : '')
);
});
- ig.on("end", function() {
+ ig.on('end', function() {
// Normalize paths on Windows
- if(process.platform === "win32") {
+ if(process.platform === 'win32') {
return d.resolve(files.map(function(file) {
- return file.replace(/\\/g, "/");
+ return file.replace(/\\/g, '/');
}));
}
@@ -136,7 +135,7 @@ function listFiles(root, options) {
return d.resolve(files);
});
- ig.on("error", d.reject);
+ ig.on('error', d.reject);
return d.promise;
}
@@ -150,8 +149,8 @@ function cleanFolder(root) {
ignoreFiles: [],
ignoreRules: [
// Skip Git and SVN stuff
- ".git/",
- ".svn/"
+ '.git/',
+ '.svn/'
]
})
.then(function(files) {
diff --git a/package.json b/package.json
index 39e00bc..3eeec2e 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,8 @@
"npm": "2.4.1",
"dom-serializer": "0.1.0",
"spawn-cmd": "0.0.2",
- "escape-string-regexp": "1.0.3"
+ "escape-string-regexp": "1.0.3",
+ "juice": "1.5.0"
},
"devDependencies": {
"eslint": "1.5.0",
diff --git a/test/ebook.js b/test/ebook.js
index b065ae7..6c84462 100644
--- a/test/ebook.js
+++ b/test/ebook.js
@@ -1,66 +1,70 @@
-var fs = require("fs");
-var path = require("path");
+var fs = require('fs');
+var path = require('path');
-describe("eBook generator", function () {
- describe("Basic Book", function() {
+describe('eBook generator', function () {
+ describe('Basic Book', function() {
var book;
before(function() {
- return books.generate("basic", "ebook")
+ return books.generate('basic', 'ebook')
.then(function(_book) {
book = _book;
});
});
- it("should correctly output a SUMMARY.html", function() {
- book.should.have.file("SUMMARY.html");
+ it('should correctly output a SUMMARY.html', function() {
+ book.should.have.file('SUMMARY.html');
});
- it("should correctly copy assets", function() {
- book.should.have.file("gitbook");
- book.should.have.file("gitbook/style.css");
+ it('should correctly copy assets', function() {
+ book.should.have.file('gitbook');
+ book.should.have.file('gitbook/ebook.css');
+ });
+
+ it('should not copy website assets', function() {
+ book.should.not.have.file('gitbook/style.css');
});
});
- describe("Custom styles", function() {
+ describe('Custom styles', function() {
var book;
before(function() {
- return books.generate("style-print", "ebook")
+ return books.generate('style-print', 'ebook')
.then(function(_book) {
book = _book;
});
});
- it("should remove default print.css", function() {
+ it('should remove default print.css', function() {
var PAGE = fs.readFileSync(
- path.join(book.options.output, "index.html"),
- { encoding: "utf-8" }
+ path.join(book.options.output, 'index.html'),
+ { encoding: 'utf-8' }
);
// There are 2 styles (one from plugin-highlight and the new style)
PAGE.should.be.html({
- "link": {
+ 'link': {
count: 2
}
});
PAGE.should.be.html({
- "link[href=\"./styles/print.css\"]": {
+ 'link[href=\'./styles/print.css\']': {
count: 1
}
});
PAGE.should.be.html({
- "link[href=\"gitbook/plugins/gitbook-plugin-highlight/ebook.css\"]": {
+ 'link[href="gitbook/plugins/gitbook-plugin-highlight/ebook.css"]': {
count: 1
}
});
});
- it("should correctly print.css", function() {
- book.should.have.file("styles");
- book.should.have.file("styles/print.css");
+ it('should correctly copy print.css', function() {
+ book.should.have.file('styles');
+ book.should.have.file('styles/print.css');
});
});
});
diff --git a/test/website.js b/test/website.js
index ebbd18c..6a0fd1c 100644
--- a/test/website.js
+++ b/test/website.js
@@ -1,22 +1,26 @@
-describe("Website generator", function () {
- describe("Basic Book", function() {
+describe('Website generator', function () {
+ describe('Basic Book', function() {
var book;
before(function() {
- return books.generate("basic", "website")
+ return books.generate('basic', 'website')
.then(function(_book) {
book = _book;
});
});
- it("should correctly output an index.html", function() {
- book.should.have.file("index.html");
+ it('should correctly output an index.html', function() {
+ book.should.have.file('index.html');
});
- it("should correctly copy assets", function() {
- book.should.have.file("gitbook");
- book.should.have.file("gitbook/app.js");
- book.should.have.file("gitbook/style.css");
+ it('should correctly copy assets', function() {
+ book.should.have.file('gitbook');
+ book.should.have.file('gitbook/app.js');
+ book.should.have.file('gitbook/style.css');
+ });
+
+ it('should not copy ebook assets', function() {
+ book.should.not.have.file('gitbook/ebook.css');
});
});
});
diff --git a/theme/assets/ebook/ebook.css b/theme/assets/ebook/ebook.css
new file mode 100644
index 0000000..5983b10
--- /dev/null
+++ b/theme/assets/ebook/ebook.css
@@ -0,0 +1 @@
+.section.glossary>h1,.section.toc>h1{text-align:center}.page .section b,.page .section dl dt,.page .section strong,.page .section table th{font-weight:700}.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}.hidden{display:none}.section.toc>ol{margin:0;padding:0}.section.toc li{list-style:none}.section.toc li .inner{display:block;border-bottom:1px dotted #eee;margin-bottom:4px}.section.toc li .inner a,.section.toc li .inner span{padding-right:5px;border-bottom:1px solid #fff;margin-bottom:-1px}.section.toc li .inner .page{float:right;padding-left:5px}.section.toc li ol{margin:0;padding:0 0 0 2em}.dir-rtl .section.toc li .inner .page{float:left}.dir-rtl .section.toc li ol{margin:0;padding:0 2em 0 0}.section.glossary .glossary-entry{margin-bottom:40px}.section.glossary .glossary-entry h2 a,.section.glossary .glossary-entry h2 a:hover{color:inherit;text-decoration:none}.section.glossary .glossary-entry .glossary-index{list-style:none;margin:0;padding:0}.section.glossary .glossary-entry .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}body{font-family:sans-serif;color:#000;text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.page .section{display:block;word-wrap:break-word;overflow:hidden;color:#000;line-height:1.6}.page .section *{-moz-box-sizing:border-box;box-sizing:border-box}.page .section>:first-child{margin-top:0!important}.page .section>:last-child{margin-bottom:0!important}.page .section blockquote,.page .section code,.page .section figure,.page .section img,.page .section pre,.page .section table,.page .section tr{page-break-inside:avoid}.page .section h2,.page .section h3,.page .section h4,.page .section h5,.page .section p{orphans:3;widows:3}.page .section h1,.page .section h2,.page .section h3,.page .section h4,.page .section h5{page-break-after:avoid}.page .section em{font-style:italic}.page .section blockquote,.page .section dl,.page .section ol,.page .section p,.page .section table,.page .section ul{margin-top:0;margin-bottom:.8em}.page .section a{color:#4183c4;text-decoration:none;background:0 0}.page .section a:active,.page .section a:focus,.page .section a:hover{outline:0;text-decoration:underline}.page .section img{border:0;max-width:100%}.page .section hr{height:4px;padding:0;margin:1.6em 0;overflow:hidden;background-color:#e7e7e7;border:none}.page .section hr:after,.page .section hr:before{display:table;content:" "}.page .section hr:after{clear:both}.page .section h1,.page .section h2,.page .section h3,.page .section h4,.page .section h5,.page .section h6{margin-top:1.2em;margin-bottom:.8em;font-weight:700}.page .section h1{font-size:2em}.page .section h2{font-size:1.75em}.page .section h3{font-size:1.5em}.page .section h4{font-size:1.25em}.page .section h5,.page .section h6{font-size:1em}.page .section code,.page .section pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;direction:ltr;border:none}.page .section pre{overflow:auto;word-wrap:normal;margin:0 0 1.2em;padding:.85em 1em;background:#f7f7f7}.page .section pre>code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;font-size:.85em;white-space:pre;background:0 0}.page .section pre>code:after,.page .section pre>code:before{content:normal}.page .section code{padding:.2em;margin:0;font-size:.85em;background-color:#f7f7f7}.page .section code:after,.page .section code:before{letter-spacing:-.2em;content:"\00a0"}.page .section table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.page .section table td,.page .section table th{padding:6px 13px;border:1px solid #ddd}.page .section table tr{background-color:#fff;border-top:1px solid #ccc}.page .section table tr:nth-child(2n){background-color:#f8f8f8}.page .section ol,.page .section ul{padding:0 0 0 2em;margin-top:0;margin-bottom:0}.page .section ol ol,.page .section ol ul,.page .section ul ol,.page .section ul ul{margin-top:0;margin-bottom:0}.page .section ol ol{list-style-type:lower-roman}.page .section blockquote{margin:0;padding:0 15px;color:#858585;border-left:4px solid #e5e5e5}.page .section blockquote:first-child{margin-top:0}.page .section blockquote:last-child{margin-bottom:0}.page .section dl{padding:0}.page .section dl dt{padding:0;margin-top:.8em;font-style:italic}.page .section dl dd{padding:0 .8em;margin-bottom:.8em}.page .section dd{margin-left:0}.page .book-chapter{display:none} \ No newline at end of file
diff --git a/theme/assets/ebook/epub.css b/theme/assets/ebook/epub.css
new file mode 100644
index 0000000..e8cafc7
--- /dev/null
+++ b/theme/assets/ebook/epub.css
@@ -0,0 +1 @@
+.section.glossary>h1,.section.toc>h1{text-align:center}.page .section b,.page .section dl dt,.page .section strong,.page .section table th{font-weight:700}.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}.hidden{display:none}.section.toc>ol{margin:0;padding:0}.section.toc li{list-style:none}.section.toc li .inner{display:block;border-bottom:1px dotted #eee;margin-bottom:4px}.section.toc li .inner a,.section.toc li .inner span{padding-right:5px;border-bottom:1px solid #fff;margin-bottom:-1px}.section.toc li .inner .page{float:right;padding-left:5px}.section.toc li ol{margin:0;padding:0 0 0 2em}.dir-rtl .section.toc li .inner .page{float:left}.dir-rtl .section.toc li ol{margin:0;padding:0 2em 0 0}.section.glossary .glossary-entry{margin-bottom:40px}.section.glossary .glossary-entry h2 a,.section.glossary .glossary-entry h2 a:hover{color:inherit;text-decoration:none}.section.glossary .glossary-entry .glossary-index{list-style:none;margin:0;padding:0}.section.glossary .glossary-entry .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}body{font-family:serif;color:#000;text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.page .section{display:block;word-wrap:break-word;overflow:hidden;color:#000;line-height:1.6}.page .section *{-moz-box-sizing:border-box;box-sizing:border-box}.page .section>:first-child{margin-top:0!important}.page .section>:last-child{margin-bottom:0!important}.page .section blockquote,.page .section code,.page .section figure,.page .section img,.page .section pre,.page .section table,.page .section tr{page-break-inside:avoid}.page .section h2,.page .section h3,.page .section h4,.page .section h5,.page .section p{orphans:3;widows:3}.page .section h1,.page .section h2,.page .section h3,.page .section h4,.page .section h5{page-break-after:avoid}.page .section em{font-style:italic}.page .section blockquote,.page .section dl,.page .section ol,.page .section p,.page .section table,.page .section ul{margin-top:0;margin-bottom:.8em}.page .section a{color:#4183c4;text-decoration:none;background:0 0}.page .section a:active,.page .section a:focus,.page .section a:hover{outline:0;text-decoration:underline}.page .section img{border:0;max-width:100%}.page .section hr{height:4px;padding:0;margin:1.6em 0;overflow:hidden;background-color:#e7e7e7;border:none}.page .section hr:after,.page .section hr:before{display:table;content:" "}.page .section hr:after{clear:both}.page .section h1,.page .section h2,.page .section h3,.page .section h4,.page .section h5,.page .section h6{margin-top:1.2em;margin-bottom:.8em;font-weight:700}.page .section h1{font-size:2em}.page .section h2{font-size:1.75em}.page .section h3{font-size:1.5em}.page .section h4{font-size:1.25em}.page .section h5,.page .section h6{font-size:1em}.page .section code,.page .section pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;direction:ltr;border:none}.page .section pre{overflow:auto;word-wrap:normal;margin:0 0 1.2em;padding:.85em 1em;background:#f7f7f7}.page .section pre>code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;font-size:.85em;white-space:pre;background:0 0}.page .section pre>code:after,.page .section pre>code:before{content:normal}.page .section code{padding:.2em;margin:0;font-size:.85em;background-color:#f7f7f7}.page .section code:after,.page .section code:before{letter-spacing:-.2em;content:"\00a0"}.page .section table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.page .section table td,.page .section table th{padding:6px 13px;border:1px solid #ddd}.page .section table tr{background-color:#fff;border-top:1px solid #ccc}.page .section table tr:nth-child(2n){background-color:#f8f8f8}.page .section ol,.page .section ul{padding:0 0 0 2em;margin-top:0;margin-bottom:0}.page .section ol ol,.page .section ol ul,.page .section ul ol,.page .section ul ul{margin-top:0;margin-bottom:0}.page .section ol ol{list-style-type:lower-roman}.page .section blockquote{margin:0;padding:0 15px;color:#858585;border-left:4px solid #e5e5e5}.page .section blockquote:first-child{margin-top:0}.page .section blockquote:last-child{margin-bottom:0}.page .section dl{padding:0}.page .section dl dt{padding:0;margin-top:.8em;font-style:italic}.page .section dl dd{padding:0 .8em;margin-bottom:.8em}.page .section dd{margin-left:0}.page .book-chapter{display:none} \ No newline at end of file
diff --git a/theme/assets/ebook/mobi.css b/theme/assets/ebook/mobi.css
new file mode 100644
index 0000000..b18de84
--- /dev/null
+++ b/theme/assets/ebook/mobi.css
@@ -0,0 +1 @@
+.section.glossary>h1,.section.toc>h1{text-align:center}.page .section b,.page .section dl dt,.page .section strong,.page .section table th{font-weight:700}.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}.hidden{display:none}.section.toc>ol{margin:0;padding:0}.section.toc li{list-style:none}.section.toc li .inner{display:block;border-bottom:1px dotted #eee;margin-bottom:4px}.section.toc li .inner a,.section.toc li .inner span{padding-right:5px;border-bottom:1px solid #fff;margin-bottom:-1px}.section.toc li .inner .page{float:right;padding-left:5px}.section.toc li ol{margin:0;padding:0 0 0 2em}.dir-rtl .section.toc li .inner .page{float:left}.dir-rtl .section.toc li ol{margin:0;padding:0 2em 0 0}.section.glossary .glossary-entry{margin-bottom:40px}.section.glossary .glossary-entry h2 a,.section.glossary .glossary-entry h2 a:hover{color:inherit;text-decoration:none}.section.glossary .glossary-entry .glossary-index{list-style:none;margin:0;padding:0}.section.glossary .glossary-entry .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}body{font-family:serif;color:#000;text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.page .section{display:block;word-wrap:break-word;overflow:hidden;color:#000;line-height:1.6}.page .section *{-moz-box-sizing:border-box;box-sizing:border-box}.page .section>:first-child{margin-top:0!important}.page .section>:last-child{margin-bottom:0!important}.page .section blockquote,.page .section code,.page .section figure,.page .section img,.page .section pre,.page .section table,.page .section tr{page-break-inside:avoid}.page .section h2,.page .section h3,.page .section h4,.page .section h5,.page .section p{orphans:3;widows:3}.page .section h1,.page .section h2,.page .section h3,.page .section h4,.page .section h5{page-break-after:avoid}.page .section em{font-style:italic}.page .section blockquote,.page .section dl,.page .section ol,.page .section p,.page .section table,.page .section ul{margin-top:0;margin-bottom:.8em}.page .section a{color:#000;text-decoration:none;background:0 0}.page .section a:active,.page .section a:focus,.page .section a:hover{outline:0;text-decoration:underline}.page .section img{border:0;max-width:100%}.page .section hr{height:4px;padding:0;margin:1.6em 0;overflow:hidden;background-color:#e7e7e7;border:none}.page .section hr:after,.page .section hr:before{display:table;content:" "}.page .section hr:after{clear:both}.page .section h1,.page .section h2,.page .section h3,.page .section h4,.page .section h5,.page .section h6{margin-top:1.2em;margin-bottom:.8em;font-weight:700}.page .section h1{font-size:2em}.page .section h2{font-size:1.75em}.page .section h3{font-size:1.5em}.page .section h4{font-size:1.25em}.page .section h5,.page .section h6{font-size:1em}.page .section code,.page .section pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;direction:ltr;border:none}.page .section pre{overflow:auto;word-wrap:normal;margin:0 0 1.2em;padding:.85em 1em;background:#f7f7f7}.page .section pre>code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;font-size:.85em;white-space:pre;background:0 0}.page .section pre>code:after,.page .section pre>code:before{content:normal}.page .section code{padding:.2em;margin:0;font-size:.85em;background-color:#f7f7f7}.page .section code:after,.page .section code:before{letter-spacing:-.2em;content:"\00a0"}.page .section table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.page .book-chapter,.page-toc li .inner span.page{display:none}.page .section table td,.page .section table th{padding:6px 13px;border:1px solid #ddd}.page .section table tr{background-color:#fff;border-top:1px solid #ccc}.page .section table tr:nth-child(2n){background-color:#f8f8f8}.page .section ol,.page .section ul{padding:0 0 0 2em;margin-top:0;margin-bottom:0}.page .section ol ol,.page .section ol ul,.page .section ul ol,.page .section ul ul{margin-top:0;margin-bottom:0}.page .section ol ol{list-style-type:lower-roman}.page .section blockquote{margin:0;padding:0 15px;color:#858585;border-left:4px solid #e5e5e5}.page .section blockquote:first-child{margin-top:0}.page .section blockquote:last-child{margin-bottom:0}.page .section dl{padding:0}.page .section dl dt{padding:0;margin-top:.8em;font-style:italic}.page .section dl dd{padding:0 .8em;margin-bottom:.8em}.page .section dd{margin-left:0}a{color:#000;text-decoration:underline!important}.page-toc li{list-style-type:lower-alpha}.page-toc li .inner{border:none} \ No newline at end of file
diff --git a/theme/assets/ebook/pdf.css b/theme/assets/ebook/pdf.css
new file mode 100644
index 0000000..27e941c
--- /dev/null
+++ b/theme/assets/ebook/pdf.css
@@ -0,0 +1 @@
+.section.glossary>h1,.section.toc>h1{text-align:center}.page .section b,.page .section dl dt,.page .section strong,.page .section table th{font-weight:700}.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}.hidden{display:none}.section.toc>ol{margin:0;padding:0}.section.toc li{list-style:none}.section.toc li .inner{display:block;border-bottom:1px dotted #eee;margin-bottom:4px}.section.toc li .inner a,.section.toc li .inner span{padding-right:5px;border-bottom:1px solid #fff;margin-bottom:-1px}.section.toc li .inner .page{float:right;padding-left:5px}.section.toc li ol{margin:0;padding:0 0 0 2em}.dir-rtl .section.toc li .inner .page{float:left}.dir-rtl .section.toc li ol{margin:0;padding:0 2em 0 0}.section.glossary .glossary-entry{margin-bottom:40px}.section.glossary .glossary-entry h2 a,.section.glossary .glossary-entry h2 a:hover{color:inherit;text-decoration:none}.section.glossary .glossary-entry .glossary-index{list-style:none;margin:0;padding:0}.section.glossary .glossary-entry .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}body{font-family:sans-serif;color:#000;text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.page .section{display:block;word-wrap:break-word;overflow:hidden;color:#000;line-height:1.6}.page .section *{-moz-box-sizing:border-box;box-sizing:border-box}.page .section>:first-child{margin-top:0!important}.page .section>:last-child{margin-bottom:0!important}.page .section blockquote,.page .section code,.page .section figure,.page .section img,.page .section pre,.page .section table,.page .section tr{page-break-inside:avoid}.page .section h2,.page .section h3,.page .section h4,.page .section h5,.page .section p{orphans:3;widows:3}.page .section h1,.page .section h2,.page .section h3,.page .section h4,.page .section h5{page-break-after:avoid}.page .section em{font-style:italic}.page .section blockquote,.page .section dl,.page .section ol,.page .section p,.page .section table,.page .section ul{margin-top:0;margin-bottom:.8em}.page .section a{color:#4183c4;text-decoration:none;background:0 0}.page .section a:active,.page .section a:focus,.page .section a:hover{outline:0;text-decoration:underline}.page .section img{border:0;max-width:100%}.page .section hr{height:4px;padding:0;margin:1.6em 0;overflow:hidden;background-color:#e7e7e7;border:none}.page .section hr:after,.page .section hr:before{display:table;content:" "}.page .section hr:after{clear:both}.page .section h1,.page .section h2,.page .section h3,.page .section h4,.page .section h5,.page .section h6{margin-top:1.2em;margin-bottom:.8em;font-weight:700}.page .section h1{font-size:2em}.page .section h2{font-size:1.75em}.page .section h3{font-size:1.5em}.page .section h4{font-size:1.25em}.page .section h5,.page .section h6{font-size:1em}.page .section code,.page .section pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;direction:ltr;border:none}.page .section pre{overflow:auto;word-wrap:normal;margin:0 0 1.2em;padding:.85em 1em;background:#f7f7f7}.page .section pre>code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;font-size:.85em;white-space:pre;background:0 0}.page .section pre>code:after,.page .section pre>code:before{content:normal}.page .section code{padding:.2em;margin:0;font-size:.85em;background-color:#f7f7f7}.page .section code:after,.page .section code:before{letter-spacing:-.2em;content:"\00a0"}.page .section table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.page .section table td,.page .section table th{padding:6px 13px;border:1px solid #ddd}.page .section table tr{background-color:#fff;border-top:1px solid #ccc}.page .section table tr:nth-child(2n){background-color:#f8f8f8}.page .section ol,.page .section ul{padding:0 0 0 2em;margin-top:0;margin-bottom:0}.page .section ol ol,.page .section ol ul,.page .section ul ol,.page .section ul ul{margin-top:0;margin-bottom:0}.page .section ol ol{list-style-type:lower-roman}.page .section blockquote{margin:0;padding:0 15px;color:#858585;border-left:4px solid #e5e5e5}.page .section blockquote:first-child{margin-top:0}.page .section blockquote:last-child{margin-bottom:0}.page .section dl{padding:0}.page .section dl dt{padding:0;margin-top:.8em;font-style:italic}.pdf-footer,.pdf-header{margin-top:20px;color:#aaa}.page .section dl dd{padding:0 .8em;margin-bottom:.8em}.page .section dd{margin-left:0}.page .book-chapter{display:none}.pdf-footer{padding-top:10px;border-top:1px solid #eee}.pdf-footer .footer-pages-count{float:right}.pdf-header{padding-bottom:10px;border-bottom:1px solid #eee} \ No newline at end of file
diff --git a/theme/assets/print.css b/theme/assets/print.css
deleted file mode 100755
index 61e1d40..0000000
--- a/theme/assets/print.css
+++ /dev/null
@@ -1 +0,0 @@
-body .page ol,body .page td,body .page th,body .page ul{padding:0}body .page .anchor:focus,body .page a:active,body .page a:hover{outline:0}body .page dl dt,body .page strong,body .page table th{font-weight:700}.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}.hidden{display:none}.page.page-toc .glossary{margin-bottom:40px}.page.page-toc .glossary h2 a,.page.page-toc .glossary h2 a:hover{color:inherit;text-decoration:none}.page.page-toc .glossary .glossary-index{list-style:none;margin:0;padding:0}.page.page-toc .glossary .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}.page .book-chapter{display:none}body .page{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#000;overflow:hidden;line-height:1.6;word-wrap:break-word;display:block}body .page>:first-child{margin-top:0!important}body .page>:last-child{margin-bottom:0!important}body .page a{background:0 0;color:#4183c4;text-decoration:none}body .page h1{margin:.67em 0}body .page img{border:0}body .page hr{-moz-box-sizing:content-box;box-sizing:content-box}body .page code,body .page pre{direction:ltr;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}body .page *{-moz-box-sizing:border-box;box-sizing:border-box}body .page a:active,body .page a:focus,body .page a:hover{text-decoration:underline}body .page hr:after,body .page hr:before{display:table;content:" "}body .page hr:after{clear:both}body .page blockquote{margin:0}body .page h1,body .page h2{padding-bottom:.3em;border-bottom:1px solid #eee}body .page ol ol{list-style-type:lower-roman}body .page dd{margin-left:0}body .page .markdown-body>:first-child{margin-top:0!important}body .page .markdown-body>:last-child{margin-bottom:0!important}body .page .anchor{position:absolute;top:0;bottom:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}body .page h1,body .page h2,body .page h3,body .page h4,body .page h5,body .page h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}body .page h1{font-size:2.25em;line-height:1.2}body .page h2{font-size:1.75em;line-height:1.225}body .page h3{font-size:1.5em;line-height:1.43}body .page h4{font-size:1.25em}body .page h5,body .page h6{font-size:1em}body .page h6{color:#777}body .page blockquote,body .page dl,body .page ol,body .page p,body .page pre,body .page table,body .page ul{margin-top:0;margin-bottom:16px}body .page hr{overflow:hidden;background:#e7e7e7;height:4px;padding:0;margin:16px 0;border:0}body .page ol,body .page ul{padding-left:2em}body .page ol ol,body .page ol ul,body .page ul ul{margin-top:0;margin-bottom:0}body .page dl{padding:0}body .page dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic}body .page dl dd{padding:0 16px;margin-bottom:16px}body .page blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}body .page blockquote>:first-child{margin-top:0}body .page blockquote>:last-child{margin-bottom:0}body .page table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto}body .page table td,body .page table th{padding:6px 13px;border:1px solid #ddd}body .page table tr{background-color:#fff;border-top:1px solid #ccc}body .page table tr:nth-child(2n){background-color:#f8f8f8}body .page img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box;page-break-inside:avoid}body .page code{padding:.2em 0;margin:0;font-size:85%;background-color:#f7f7f7;border-radius:3px}body .page code:after,body .page code:before{letter-spacing:-.2em;content:"\00a0"}body .page pre>code{padding:0;margin:0;font-size:100%;white-space:pre;background:0 0;border:0}body .page .highlight pre,body .page pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border:none;border-radius:3px}body .page pre{word-wrap:normal}body .page pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}body .page pre code:after,body .page pre code:before{content:normal}body .page .highlight{background:#fff} \ No newline at end of file
diff --git a/theme/assets/app.js b/theme/assets/website/app.js
index b1dbe9a..b1dbe9a 100644
--- a/theme/assets/app.js
+++ b/theme/assets/website/app.js
diff --git a/theme/assets/fonts/fontawesome/FontAwesome.otf b/theme/assets/website/fonts/fontawesome/FontAwesome.otf
index 3461e3f..3461e3f 100644
--- a/theme/assets/fonts/fontawesome/FontAwesome.otf
+++ b/theme/assets/website/fonts/fontawesome/FontAwesome.otf
Binary files differ
diff --git a/theme/assets/fonts/fontawesome/fontawesome-webfont.eot b/theme/assets/website/fonts/fontawesome/fontawesome-webfont.eot
index 6cfd566..6cfd566 100755
--- a/theme/assets/fonts/fontawesome/fontawesome-webfont.eot
+++ b/theme/assets/website/fonts/fontawesome/fontawesome-webfont.eot
Binary files differ
diff --git a/theme/assets/fonts/fontawesome/fontawesome-webfont.svg b/theme/assets/website/fonts/fontawesome/fontawesome-webfont.svg
index a9f8469..a9f8469 100755
--- a/theme/assets/fonts/fontawesome/fontawesome-webfont.svg
+++ b/theme/assets/website/fonts/fontawesome/fontawesome-webfont.svg
diff --git a/theme/assets/fonts/fontawesome/fontawesome-webfont.ttf b/theme/assets/website/fonts/fontawesome/fontawesome-webfont.ttf
index 5cd6cff..5cd6cff 100755
--- a/theme/assets/fonts/fontawesome/fontawesome-webfont.ttf
+++ b/theme/assets/website/fonts/fontawesome/fontawesome-webfont.ttf
Binary files differ
diff --git a/theme/assets/fonts/fontawesome/fontawesome-webfont.woff b/theme/assets/website/fonts/fontawesome/fontawesome-webfont.woff
index 9eaecb3..9eaecb3 100755
--- a/theme/assets/fonts/fontawesome/fontawesome-webfont.woff
+++ b/theme/assets/website/fonts/fontawesome/fontawesome-webfont.woff
Binary files differ
diff --git a/theme/assets/images/apple-touch-icon-precomposed-152.png b/theme/assets/website/images/apple-touch-icon-precomposed-152.png
index d28c750..d28c750 100644
--- a/theme/assets/images/apple-touch-icon-precomposed-152.png
+++ b/theme/assets/website/images/apple-touch-icon-precomposed-152.png
Binary files differ
diff --git a/theme/assets/images/favicon.ico b/theme/assets/website/images/favicon.ico
index 9ee99fa..9ee99fa 100644
--- a/theme/assets/images/favicon.ico
+++ b/theme/assets/website/images/favicon.ico
Binary files differ
diff --git a/theme/assets/style.css b/theme/assets/website/style.css
index a1b92d8..68c3380 100755
--- a/theme/assets/style.css
+++ b/theme/assets/website/style.css
@@ -1,9 +1,9 @@
-/*! normalize.css v2.1.0 | MIT License | git.io/normalize */img,legend{border:0}*,.fa{-webkit-font-smoothing:antialiased}.fa-ul>li,sub,sup{position:relative}.book .book-body .page-wrapper .page-inner section.normal hr:after,.book-langs-index .inner .languages:after,.buttons:after,.dropdown-menu .buttons:after{clear:both}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}.fa,.fa-stack{display:inline-block}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body,figure{margin:0}a:focus{outline:dotted thin}.book .book-body .page-wrapper .page-inner section.normal .anchor:focus,.book .book-body .page-wrapper .page-inner section.normal a:active,.book .book-body .page-wrapper .page-inner section.normal a:hover,.button:focus,.button:hover,.dropdown-menu .buttons .button:focus,.dropdown-menu .buttons .button:hover,a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}/*!
+/*! normalize.css v2.1.0 | MIT License | git.io/normalize */img,legend{border:0}.fa-ul>li,sub,sup{position:relative}.book .book-body .page-wrapper .page-inner section.normal hr:after,.book-langs-index .inner .languages:after,.buttons:after,.dropdown-menu .buttons:after{clear:both}*,.fa{-webkit-font-smoothing:antialiased}body,html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}.hidden,[hidden]{display:none}audio:not([controls]){display:none;height:0}html{font-family:sans-serif}body,figure{margin:0}a:focus{outline:dotted thin}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}/*!
* Preboot v2
*
* Open sourced under MIT license by @mdo.
* Some variables and mixins from Bootstrap (Apache 2 license).
- *//*!
+ */.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}.fa,.fa-stack{display:inline-block}/*!
* Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
- */@font-face{font-family:FontAwesome;src:url(./fonts/fontawesome/fontawesome-webfont.eot?v=4.1.0);src:url(./fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=4.1.0) format('embedded-opentype'),url(./fonts/fontawesome/fontawesome-webfont.woff?v=4.1.0) format('woff'),url(./fonts/fontawesome/fontawesome-webfont.ttf?v=4.1.0) format('truetype'),url(./fonts/fontawesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1;-moz-osx-font-smoothing:grayscale}.book .book-header,.book .book-summary{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}.hidden{display:none}.book-langs-index{width:100%;height:100%;padding:40px 0;margin:0;overflow:auto}@media (max-width:600px){.book-langs-index{padding:0}}.book-langs-index .inner{max-width:600px;width:100%;margin:0 auto;padding:30px;background:#fff;border-radius:3px}.book-langs-index .inner h3{margin:0}.book-langs-index .inner .languages{list-style:none;padding:20px 30px;margin-top:20px;border-top:1px solid #eee}.book-langs-index .inner .languages:after,.book-langs-index .inner .languages:before{content:" ";display:table;line-height:0}.book-langs-index .inner .languages li{width:50%;float:left;padding:10px 5px;font-size:16px}@media (max-width:600px){.book-langs-index .inner .languages li{width:100%;max-width:100%}}.book .book-header{overflow:visible;height:50px;padding:0 8px;z-index:2;font-size:.85em;color:#7e888b;background:0 0}.book .book-header .btn{display:block;height:50px;padding:0 15px;border-bottom:none;color:#ccc;text-transform:uppercase;line-height:50px;-webkit-box-shadow:none!important;box-shadow:none!important;position:relative;font-size:14px}.book .book-header .btn:hover{position:relative;text-decoration:none;color:#444;background:0 0}.book .book-header h1{margin:0;font-size:20px;font-weight:200;text-align:center;line-height:50px;opacity:0;padding-left:200px;padding-right:200px;-webkit-transition:opacity .2s ease;-moz-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book .book-header h1 a,.book .book-header h1 a:hover{color:inherit;text-decoration:none}@media (max-width:1000px){.book .book-header h1{display:none}}.book .book-header h1 i{display:none}.book .book-header:hover h1{opacity:1}.book.is-loading .book-header h1 i{display:inline-block}.book.is-loading .book-header h1 a{display:none}.dropdown{position:relative}.dropdown-menu{position:absolute;top:100%;left:0;z-index:100;display:none;float:left;min-width:160px;padding:0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:1px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.open{display:block}.dropdown-menu.dropdown-left{left:auto;right:4%}.dropdown-menu.dropdown-left .dropdown-caret{right:14px;left:auto}.dropdown-menu .dropdown-caret{position:absolute;top:-8px;left:14px;width:18px;height:10px;float:left;overflow:hidden}.dropdown-menu .dropdown-caret .caret-inner,.dropdown-menu .dropdown-caret .caret-outer{display:inline-block;top:0;border-left:9px solid transparent;border-right:9px solid transparent;position:absolute}.dropdown-menu .dropdown-caret .caret-outer{border-bottom:9px solid rgba(0,0,0,.1);height:auto;left:0;width:auto;margin-left:-1px}.dropdown-menu .dropdown-caret .caret-inner{margin-top:-1px;top:1px;border-bottom:9px solid #fafafa}.dropdown-menu .buttons{border-bottom:1px solid rgba(0,0,0,.07)}.dropdown-menu .buttons:after,.dropdown-menu .buttons:before{content:" ";display:table;line-height:0}.dropdown-menu .buttons:last-child{border-bottom:none}.dropdown-menu .buttons .button{border:0;background-color:transparent;color:#a6a6a6;width:100%;text-align:center;float:left;line-height:1.42857143;padding:8px 4px}.alert,.dropdown-menu .buttons .button:hover{color:#444}.dropdown-menu .buttons .button.size-2{width:50%}.dropdown-menu .buttons .button.size-3{width:33%}.alert{padding:15px;margin-bottom:20px;background:#eee;border-bottom:5px solid #ddd}.alert-success{background:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-info{background:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-danger{background:#f2dede;border-color:#ebccd1;color:#a94442}.alert-warning{background:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.book .book-summary{position:absolute;top:0;left:-300px;bottom:0;z-index:1;width:300px;color:#364149;background:#fafafa;border-right:1px solid rgba(0,0,0,.07);-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-summary ul.summary{position:absolute;top:0;left:0;right:0;bottom:0;overflow-y:auto;list-style:none;margin:0;padding:0;-webkit-transition:top .5s ease;-moz-transition:top .5s ease;-o-transition:top .5s ease;transition:top .5s ease}.book .book-summary ul.summary li{list-style:none}.book .book-summary ul.summary li.divider{height:1px;margin:7px 0;overflow:hidden;background:rgba(0,0,0,.07)}.book .book-summary ul.summary li i.fa-check{display:none;position:absolute;right:9px;top:16px;font-size:9px;color:#3c3}.book .book-summary ul.summary li.done>a{color:#364149;font-weight:400}.book .book-summary ul.summary li.done>a i{display:inline}.book .book-summary ul.summary li a,.book .book-summary ul.summary li span{display:block;padding:10px 15px;border-bottom:none;color:#364149;background:0 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative}.book .book-summary ul.summary li span{cursor:not-allowed;opacity:.3;filter:alpha(opacity=30)}.book .book-summary ul.summary li a:hover,.book .book-summary ul.summary li.active>a{color:#008cff;background:0 0;text-decoration:none}.book .book-summary ul.summary li ul{padding-left:20px}@media (max-width:600px){.book .book-summary{width:calc(100% - 60px);bottom:0;left:-100%}}.book.with-summary .book-summary{left:0}.book.without-animation .book-summary{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.book{position:relative;width:100%;height:100%}.book .book-body,.book .book-body .body-inner{position:absolute;left:0;overflow-y:auto;top:0;bottom:0;right:0}.book .book-body{color:#000;background:#fff;-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-body .page-wrapper{position:relative;outline:0}.book .book-body .page-wrapper .page-inner{max-width:800px;margin:0 auto;padding:20px 0 40px}.book .book-body .page-wrapper .page-inner section{margin:0;padding:5px 15px;background:#fff;border-radius:2px;line-height:1.6;font-size:1.6rem}.book .book-body .page-wrapper .page-inner .btn-group .btn{border-radius:0;background:#eee;border:0}.book .book-body .page-wrapper .page-inner section.normal img,.button{border:0}@media (max-width:1240px){.book .book-body{-webkit-transition:-webkit-transform 250ms ease;-moz-transition:-moz-transform 250ms ease;-o-transition:-o-transform 250ms ease;transition:transform 250ms ease;padding-bottom:20px}.book .book-body .body-inner{position:static;min-height:calc(100% - 50px)}}@media (min-width:600px){.book.with-summary .book-body{left:300px}}@media (max-width:600px){.book.with-summary{overflow:hidden}.book.with-summary .book-body{-webkit-transform:translate(calc(100% - 60px),0);-moz-transform:translate(calc(100% - 60px),0);-ms-transform:translate(calc(100% - 60px),0);-o-transform:translate(calc(100% - 60px),0);transform:translate(calc(100% - 60px),0)}}.book.without-animation .book-body{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.buttons:after,.buttons:before{content:" ";display:table;line-height:0}.button{background:#eee;color:#666;width:100%;text-align:center;float:left;line-height:1.42857143;padding:8px 4px}.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal td,.book .book-body .page-wrapper .page-inner section.normal th,.book .book-body .page-wrapper .page-inner section.normal ul{padding:0}.button:hover{color:#444}.button.size-2{width:50%}.button.size-3{width:33%}.book .book-body .page-wrapper .page-inner section{display:none}.book .book-body .page-wrapper .page-inner section.normal{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;line-height:1.6;word-wrap:break-word;display:block}.book .book-body .page-wrapper .page-inner section.normal>:first-child{margin-top:0!important}.book .book-body .page-wrapper .page-inner section.normal>:last-child{margin-bottom:0!important}.book .book-body .page-wrapper .page-inner section.normal a{background:0 0;color:#4183c4;text-decoration:none}.book .book-body .page-wrapper .page-inner section.normal strong{font-weight:700}.book .book-body .page-wrapper .page-inner section.normal h1{margin:.67em 0}.book .book-body .page-wrapper .page-inner section.normal hr{-moz-box-sizing:content-box;box-sizing:content-box}.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal pre{direction:ltr;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px}.book .book-body .page-wrapper .page-inner section.normal *{-moz-box-sizing:border-box;box-sizing:border-box}.book .book-body .page-wrapper .page-inner section.normal a:active,.book .book-body .page-wrapper .page-inner section.normal a:focus,.book .book-body .page-wrapper .page-inner section.normal a:hover{text-decoration:underline}.book .book-body .page-wrapper .page-inner section.normal hr:after,.book .book-body .page-wrapper .page-inner section.normal hr:before{display:table;content:" "}.book .book-body .page-wrapper .page-inner section.normal blockquote{margin:0}.book .book-body .page-wrapper .page-inner section.normal ol ol{list-style-type:lower-roman}.book .book-body .page-wrapper .page-inner section.normal dd{margin-left:0}.book .book-body .page-wrapper .page-inner section.normal .markdown-body>:first-child{margin-top:0!important}.book .book-body .page-wrapper .page-inner section.normal .markdown-body>:last-child{margin-bottom:0!important}.book .book-body .page-wrapper .page-inner section.normal .anchor{position:absolute;top:0;bottom:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.book .book-body .page-wrapper .page-inner section.normal h1{padding-bottom:.3em;font-size:2.25em;line-height:1.2;border-bottom:1px solid #eee}.book .book-body .page-wrapper .page-inner section.normal h2{padding-bottom:.3em;font-size:1.75em;line-height:1.225;border-bottom:1px solid #eee}.book .book-body .page-wrapper .page-inner section.normal h3{font-size:1.5em;line-height:1.43}.book .book-body .page-wrapper .page-inner section.normal h4{font-size:1.25em}.book .book-body .page-wrapper .page-inner section.normal h5{font-size:1em}.book .book-body .page-wrapper .page-inner section.normal h6{font-size:1em;color:#777}.book .book-body .page-wrapper .page-inner section.normal blockquote,.book .book-body .page-wrapper .page-inner section.normal dl,.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal p,.book .book-body .page-wrapper .page-inner section.normal pre,.book .book-body .page-wrapper .page-inner section.normal table,.book .book-body .page-wrapper .page-inner section.normal ul{margin-top:0;margin-bottom:16px}.book .book-body .page-wrapper .page-inner section.normal hr{overflow:hidden;background:#e7e7e7;height:4px;padding:0;margin:16px 0;border:0}.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal ul{padding-left:2em}.book .book-body .page-wrapper .page-inner section.normal ol ol,.book .book-body .page-wrapper .page-inner section.normal ol ul,.book .book-body .page-wrapper .page-inner section.normal ul ul{margin-top:0;margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal dl{padding:0}.book .book-body .page-wrapper .page-inner section.normal dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.book .book-body .page-wrapper .page-inner section.normal dl dd{padding:0 16px;margin-bottom:16px}.book .book-body .page-wrapper .page-inner section.normal blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal blockquote>:first-child{margin-top:0}.book .book-body .page-wrapper .page-inner section.normal blockquote>:last-child{margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto}.book .book-body .page-wrapper .page-inner section.normal table th{font-weight:700}.book .book-body .page-wrapper .page-inner section.normal table td,.book .book-body .page-wrapper .page-inner section.normal table th{padding:6px 13px;border:1px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal table tr{background-color:#fff;border-top:1px solid #ccc}.book .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#f8f8f8}.book .book-body .page-wrapper .page-inner section.normal img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box;page-break-inside:avoid}.book .book-body .page-wrapper .page-inner section.normal code{padding:.2em 0;margin:0;font-size:85%;background-color:#f7f7f7;border-radius:3px}.book .book-body .page-wrapper .page-inner section.normal code:after,.book .book-body .page-wrapper .page-inner section.normal code:before{letter-spacing:-.2em;content:"\00a0"}.book .book-body .page-wrapper .page-inner section.normal pre>code{padding:0;margin:0;font-size:100%;white-space:pre;background:0 0;border:0}.book .book-body .page-wrapper .page-inner section.normal .highlight pre,.book .book-body .page-wrapper .page-inner section.normal pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border:none;border-radius:3px}.book .book-body .page-wrapper .page-inner section.normal pre{word-wrap:normal}.book .book-body .page-wrapper .page-inner section.normal pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.book .book-body .page-wrapper .page-inner section.normal pre code:after,.book .book-body .page-wrapper .page-inner section.normal pre code:before{content:normal}.book .book-body .page-wrapper .page-inner section.normal .highlight{background:#fff}.book .book-body .page-wrapper .page-inner section.normal .glossary-term{cursor:help;text-decoration:underline}.book .book-body .navigation{position:absolute;top:50px;bottom:0;margin:0;max-width:150px;min-width:90px;display:flex;justify-content:center;align-content:center;flex-direction:column;font-size:40px;color:#ccc;text-align:center;-webkit-transition:all 350ms ease;-moz-transition:all 350ms ease;-o-transition:all 350ms ease;transition:all 350ms ease}.book .book-body .navigation:hover{text-decoration:none;color:#444}.book .book-body .navigation.navigation-next{right:0}.book .book-body .navigation.navigation-prev{left:0}@media (max-width:1240px){.book .book-body .navigation{position:static;top:auto;max-width:50%;width:50%;display:inline-block;float:left}.book .book-body .navigation.navigation-unique{max-width:100%;width:100%}}.book .book-body .page-wrapper .page-inner section.glossary{margin-bottom:40px}.book .book-body .page-wrapper .page-inner section.glossary h2 a,.book .book-body .page-wrapper .page-inner section.glossary h2 a:hover{color:inherit;text-decoration:none}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index{list-style:none;margin:0;padding:0}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none;-webkit-touch-callout:none}a{text-decoration:none}body,html{height:100%}html{font-size:62.5%}body{text-rendering:optimizeLegibility;font-smoothing:antialiased;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;letter-spacing:.2px} \ No newline at end of file
+ */@font-face{font-family:FontAwesome;src:url(./fonts/fontawesome/fontawesome-webfont.eot?v=4.1.0);src:url(./fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=4.1.0) format('embedded-opentype'),url(./fonts/fontawesome/fontawesome-webfont.woff?v=4.1.0) format('woff'),url(./fonts/fontawesome/fontawesome-webfont.ttf?v=4.1.0) format('truetype'),url(./fonts/fontawesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1;-moz-osx-font-smoothing:grayscale}.book .book-header,.book .book-summary{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.book-langs-index{width:100%;height:100%;padding:40px 0;margin:0;overflow:auto}@media (max-width:600px){.book-langs-index{padding:0}}.book-langs-index .inner{max-width:600px;width:100%;margin:0 auto;padding:30px;background:#fff;border-radius:3px}.book-langs-index .inner h3{margin:0}.book-langs-index .inner .languages{list-style:none;padding:20px 30px;margin-top:20px;border-top:1px solid #eee}.book-langs-index .inner .languages:after,.book-langs-index .inner .languages:before{content:" ";display:table;line-height:0}.book-langs-index .inner .languages li{width:50%;float:left;padding:10px 5px;font-size:16px}@media (max-width:600px){.book-langs-index .inner .languages li{width:100%;max-width:100%}}.book .book-header{overflow:visible;height:50px;padding:0 8px;z-index:2;font-size:.85em;color:#7e888b;background:0 0}.book .book-header .btn{display:block;height:50px;padding:0 15px;border-bottom:none;color:#ccc;text-transform:uppercase;line-height:50px;-webkit-box-shadow:none!important;box-shadow:none!important;position:relative;font-size:14px}.book .book-header .btn:hover{position:relative;text-decoration:none;color:#444;background:0 0}.book .book-header h1{margin:0;font-size:20px;font-weight:200;text-align:center;line-height:50px;opacity:0;padding-left:200px;padding-right:200px;-webkit-transition:opacity .2s ease;-moz-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book .book-header h1 a,.book .book-header h1 a:hover{color:inherit;text-decoration:none}@media (max-width:1000px){.book .book-header h1{display:none}}.book .book-header h1 i{display:none}.book .book-header:hover h1{opacity:1}.book.is-loading .book-header h1 i{display:inline-block}.book.is-loading .book-header h1 a{display:none}.dropdown{position:relative}.dropdown-menu{position:absolute;top:100%;left:0;z-index:100;display:none;float:left;min-width:160px;padding:0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:1px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.open{display:block}.dropdown-menu.dropdown-left{left:auto;right:4%}.dropdown-menu.dropdown-left .dropdown-caret{right:14px;left:auto}.dropdown-menu .dropdown-caret{position:absolute;top:-8px;left:14px;width:18px;height:10px;float:left;overflow:hidden}.dropdown-menu .dropdown-caret .caret-inner,.dropdown-menu .dropdown-caret .caret-outer{display:inline-block;top:0;border-left:9px solid transparent;border-right:9px solid transparent;position:absolute}.dropdown-menu .dropdown-caret .caret-outer{border-bottom:9px solid rgba(0,0,0,.1);height:auto;left:0;width:auto;margin-left:-1px}.dropdown-menu .dropdown-caret .caret-inner{margin-top:-1px;top:1px;border-bottom:9px solid #fafafa}.dropdown-menu .buttons{border-bottom:1px solid rgba(0,0,0,.07)}.dropdown-menu .buttons:after,.dropdown-menu .buttons:before{content:" ";display:table;line-height:0}.dropdown-menu .buttons:last-child{border-bottom:none}.dropdown-menu .buttons .button{border:0;background-color:transparent;color:#a6a6a6;width:100%;text-align:center;float:left;line-height:1.42857143;padding:8px 4px}.alert,.dropdown-menu .buttons .button:hover{color:#444}.dropdown-menu .buttons .button:focus,.dropdown-menu .buttons .button:hover{outline:0}.dropdown-menu .buttons .button.size-2{width:50%}.dropdown-menu .buttons .button.size-3{width:33%}.alert{padding:15px;margin-bottom:20px;background:#eee;border-bottom:5px solid #ddd}.alert-success{background:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-info{background:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-danger{background:#f2dede;border-color:#ebccd1;color:#a94442}.alert-warning{background:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.book .book-summary{position:absolute;top:0;left:-300px;bottom:0;z-index:1;width:300px;color:#364149;background:#fafafa;border-right:1px solid rgba(0,0,0,.07);-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-summary ul.summary{position:absolute;top:0;left:0;right:0;bottom:0;overflow-y:auto;list-style:none;margin:0;padding:0;-webkit-transition:top .5s ease;-moz-transition:top .5s ease;-o-transition:top .5s ease;transition:top .5s ease}.book .book-summary ul.summary li{list-style:none}.book .book-summary ul.summary li.divider{height:1px;margin:7px 0;overflow:hidden;background:rgba(0,0,0,.07)}.book .book-summary ul.summary li i.fa-check{display:none;position:absolute;right:9px;top:16px;font-size:9px;color:#3c3}.book .book-summary ul.summary li.done>a{color:#364149;font-weight:400}.book .book-summary ul.summary li.done>a i{display:inline}.book .book-summary ul.summary li a,.book .book-summary ul.summary li span{display:block;padding:10px 15px;border-bottom:none;color:#364149;background:0 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative}.book .book-summary ul.summary li span{cursor:not-allowed;opacity:.3;filter:alpha(opacity=30)}.book .book-summary ul.summary li a:hover,.book .book-summary ul.summary li.active>a{color:#008cff;background:0 0;text-decoration:none}.book .book-summary ul.summary li ul{padding-left:20px}@media (max-width:600px){.book .book-summary{width:calc(100% - 60px);bottom:0;left:-100%}}.book.with-summary .book-summary{left:0}.book.without-animation .book-summary{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.book{position:relative;width:100%;height:100%}.book .book-body,.book .book-body .body-inner{position:absolute;top:0;left:0;overflow-y:auto;bottom:0;right:0}.book .book-body{color:#000;background:#fff;-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-body .page-wrapper{position:relative;outline:0}.book .book-body .page-wrapper .page-inner{max-width:800px;margin:0 auto;padding:20px 0 40px}.book .book-body .page-wrapper .page-inner section{margin:0;padding:5px 15px;background:#fff;border-radius:2px;line-height:1.7;font-size:1.6rem}.book .book-body .page-wrapper .page-inner .btn-group .btn{border-radius:0;background:#eee;border:0}@media (max-width:1240px){.book .book-body{-webkit-transition:-webkit-transform 250ms ease;-moz-transition:-moz-transform 250ms ease;-o-transition:-o-transform 250ms ease;transition:transform 250ms ease;padding-bottom:20px}.book .book-body .body-inner{position:static;min-height:calc(100% - 50px)}}@media (min-width:600px){.book.with-summary .book-body{left:300px}}@media (max-width:600px){.book.with-summary{overflow:hidden}.book.with-summary .book-body{-webkit-transform:translate(calc(100% - 60px),0);-moz-transform:translate(calc(100% - 60px),0);-ms-transform:translate(calc(100% - 60px),0);-o-transform:translate(calc(100% - 60px),0);transform:translate(calc(100% - 60px),0)}}.book.without-animation .book-body{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.buttons:after,.buttons:before{content:" ";display:table;line-height:0}.button{border:0;background:#eee;color:#666;width:100%;text-align:center;float:left;line-height:1.42857143;padding:8px 4px}.button:hover{color:#444}.button:focus,.button:hover{outline:0}.button.size-2{width:50%}.button.size-3{width:33%}.book .book-body .page-wrapper .page-inner section{display:none}.book .book-body .page-wrapper .page-inner section.normal{display:block;word-wrap:break-word;overflow:hidden;color:#333;line-height:1.7}.book .book-body .page-wrapper .page-inner section.normal *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.book .book-body .page-wrapper .page-inner section.normal>:first-child{margin-top:0!important}.book .book-body .page-wrapper .page-inner section.normal>:last-child{margin-bottom:0!important}.book .book-body .page-wrapper .page-inner section.normal blockquote,.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal figure,.book .book-body .page-wrapper .page-inner section.normal img,.book .book-body .page-wrapper .page-inner section.normal pre,.book .book-body .page-wrapper .page-inner section.normal table,.book .book-body .page-wrapper .page-inner section.normal tr{page-break-inside:avoid}.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal p{orphans:3;widows:3}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5{page-break-after:avoid}.book .book-body .page-wrapper .page-inner section.normal b,.book .book-body .page-wrapper .page-inner section.normal strong{font-weight:700}.book .book-body .page-wrapper .page-inner section.normal em{font-style:italic}.book .book-body .page-wrapper .page-inner section.normal blockquote,.book .book-body .page-wrapper .page-inner section.normal dl,.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal p,.book .book-body .page-wrapper .page-inner section.normal table,.book .book-body .page-wrapper .page-inner section.normal ul{margin-top:0;margin-bottom:.85em}.book .book-body .page-wrapper .page-inner section.normal a{color:#4183c4;text-decoration:none;background:0 0}.book .book-body .page-wrapper .page-inner section.normal a:active,.book .book-body .page-wrapper .page-inner section.normal a:focus,.book .book-body .page-wrapper .page-inner section.normal a:hover{outline:0;text-decoration:underline}.book .book-body .page-wrapper .page-inner section.normal img{border:0;max-width:100%}.book .book-body .page-wrapper .page-inner section.normal hr{height:4px;padding:0;margin:1.7em 0;overflow:hidden;background-color:#e7e7e7;border:none}.book .book-body .page-wrapper .page-inner section.normal hr:after,.book .book-body .page-wrapper .page-inner section.normal hr:before{display:table;content:" "}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal h6{margin-top:1.275em;margin-bottom:.85em;font-weight:700}.book .book-body .page-wrapper .page-inner section.normal h1{font-size:2em}.book .book-body .page-wrapper .page-inner section.normal h2{font-size:1.75em}.book .book-body .page-wrapper .page-inner section.normal h3{font-size:1.5em}.book .book-body .page-wrapper .page-inner section.normal h4{font-size:1.25em}.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal h6{font-size:1em}.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;direction:ltr;border:none}.book .book-body .page-wrapper .page-inner section.normal pre{overflow:auto;word-wrap:normal;margin:0 0 1.275em;padding:.85em 1em;background:#f7f7f7}.book .book-body .page-wrapper .page-inner section.normal pre>code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;font-size:.85em;white-space:pre;background:0 0}.book .book-body .page-wrapper .page-inner section.normal pre>code:after,.book .book-body .page-wrapper .page-inner section.normal pre>code:before{content:normal}.book .book-body .page-wrapper .page-inner section.normal code{padding:.2em;margin:0;font-size:.85em;background-color:#f7f7f7}.book .book-body .page-wrapper .page-inner section.normal code:after,.book .book-body .page-wrapper .page-inner section.normal code:before{letter-spacing:-.2em;content:"\00a0"}.book .book-body .page-wrapper .page-inner section.normal table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.book .book-body .page-wrapper .page-inner section.normal table td,.book .book-body .page-wrapper .page-inner section.normal table th{padding:6px 13px;border:1px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal table tr{background-color:#fff;border-top:1px solid #ccc}.book .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#f8f8f8}.book .book-body .page-wrapper .page-inner section.normal table th{font-weight:700}.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal ul{padding:0 0 0 2em;margin-top:0;margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal ol ol,.book .book-body .page-wrapper .page-inner section.normal ol ul,.book .book-body .page-wrapper .page-inner section.normal ul ol,.book .book-body .page-wrapper .page-inner section.normal ul ul{margin-top:0;margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal ol ol{list-style-type:lower-roman}.book .book-body .page-wrapper .page-inner section.normal blockquote{margin:0;padding:0 15px;color:#858585;border-left:4px solid #e5e5e5}.book .book-body .page-wrapper .page-inner section.normal blockquote:first-child{margin-top:0}.book .book-body .page-wrapper .page-inner section.normal blockquote:last-child{margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal dl{padding:0}.book .book-body .page-wrapper .page-inner section.normal dl dt{padding:0;margin-top:.85em;font-style:italic;font-weight:700}.book .book-body .page-wrapper .page-inner section.normal dl dd{padding:0 .85em;margin-bottom:.85em}.book .book-body .page-wrapper .page-inner section.normal dd{margin-left:0}.book .book-body .page-wrapper .page-inner section.normal .glossary-term{cursor:help;text-decoration:underline}.book .book-body .navigation{position:absolute;top:50px;bottom:0;margin:0;max-width:150px;min-width:90px;display:flex;justify-content:center;align-content:center;flex-direction:column;font-size:40px;color:#ccc;text-align:center;-webkit-transition:all 350ms ease;-moz-transition:all 350ms ease;-o-transition:all 350ms ease;transition:all 350ms ease}.book .book-body .navigation:hover{text-decoration:none;color:#444}.book .book-body .navigation.navigation-next{right:0}.book .book-body .navigation.navigation-prev{left:0}@media (max-width:1240px){.book .book-body .navigation{position:static;top:auto;max-width:50%;width:50%;display:inline-block;float:left}.book .book-body .navigation.navigation-unique{max-width:100%;width:100%}}.book .book-body .page-wrapper .page-inner section.glossary{margin-bottom:40px}.book .book-body .page-wrapper .page-inner section.glossary h2 a,.book .book-body .page-wrapper .page-inner section.glossary h2 a:hover{color:inherit;text-decoration:none}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index{list-style:none;margin:0;padding:0}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none;-webkit-touch-callout:none}a{text-decoration:none}body,html{height:100%}html{font-size:62.5%}body{text-rendering:optimizeLegibility;font-smoothing:antialiased;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;letter-spacing:.2px;text-size-adjust:100%} \ No newline at end of file
diff --git a/theme/stylesheets/base/markdown.less b/theme/stylesheets/base/markdown.less
deleted file mode 100644
index a214502..0000000
--- a/theme/stylesheets/base/markdown.less
+++ /dev/null
@@ -1,389 +0,0 @@
-.markdown-content(@md-color, @md-line-height) {
- -ms-text-size-adjust: 100%;
- -webkit-text-size-adjust: 100%;
- line-height: 1.4;
- color: @md-color;
- overflow: hidden;
- line-height: @md-line-height;
- word-wrap: break-word;
- display: block;
-
- & > *:first-child {
- margin-top: 0 !important;
- }
- & > *:last-child {
- margin-bottom: 0 !important;
- }
-
- a {
- background: transparent;
- }
-
- a:active,
- a:hover {
- outline: 0;
- }
-
- strong {
- font-weight: bold;
- }
-
- h1 {
- font-size: 2em;
- margin: 0.67em 0;
- }
-
- img {
- border: 0;
- }
-
- hr {
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- height: 0;
- }
-
- pre {
- overflow: auto;
- }
-
- code,
- pre {
- font-family: monospace, monospace;
- font-size: 1em;
- direction: ltr;
- }
-
- table {
- border-collapse: collapse;
- border-spacing: 0;
- }
-
- td,
- th {
- padding: 0;
- }
-
- * {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
-
- a {
- color: #4183c4;
- text-decoration: none;
- }
-
- a:hover,
- a:focus,
- a:active {
- text-decoration: underline;
- }
-
- hr {
- height: 0;
- margin: 15px 0;
- overflow: hidden;
- background: transparent;
- border: 0;
- border-bottom: 1px solid #ddd;
- }
-
- hr:before,
- hr:after {
- display: table;
- content: " ";
- }
-
- hr:after {
- clear: both;
- }
-
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- margin-top: 15px;
- margin-bottom: 15px;
- line-height: 1.1;
- }
-
- h1 {
- font-size: 30px;
- }
-
- h2 {
- font-size: 21px;
- }
-
- h3 {
- font-size: 16px;
- }
-
- h4 {
- font-size: 14px;
- }
-
- h5 {
- font-size: 12px;
- }
-
- h6 {
- font-size: 11px;
- }
-
- blockquote {
- margin: 0;
- }
-
- ul,
- ol {
- padding: 0;
- margin-top: 0;
- margin-bottom: 0;
- }
-
- ol ol {
- list-style-type: lower-roman;
- }
-
- dd {
- margin-left: 0;
- }
-
- code,
- pre {
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
- font-size: 12px;
- }
-
- pre {
- margin-top: 0;
- margin-bottom: 0;
- }
-
- .markdown-body>*:first-child {
- margin-top: 0 !important;
- }
-
- .markdown-body>*:last-child {
- margin-bottom: 0 !important;
- }
-
- .anchor {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- display: block;
- padding-right: 6px;
- padding-left: 30px;
- margin-left: -30px;
- }
-
- .anchor:focus {
- outline: none;
- }
-
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- position: relative;
- margin-top: 1em;
- margin-bottom: 16px;
- font-weight: bold;
- line-height: 1.4;
- }
-
- h1 {
- padding-bottom: 0.3em;
- font-size: 2.25em;
- line-height: 1.2;
- border-bottom: 1px solid #eee;
- }
-
- h2 {
- padding-bottom: 0.3em;
- font-size: 1.75em;
- line-height: 1.225;
- border-bottom: 1px solid #eee;
- }
-
- h3 {
- font-size: 1.5em;
- line-height: 1.43;
- }
-
- h4 {
- font-size: 1.25em;
- }
-
- h5 {
- font-size: 1em;
- }
-
- h6 {
- font-size: 1em;
- color: #777;
- }
-
- p,
- blockquote,
- ul,
- ol,
- dl,
- table,
- pre {
- margin-top: 0;
- margin-bottom: 16px;
- }
-
- hr {
- height: 4px;
- padding: 0;
- margin: 16px 0;
- background-color: #e7e7e7;
- border: 0 none;
- }
-
- ul,
- ol {
- padding-left: 2em;
- }
-
- ol ol,
- ol ul,
- ul ul {
- margin-top: 0;
- margin-bottom: 0;
- }
-
- dl {
- padding: 0;
- }
-
- dl dt {
- padding: 0;
- margin-top: 16px;
- font-size: 1em;
- font-style: italic;
- font-weight: bold;
- }
-
- dl dd {
- padding: 0 16px;
- margin-bottom: 16px;
- }
-
- blockquote {
- padding: 0 15px;
- color: #777;
- border-left: 4px solid #ddd;
- }
-
- blockquote>:first-child {
- margin-top: 0;
- }
-
- blockquote>:last-child {
- margin-bottom: 0;
- }
-
- table {
- display: block;
- width: 100%;
- overflow: auto;
- }
-
- table th {
- font-weight: bold;
- }
-
- table th,
- table td {
- padding: 6px 13px;
- border: 1px solid #ddd;
- }
-
- table tr {
- background-color: #fff;
- border-top: 1px solid #ccc;
- }
-
- table tr:nth-child(2n) {
- background-color: #f8f8f8;
- }
-
- img {
- max-width: 100%;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- page-break-inside: avoid;
- }
-
- code {
- padding: 0;
- padding-top: 0.2em;
- padding-bottom: 0.2em;
- margin: 0;
- font-size: 85%;
- background-color: #f7f7f7;
- border-radius: 3px;
- }
-
- code:before,
- code:after {
- letter-spacing: -0.2em;
- content: "\00a0";
- }
-
- pre>code {
- padding: 0;
- margin: 0;
- font-size: 100%;
- white-space: pre;
- background: transparent;
- border: 0;
- }
-
- .highlight pre,
- pre {
- padding: 16px;
- overflow: auto;
- font-size: 85%;
- line-height: 1.45;
- background-color: #f7f7f7;
- border: none;
- border-radius: 3px;
- }
-
- pre {
- word-wrap: normal;
- }
-
- pre code {
- display: inline;
- max-width: initial;
- padding: 0;
- margin: 0;
- overflow: initial;
- line-height: inherit;
- word-wrap: normal;
- background-color: transparent;
- border: 0;
- }
-
- pre code:before,
- pre code:after {
- content: normal;
- }
-
- .highlight {
- background: #ffffff;
- }
-}
diff --git a/theme/stylesheets/base/markup.less b/theme/stylesheets/base/markup.less
new file mode 100644
index 0000000..39ebbe2
--- /dev/null
+++ b/theme/stylesheets/base/markup.less
@@ -0,0 +1,254 @@
+.markup-content(@md-color: #000, @md-line-height: 1.7, @md-link-color: #4183c4, @md-code-background: #f7f7f7, @md-code-fontsize: 0.85, @md-blockquote-color: #858585, @md-blockquote-border: #e5e5e5) {
+ // Rate of growth for headings
+ @scale: 0.25;
+
+ // Spacing between blocks
+ @spacing: @md-line-height * 2 * @scale * 1em;
+ @spacing-lg: @md-line-height * 3 * @scale * 1em;
+
+
+ display: block;
+ word-wrap: break-word;
+ overflow: hidden;
+
+ color: @md-color;
+ line-height: @md-line-height;
+
+ * {
+ .box-sizing(border-box);
+ }
+
+ & > *:first-child {
+ margin-top: 0 !important;
+ }
+ & > *:last-child {
+ margin-bottom: 0 !important;
+ }
+
+ /* Printing */
+ pre, code, blockquote, tr, img, table, figure {
+ page-break-inside: avoid;
+ }
+
+ p, h2, h3, h4, h5 {
+ orphans: 3;
+ widows: 3;
+ }
+
+ h1, h2, h3, h4, h5 {
+ page-break-after: avoid;
+ }
+
+ /* Typography */
+ strong, b {
+ font-weight: bold;
+ }
+
+ em {
+ font-style: italic;
+ }
+
+ /* Spacing */
+ p, blockquote, ul, ol, dl, table {
+ margin-top: 0;
+ margin-bottom: @spacing;
+ }
+
+ /* Links */
+ a {
+ color: @md-link-color;
+ text-decoration: none;
+ background: transparent;
+
+ &:hover,
+ &:focus,
+ &:active {
+ outline: 0;
+ text-decoration: underline;
+ }
+ }
+
+ /* Images */
+ img {
+ border: 0;
+ max-width: 100%;
+ }
+
+ /* Horizontal lines */
+ hr {
+ height: 4px;
+ padding: 0;
+ margin: @md-line-height * 1em 0;
+ overflow: hidden;
+ background-color: #e7e7e7;
+ border: none;
+
+ &:before, &:after {
+ display: table;
+ content: " ";
+ }
+
+ &:after {
+ clear: both;
+ }
+ }
+
+ /* Headings */
+ h1, h2, h3, h4, h5, h6 {
+ margin-top: @spacing-lg;
+ margin-bottom: @spacing;
+ font-weight: bold;
+ }
+
+ h1 {
+ font-size: (4 * @scale) + 1em;
+ }
+
+ h2 {
+ font-size: (3 * @scale) + 1em;
+ }
+
+ h3 {
+ font-size: (2 * @scale) + 1em;
+ }
+
+ h4 {
+ font-size: @scale + 1em;
+ }
+
+ h5 {
+ font-size: 1em;
+ }
+
+ h6 {
+ font-size: 1em;
+ }
+
+ /* Code blocks */
+ code, pre {
+ font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ direction: ltr;
+ margin: 0px;
+ padding: 0px;
+ border: none;
+ }
+
+ pre {
+ overflow: auto;
+ word-wrap: normal;
+ margin: 0px;
+ padding: 0.85em 1em;
+ margin-bottom: @spacing-lg;
+ background: @md-code-background;
+
+ > code {
+ display: inline;
+ max-width: initial;
+ padding: 0;
+ margin: 0;
+ overflow: initial;
+ line-height: inherit;
+ font-size: @md-code-fontsize * 1em;
+ white-space: pre;
+ background: transparent;
+
+ &:before, &:after {
+ content: normal;
+ }
+ }
+ }
+
+ code {
+ padding: 0.2em;
+ margin: 0;
+ font-size: @md-code-fontsize * 1em;
+ background-color: @md-code-background;
+
+ &:before, &:after {
+ letter-spacing: -0.2em;
+ content: "\00a0";
+ }
+ }
+
+ /* Tables */
+ table {
+ display: table;
+ width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
+ overflow: auto;
+
+ td, th {
+ padding: 6px 13px;
+ border: 1px solid #ddd;
+ }
+
+ tr {
+ background-color: #fff;
+ border-top: 1px solid #ccc;
+
+ &:nth-child(2n) {
+ background-color: #f8f8f8;
+ }
+ }
+
+ th {
+ font-weight: bold;
+ }
+ }
+
+ /* Lists */
+ ul, ol {
+ padding: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-left: 2em;
+
+ ol, ul {
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+ }
+
+ ol ol {
+ list-style-type: lower-roman;
+ }
+
+
+ /* Blockquote */
+ blockquote {
+ margin: 0;
+ padding: 0 15px;
+ color: @md-blockquote-color;
+ border-left: 4px solid @md-blockquote-border;
+
+ &:first-child {
+ margin-top: 0;
+ }
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
+
+ /* Description Lists */
+ dl {
+ padding: 0;
+
+ dt {
+ padding: 0;
+ margin-top: @spacing;
+ font-style: italic;
+ font-weight: bold;
+ }
+
+ dd {
+ padding: 0 @spacing;
+ margin-bottom: @spacing;
+ }
+ }
+
+ dd {
+ margin-left: 0;
+ }
+}
diff --git a/theme/stylesheets/mixins.less b/theme/stylesheets/base/mixins.less
index 9d28305..7175ce1 100755..100644
--- a/theme/stylesheets/mixins.less
+++ b/theme/stylesheets/base/mixins.less
@@ -1,4 +1,4 @@
-@import "base/markdown.less";
+@import "./markup.less";
.link-inherit {
color: inherit;
@@ -18,3 +18,15 @@
.hidden {
display: none;
}
+
+.box-sizing(@value) {
+ -moz-box-sizing: @value;
+ box-sizing: @value;
+}
+
+.text-adjust(@value) {
+ text-size-adjust: @value;
+ -ms-text-size-adjust: @value;
+ -webkit-text-size-adjust: @value;
+}
+
diff --git a/theme/stylesheets/ebook.less b/theme/stylesheets/ebook.less
index 92bc915..c36b161 100755..100644
--- a/theme/stylesheets/ebook.less
+++ b/theme/stylesheets/ebook.less
@@ -1,43 +1 @@
-@import "mixins.less";
-
-@import "ebook/variables.less";
-
-.page {
- &.page-toc {
- .glossary {
- margin-bottom: 40px;
-
- h2 {
- a, a:hover {
- color: inherit;
- text-decoration: none;
- }
- }
-
- .glossary-index {
- list-style: none;
- margin: 0px;
- padding: 0px;
-
- li {
- display: inline;
- margin: 0px 8px;
- white-space: nowrap;
- }
- }
- }
- }
-
- .book-chapter {
- display: none;
- }
-}
-
-
-
-body {
- .page {
- font-family: sans-serif;
- .markdown-content(#000, 1.6);
- }
-}
+@import "./ebook/base.less";
diff --git a/theme/stylesheets/ebook/base.less b/theme/stylesheets/ebook/base.less
new file mode 100644
index 0000000..65a053c
--- /dev/null
+++ b/theme/stylesheets/ebook/base.less
@@ -0,0 +1,23 @@
+@import "../base/mixins.less";
+@import "./variables.less";
+
+@import "./summary.less";
+@import "./glossary.less";
+
+body {
+ font-family: @font-family-base;
+ color: @text-color;
+ .text-adjust(100%);
+}
+
+.page {
+ // Section and first titles
+ .section {
+ .markup-content(@text-color, 1.6, @md-link-color: @link-color);
+ }
+
+ // Hide the title (only used to build PDF table of content)
+ .book-chapter {
+ display: none;
+ }
+}
diff --git a/theme/stylesheets/ebook/glossary.less b/theme/stylesheets/ebook/glossary.less
new file mode 100644
index 0000000..8ed9a1b
--- /dev/null
+++ b/theme/stylesheets/ebook/glossary.less
@@ -0,0 +1,28 @@
+.section.glossary {
+ > h1 {
+ text-align: center;
+ }
+
+ .glossary-entry {
+ margin-bottom: 40px;
+
+ h2 {
+ a, a:hover {
+ color: inherit;
+ text-decoration: none;
+ }
+ }
+
+ .glossary-index {
+ list-style: none;
+ margin: 0px;
+ padding: 0px;
+
+ li {
+ display: inline;
+ margin: 0px 8px;
+ white-space: nowrap;
+ }
+ }
+ }
+}
diff --git a/theme/stylesheets/ebook/summary.less b/theme/stylesheets/ebook/summary.less
new file mode 100644
index 0000000..37d2bda
--- /dev/null
+++ b/theme/stylesheets/ebook/summary.less
@@ -0,0 +1,56 @@
+.section.toc {
+ > h1 {
+ text-align: center;
+ }
+
+ > ol {
+ margin: 0px;
+ padding: 0px;
+ }
+
+ li {
+ list-style: none;
+
+ .inner {
+ display: block;
+ border-bottom: 1px dotted #eee;
+ margin-bottom: 4px;
+
+ a, span {
+ padding-right: 5px;
+ border-bottom: 1px solid #fff;
+ margin-bottom: -1px;
+ }
+
+ .page {
+ float: right;
+ padding-left: 5px;
+ }
+ }
+
+ ol {
+ margin: 0px;
+ padding: 0px;
+ padding-left: 2em;
+ }
+ }
+}
+
+// For LTR, fix direction of table of content
+.dir-rtl {
+ .section.toc {
+ li {
+ .inner {
+ .page {
+ float: left;
+ }
+ }
+
+ ol {
+ margin: 0px;
+ padding: 0px;
+ padding-right: 2em;
+ }
+ }
+ }
+}
diff --git a/theme/stylesheets/ebook/variables.less b/theme/stylesheets/ebook/variables.less
index 4714151..fda5d47 100644
--- a/theme/stylesheets/ebook/variables.less
+++ b/theme/stylesheets/ebook/variables.less
@@ -1 +1,5 @@
-@font-size-base: 13px;
+@font-size-base: 13px;
+@font-family-base: sans-serif;
+
+@text-color: #000;
+@link-color: #4183c4;
diff --git a/theme/stylesheets/epub.less b/theme/stylesheets/epub.less
new file mode 100644
index 0000000..16dd496
--- /dev/null
+++ b/theme/stylesheets/epub.less
@@ -0,0 +1,3 @@
+@import "./ebook/base.less";
+
+@font-family-base: serif;
diff --git a/theme/stylesheets/mobi.less b/theme/stylesheets/mobi.less
new file mode 100644
index 0000000..a963197
--- /dev/null
+++ b/theme/stylesheets/mobi.less
@@ -0,0 +1,23 @@
+@import "./ebook/base.less";
+
+@font-family-base: serif;
+@link-color: #000;
+
+a {
+ color: #000;
+ text-decoration: underline !important;
+}
+
+.page-toc {
+ li {
+ list-style-type: lower-alpha;
+
+ .inner {
+ border: none;
+
+ span.page {
+ display: none;
+ }
+ }
+ }
+}
diff --git a/theme/stylesheets/pdf.less b/theme/stylesheets/pdf.less
new file mode 100644
index 0000000..4d1a99a
--- /dev/null
+++ b/theme/stylesheets/pdf.less
@@ -0,0 +1,20 @@
+@import "./ebook/base.less";
+
+.pdf-footer {
+ margin-top: 20px;
+ padding-top: 10px;
+ border-top: 1px solid #eee;
+ color:#aaa;
+
+ .footer-pages-count {
+ float: right;
+ }
+}
+
+.pdf-header {
+ margin-top: 20px;
+ padding-bottom: 10px;
+ border-bottom: 1px solid #eee;
+ color: #aaa;
+}
+
diff --git a/theme/stylesheets/website.less b/theme/stylesheets/website.less
index 2562201..d808a0b 100755
--- a/theme/stylesheets/website.less
+++ b/theme/stylesheets/website.less
@@ -1,8 +1,8 @@
@import "base/normalize.less";
@import "base/preboot.less";
+@import "base/mixins.less";
@import "../../node_modules/font-awesome/less/font-awesome.less";
-@import "mixins.less";
@import "website/variables.less";
@import "website/languages.less";
@@ -12,7 +12,7 @@
@import "website/summary.less";
@import "website/body.less";
@import "website/buttons.less";
-@import "website/markdown.less";
+@import "website/markup.less";
@import "website/navigation.less";
@import "website/glossary.less";
@@ -43,4 +43,5 @@ body {
font-family: @font-family-base;
font-size: @font-size-base;
letter-spacing: .2px;
+ .text-adjust(100%);
}
diff --git a/theme/stylesheets/website/markdown.less b/theme/stylesheets/website/markup.less
index eef2a1d..26e2fdf 100755
--- a/theme/stylesheets/website/markdown.less
+++ b/theme/stylesheets/website/markup.less
@@ -3,7 +3,7 @@
}
.book .book-body .page-wrapper .page-inner section.normal {
- .markdown-content(@content-color, @content-line-height);
+ .markup-content(@content-color, @content-line-height);
.glossary-term {
cursor: help;
diff --git a/theme/stylesheets/website/variables.less b/theme/stylesheets/website/variables.less
index 4d3e884..d543015 100644
--- a/theme/stylesheets/website/variables.less
+++ b/theme/stylesheets/website/variables.less
@@ -51,7 +51,7 @@
@page-background: @body-background;
// Content
-@content-line-height: 1.6;
+@content-line-height: 1.7;
@content-color: #333333;
// Dropdown
diff --git a/theme/templates/ebook/footer.html b/theme/templates/ebook/footer.html
new file mode 100644
index 0000000..8592213
--- /dev/null
+++ b/theme/templates/ebook/footer.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ <div class="pdf-footer">
+ <span>_SECTION_</span>
+ <span class="footer-pages-count">_PAGENUM_</span>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/theme/templates/ebook/glossary.html b/theme/templates/ebook/glossary.html
index 1266f27..ddc8809 100644
--- a/theme/templates/ebook/glossary.html
+++ b/theme/templates/ebook/glossary.html
@@ -2,20 +2,21 @@
{% block title %}{{ __("GLOSSARY") }} | {{ title }}{% endblock %}
-{% block content %}
-<div class="page page-toc">
+{% block page %}
<h1 class="book-chapter book-chapter-1">{{ __("GLOSSARY") }}</h1>
- <h1>{{ __("GLOSSARY") }}</h1>
- {% for item in glossary %}
- <section class="normal glossary" id="{{ item.id }}">
- <h2><a href="#{{ item.id }}">{{ item.name }}</a></h2>
- <p>{{ item.description|safe }}</p>
- <ul class="glossary-index">
- {% for file in item.files %}
- <li><a href="{{ basePath }}/{{ file.path|contentLink }}"><span class="level">{{ file.level }}.</span> {{ file.title }}</a></li>
+ <div class="section glossary">
+ <h1>{{ __("GLOSSARY") }}</h1>
+
+ {% for item in glossary %}
+ <div class="glossary-entry" id="{{ item.id }}">
+ <h2><a href="#{{ item.id }}">{{ item.name }}</a></h2>
+ <p>{{ item.description|safe }}</p>
+ <ul class="glossary-index">
+ {% for file in item.files %}
+ <li><a href="{{ basePath }}/{{ file.path|contentLink }}"><span class="level">{{ file.level }}.</span> {{ file.title }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
{% endfor %}
- </ul>
- </section>
- {% endfor %}
-</div>
+ </div>
{% endblock %}
diff --git a/theme/templates/ebook/header.html b/theme/templates/ebook/header.html
new file mode 100644
index 0000000..6b5d295
--- /dev/null
+++ b/theme/templates/ebook/header.html
@@ -0,0 +1,7 @@
+<html>
+ <body>
+ <div class="pdf-header">
+ <span>_TITLE_</span>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/theme/templates/ebook/layout.html b/theme/templates/ebook/layout.html
index 982618f..e45430d 100644
--- a/theme/templates/ebook/layout.html
+++ b/theme/templates/ebook/layout.html
@@ -14,7 +14,7 @@
{% block style %}{% endblock %}
{{ htmlSnippet("head:end")|default("", true)|safe }}
</head>
- <body>
+ <body class="dir-{{ options.direction }}">
{{ htmlSnippet("body:start")|default("", true)|safe }}
{% block content %}{% endblock %}
{% block javascript %}{% endblock %}
diff --git a/theme/templates/ebook/page.html b/theme/templates/ebook/page.html
index f207184..47420b8 100644
--- a/theme/templates/ebook/page.html
+++ b/theme/templates/ebook/page.html
@@ -3,9 +3,12 @@
{% block title %}{{ progress.current.title }} | {{ title }}{% endblock %}
{% block style %}
+ {# Default styles if not disabled #}
{% if not styles.print %}
- <link rel="stylesheet" href="{{ staticBase }}/print.css">
+ <link rel="stylesheet" href="{{ staticBase }}/{{ options.generator }}.css">
{% endif %}
+
+ {# Style from plugins #}
{% for resource in plugins.resources.css %}
{% if resource.url %}
<link rel="stylesheet" href="{{ resource.url }}">
@@ -13,6 +16,8 @@
<link rel="stylesheet" href="{{ staticBase }}/plugins/{{ resource.path }}">
{% endif %}
{% endfor %}
+
+ {# Custom styles from the book #}
{% for type, style in styles %}
<link rel="stylesheet" href="{{ basePath }}/{{ style }}">
{% endfor %}
@@ -20,14 +25,16 @@
{% block content %}
<div class="page">
- <h1 class="book-chapter book-chapter-{{ progress.current.level|lvl }}">{{ progress.current.title }}</h1>
- {% for section in content %}
- <div class="{{ section.type }}" id="section-{{ section.id }}">
- {% if section.type == "normal" %}
- {% autoescape false %}{{ section.content }}{% endautoescape %}
- {% endif %}
- </div>
- {% endfor %}
+ {% block page %}
+ <h1 class="book-chapter book-chapter-{{ progress.current.level|lvl }}">{{ progress.current.title }}</h1>
+ {% for section in content %}
+ <div class="section {{ section.type }}" id="section-{{ section.id }}">
+ {% if section.type == "normal" %}
+ {% autoescape false %}{{ section.content }}{% endautoescape %}
+ {% endif %}
+ </div>
+ {% endfor %}
+ {% endblock %}
</div>
{% endblock %}
diff --git a/theme/templates/ebook/summary.html b/theme/templates/ebook/summary.html
index fa79a98..237ae6e 100644
--- a/theme/templates/ebook/summary.html
+++ b/theme/templates/ebook/summary.html
@@ -5,15 +5,20 @@
{% macro articles(_articles) %}
{% for item in _articles %}
<li>
- {% if item.path and item.exists %}
- {% if not item.external %}
- <a href="{{ basePath }}/{{ item.path|contentLink }}">{{ item.title }}</a>
+ <span class="inner">
+ {% if item.path and item.exists %}
+ {% if not item.external %}
+ <a href="{{ basePath }}/{{ item.path|contentLink }}">{{ item.title }}</a>
+ {% else %}
+ <a target="_blank" href="{{ item.path }}">{{ item.title }}</a>
+ {% endif %}
{% else %}
- <a target="_blank" href="{{ item.path }}">{{ item.title }}</a>
+ <span>{{ item.title }}</span>
{% endif %}
- {% else %}
- {{ item.title }}
- {% endif %}
+ {% if options.generator != "mobi" %}
+ <span class="page">{{ item.level }}</span>
+ {% endif %}
+ </span>
{% if item.articles.length > 0 %}
<ol>
{{ articles(item.articles) }}
@@ -23,15 +28,19 @@
{% endfor %}
{% endmacro %}
-{% block content %}
-<div class="page page-toc">
+{% block page %}
+<div class="section toc">
<h1>{{ __("SUMMARY") }}</h1>
<ol>
- {{ articles(summary.chapters) }}
+ {{ articles(summary.chapters) }}
- {% if glossary.length > 0 %}
- <li><a href="{{ basePath }}/GLOSSARY.html">{{ __("GLOSSARY") }}</a></li>
- {% endif %}
+ {% if glossary.length > 0 %}
+ <li>
+ <span class="inner">
+ <a href="{{ basePath }}/GLOSSARY.html">{{ __("GLOSSARY") }}</a>
+ </span>
+ </li>
+ {% endif %}
</ol>
</div>
{% endblock %}