mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-26 20:27:00 +00:00
Compare commits
55 Commits
2.5.0-beta.6
...
2.6.1
| Author | SHA1 | Date | |
|---|---|---|---|
| b137d8270a | |||
| 6db7757451 | |||
| 43fd42b757 | |||
| 5d1c4d2b9f | |||
| 425acd8bf6 | |||
| 414160e0df | |||
| 117c6aefe8 | |||
| 13d584d39a | |||
| 9bc89c24f5 | |||
| 5a8c4d5a4e | |||
| 98da83a552 | |||
| 5344a30a3b | |||
| d5d6b3673e | |||
| d2a2fe88d1 | |||
| ced44c86ce | |||
| ee402ad444 | |||
| 3d2155eb66 | |||
| bd24b03548 | |||
| 5cb55a0f37 | |||
| 163242f80f | |||
| 266bfcb8bf | |||
| d82fa02669 | |||
| 3a5207a0d2 | |||
| e38f3bb884 | |||
| 751cdd9b3b | |||
| 8df6bdca89 | |||
| f9df7545ad | |||
| 9b7a90afef | |||
| 2ae83b3247 | |||
| 5d907f234e | |||
| 3a005c4f13 | |||
| 6c2f50470a | |||
| d233783942 | |||
| 3d9e4c80a2 | |||
| a7f49015c1 | |||
| 68ed2631dc | |||
| 2814fea67e | |||
| 3388be9db6 | |||
| 9b89319820 | |||
| ad34089df5 | |||
| 7a4c6bc326 | |||
| 6ab386ae35 | |||
| 0abbfde912 | |||
| 0521defb63 | |||
| ea4d96610f | |||
| 4bc56564b4 | |||
| 013f7f09da | |||
| f082de1f92 | |||
| ad39dc8c0c | |||
| 481a76319f | |||
| 27a43d5aea | |||
| df1d5a0680 | |||
| 722109faf0 | |||
| d4dca7736a | |||
| 4e90becd52 |
+1
-2
@@ -1,9 +1,8 @@
|
||||
sudo: false
|
||||
language: node_js
|
||||
node_js:
|
||||
- "stable"
|
||||
- "4.1"
|
||||
- "0.12"
|
||||
- "0.11"
|
||||
- "0.10"
|
||||
before_install:
|
||||
- npm install svgexport -g
|
||||
|
||||
@@ -57,3 +57,7 @@ Translators
|
||||
- @a-moses
|
||||
- Ukrainian
|
||||
- @Karnaukhov
|
||||
- Czech
|
||||
- @mjanda
|
||||
- Swedish
|
||||
- Jacob Burenstam (@buren)
|
||||
|
||||
+26
-17
@@ -2,27 +2,28 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 2.5.0-beta.6
|
||||
- Fix default style for pdf footer and header
|
||||
- Correctly handle query in image urls
|
||||
- Fix templating in imported content
|
||||
- Use helvetica as default font for PDFs
|
||||
## 2.6.1
|
||||
- Use CamelCase for `gitbook.state.innerLanguage`
|
||||
|
||||
## 2.5.0-beta.5
|
||||
- Fix position of sidebar toggle button
|
||||
- Update asciidoc parser to remove git dependency
|
||||
## 2.6.0
|
||||
- Close sidebar after clicking a link on mobile
|
||||
- Add root for multilingual books: `gitbook.state.bookRoot`
|
||||
- Fix color of h6 headings
|
||||
- Fix bottom margin of lists and blockquotes
|
||||
- Add Swedish translation (`sv`)
|
||||
- Add Czech translation (`cs`)
|
||||
- Fix locale names for `zh-hans` and `jp`
|
||||
- Update plugin `search` to fix crashes
|
||||
- Aceept case-incensitive structure files (README, GLOSSARY, etc)
|
||||
|
||||
## 2.5.0-beta.4
|
||||
- Fix compatibility for some plugins (like `autocover`)
|
||||
- Fix position of sidebar toggle button when glossary button is present
|
||||
## 2.5.2
|
||||
- Fix custom stylesheets for ebook generation
|
||||
- Trigger event `start` before `page.change`
|
||||
|
||||
## 2.5.0-beta.3
|
||||
- Fix installation of plugins when using a pre-release
|
||||
## 2.5.1
|
||||
- Fix calcul of `gitbook.state.root` when serving HTML index as `/`
|
||||
|
||||
## 2.5.0-beta.2
|
||||
- Fix support for pre-releases
|
||||
|
||||
## 2.5.0-beta.1
|
||||
## 2.5.0
|
||||
- Font settings, sharing and search are externalized as default plugins
|
||||
- Plugins can define a configuration schema in the manifest, this schema will be used to validate configuration during build
|
||||
- New Node.js API for plugin: `book.formatString(type, content)`
|
||||
@@ -31,6 +32,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Cleaner table of contents for ebooks
|
||||
- Support for RTL in ebook's table of contents
|
||||
- Better colors for mobi (links and code blocks)
|
||||
- Fix installation of plugins when using a pre-release
|
||||
- Fix support for pre-releases
|
||||
- Update asciidoc parser to remove git dependency
|
||||
- Fix templating in imported content
|
||||
- Fix querystring in image urls
|
||||
- Normalize heading IDs like GitHub
|
||||
- Use Arial as default font for PDFs
|
||||
- Add `root`, `chapterTitle` and `filepath` to `gitbook.state` JS API
|
||||
|
||||
## 2.4.3
|
||||
- Add ukrainian translation (`uk`)
|
||||
|
||||
@@ -213,7 +213,7 @@ Plugins needed to build a book can be installed using: `gitbook install ./`. You
|
||||
You can use the options `--log=debug` and `--debug` to get better error messages (with stack trace). For example:
|
||||
|
||||
```
|
||||
$ gitbook build ./ -- log=debug --debug
|
||||
$ gitbook build ./ --log=debug --debug
|
||||
```
|
||||
|
||||
#### How to use the latest commit from GitBook in gitbook-cli
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ init:
|
||||
# Test against these versions of Node.js.
|
||||
environment:
|
||||
matrix:
|
||||
- nodejs_version: "0.10"
|
||||
- nodejs_version: "0.11"
|
||||
- nodejs_version: "0.12"
|
||||
- nodejs_version: "4.1"
|
||||
|
||||
# Install scripts. (runs after repo cloning)
|
||||
install:
|
||||
|
||||
+26
-18
@@ -356,10 +356,10 @@ Book.prototype.parsePlugins = function() {
|
||||
// Parse readme to extract defaults title and description
|
||||
Book.prototype.parseReadme = function() {
|
||||
var that = this;
|
||||
var structure = that.config.getStructure('readme');
|
||||
that.log.debug.ln('start parsing readme:', structure);
|
||||
var filename = that.config.getStructure('readme', true);
|
||||
that.log.debug.ln('start parsing readme:', filename);
|
||||
|
||||
return that.findFile(structure)
|
||||
return that.findFile(filename)
|
||||
.then(function(readme) {
|
||||
if (!readme) throw 'No README file';
|
||||
if (!_.contains(that.files, readme.path)) throw 'README file is ignored';
|
||||
@@ -390,10 +390,10 @@ Book.prototype.parseReadme = function() {
|
||||
Book.prototype.parseLangs = function() {
|
||||
var that = this;
|
||||
|
||||
var structure = that.config.getStructure('langs');
|
||||
that.log.debug.ln('start parsing languages index:', structure);
|
||||
var filename = that.config.getStructure('langs', true);
|
||||
that.log.debug.ln('start parsing languages index:', filename);
|
||||
|
||||
return that.findFile(structure)
|
||||
return that.findFile(filename)
|
||||
.then(function(langs) {
|
||||
if (!langs) return [];
|
||||
|
||||
@@ -421,10 +421,10 @@ Book.prototype.parseLangs = function() {
|
||||
Book.prototype.parseSummary = function() {
|
||||
var that = this;
|
||||
|
||||
var structure = that.config.getStructure('summary');
|
||||
that.log.debug.ln('start parsing summary:', structure);
|
||||
var filename = that.config.getStructure('summary', true);
|
||||
that.log.debug.ln('start parsing summary:', filename);
|
||||
|
||||
return that.findFile(structure)
|
||||
return that.findFile(filename)
|
||||
.then(function(summary) {
|
||||
if (!summary) throw 'No SUMMARY file';
|
||||
|
||||
@@ -459,10 +459,10 @@ Book.prototype.parseSummary = function() {
|
||||
Book.prototype.parseGlossary = function() {
|
||||
var that = this;
|
||||
|
||||
var structure = that.config.getStructure('glossary');
|
||||
that.log.debug.ln('start parsing glossary: ', structure);
|
||||
var filename = that.config.getStructure('glossary', true);
|
||||
that.log.debug.ln('start parsing glossary: ', filename);
|
||||
|
||||
return that.findFile(structure)
|
||||
return that.findFile(filename)
|
||||
.then(function(glossary) {
|
||||
if (!glossary) return [];
|
||||
|
||||
@@ -600,19 +600,27 @@ Book.prototype.parsePage = function(filename, options) {
|
||||
Book.prototype.findFile = function(filename) {
|
||||
var that = this;
|
||||
|
||||
return _.reduce(parsers.extensions, function(prev, ext) {
|
||||
var ext = path.extname(filename);
|
||||
var basename = path.basename(filename, ext);
|
||||
|
||||
// Ordered list of extensions to test
|
||||
var exts = parsers.extensions;
|
||||
if (ext) exts = _.uniq([ext].concat(exts));
|
||||
|
||||
return _.reduce(exts, function(prev, ext) {
|
||||
return prev.then(function(output) {
|
||||
// Stop if already find a parser
|
||||
if (output) return output;
|
||||
|
||||
var filepath = filename+ext;
|
||||
var filepath = basename+ext;
|
||||
|
||||
return fs.findFile(that.root, filepath)
|
||||
.then(function(realFilepath) {
|
||||
if (!realFilepath) return null;
|
||||
|
||||
return that.fileExists(filepath)
|
||||
.then(function(exists) {
|
||||
if (!exists) return null;
|
||||
return {
|
||||
parser: parsers.get(ext),
|
||||
path: filepath
|
||||
path: realFilepath
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -77,7 +77,7 @@ module.exports = {
|
||||
|
||||
// Font for the file content
|
||||
'fontSize': 12,
|
||||
'fontFamily': 'Helvetica',
|
||||
'fontFamily': 'Arial',
|
||||
|
||||
// Paper size for the pdf
|
||||
// Choices are [u’a0’, u’a1’, u’a2’, u’a3’, u’a4’, u’a5’, u’a6’, u’b0’, u’b1’, u’b2’, u’b3’, u’b4’, u’b5’, u’b6’, u’legal’, u’letter’]
|
||||
|
||||
@@ -181,8 +181,12 @@ Configuration.prototype.dump = function() {
|
||||
};
|
||||
|
||||
// Get structure file
|
||||
Configuration.prototype.getStructure = function(name) {
|
||||
return this.options.structure[name].split('.').slice(0, -1).join('.');
|
||||
Configuration.prototype.getStructure = function(name, dontStripExt) {
|
||||
var filename = this.options.structure[name];
|
||||
if (dontStripExt) return filename;
|
||||
|
||||
filename = filename.split('.').slice(0, -1).join('.');
|
||||
return filename;
|
||||
};
|
||||
|
||||
// Return normalized language
|
||||
|
||||
@@ -67,7 +67,7 @@ Generator.prototype.getPDFTemplate = function(id) {
|
||||
}
|
||||
|
||||
tpl = juice(tpl, {
|
||||
extraCss: stylesheets.concat('/n')
|
||||
extraCss: stylesheets.join('\n\n')
|
||||
});
|
||||
|
||||
return tpl;
|
||||
|
||||
+10
-10
@@ -1,11 +1,11 @@
|
||||
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 fs = require("../utils/fs");
|
||||
var BaseGenerator = require("../generator");
|
||||
var links = require("../utils/links");
|
||||
var fs = require('../utils/fs');
|
||||
var BaseGenerator = require('../generator');
|
||||
var links = require('../utils/links');
|
||||
|
||||
var Generator = function() {
|
||||
BaseGenerator.apply(this, arguments);
|
||||
@@ -26,7 +26,7 @@ Generator.prototype.convertFile = function(input) {
|
||||
sections: page.sections
|
||||
};
|
||||
|
||||
var output = links.changeExtension(page.path, ".json");
|
||||
var output = links.changeExtension(page.path, '.json');
|
||||
output = path.join(that.options.output, output);
|
||||
|
||||
return fs.writeFile(
|
||||
@@ -51,7 +51,7 @@ Generator.prototype.writeReadme = function() {
|
||||
langs = that.book.langs;
|
||||
mainLang = langs.length > 0? _.first(langs).lang : null;
|
||||
|
||||
readme = links.changeExtension(that.book.readmeFile, ".json");
|
||||
readme = links.changeExtension(that.book.readmeFile, '.json');
|
||||
|
||||
// Read readme from main language
|
||||
return fs.readFile(
|
||||
@@ -67,7 +67,7 @@ Generator.prototype.writeReadme = function() {
|
||||
|
||||
// Write it as README.json
|
||||
return fs.writeFile(
|
||||
path.join(that.options.output, "README.json"),
|
||||
path.join(that.options.output, 'README.json'),
|
||||
JSON.stringify(json, null, 4)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -208,6 +208,7 @@ Generator.prototype._writeTemplate = function(tpl, options, output, interpolate)
|
||||
title: that.options.title,
|
||||
description: that.options.description,
|
||||
language: that.book.config.normalizeLanguage(),
|
||||
innerlanguage: that.book.isSubBook()? that.book.config.get('language') : null,
|
||||
|
||||
glossary: that.book.glossary,
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
/*eslint no-console: 0*/
|
||||
/* eslint no-console: 0 */
|
||||
|
||||
var Q = require('q');
|
||||
var _ = require('lodash');
|
||||
|
||||
@@ -30,6 +30,7 @@ var fsUtils = {
|
||||
fs.exists(path, d.resolve);
|
||||
return d.promise;
|
||||
},
|
||||
findFile: findFile,
|
||||
existsSync: fs.existsSync.bind(fs),
|
||||
readFileSync: fs.readFileSync.bind(fs),
|
||||
clean: cleanFolder,
|
||||
@@ -178,4 +179,15 @@ function cleanFolder(root) {
|
||||
});
|
||||
}
|
||||
|
||||
// Find a file in a folder (case incensitive)
|
||||
// Return the real filename
|
||||
function findFile(root, filename) {
|
||||
return Q.nfcall(fs.readdir, root)
|
||||
.then(function(files) {
|
||||
return _.find(files, function(file) {
|
||||
return (file.toLowerCase() == filename.toLowerCase());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = fsUtils;
|
||||
|
||||
+19
-19
@@ -1,14 +1,14 @@
|
||||
var Q = require("q");
|
||||
var _ = require("lodash");
|
||||
var path = require("path");
|
||||
var crc = require("crc");
|
||||
var exec = Q.denodeify(require("child_process").exec);
|
||||
var URI = require("URIjs");
|
||||
var pathUtil = require("./path");
|
||||
var Q = require('q');
|
||||
var _ = require('lodash');
|
||||
var path = require('path');
|
||||
var crc = require('crc');
|
||||
var exec = Q.denodeify(require('child_process').exec);
|
||||
var URI = require('urijs');
|
||||
var pathUtil = require('./path');
|
||||
|
||||
var fs = require("./fs");
|
||||
var fs = require('./fs');
|
||||
|
||||
var GIT_PREFIX = "git+";
|
||||
var GIT_PREFIX = 'git+';
|
||||
var GIT_TMP = null;
|
||||
|
||||
|
||||
@@ -30,20 +30,20 @@ function parseGitUrl(giturl) {
|
||||
giturl = giturl.slice(GIT_PREFIX.length);
|
||||
|
||||
uri = new URI(giturl);
|
||||
ref = uri.fragment() || "master";
|
||||
ref = uri.fragment() || 'master';
|
||||
uri.fragment(null);
|
||||
|
||||
// Extract file inside the repo (after the .git)
|
||||
fileParts =uri.path().split(".git");
|
||||
filepath = fileParts.length > 1? fileParts.slice(1).join(".git") : "";
|
||||
if (filepath[0] == "/") filepath = filepath.slice(1);
|
||||
fileParts =uri.path().split('.git');
|
||||
filepath = fileParts.length > 1? fileParts.slice(1).join('.git') : '';
|
||||
if (filepath[0] == '/') filepath = filepath.slice(1);
|
||||
|
||||
// Recreate pathname without the real filename
|
||||
uri.path(_.first(fileParts)+".git");
|
||||
uri.path(_.first(fileParts)+'.git');
|
||||
|
||||
return {
|
||||
host: uri.toString(),
|
||||
ref: ref || "master",
|
||||
ref: ref || 'master',
|
||||
filepath: filepath
|
||||
};
|
||||
}
|
||||
@@ -52,7 +52,7 @@ function parseGitUrl(giturl) {
|
||||
function cloneGitRepo(host, ref) {
|
||||
var isBranch = false;
|
||||
|
||||
ref = ref || "master";
|
||||
ref = ref || 'master';
|
||||
if (!validateSha(ref)) isBranch = true;
|
||||
|
||||
return Q()
|
||||
@@ -69,7 +69,7 @@ function cloneGitRepo(host, ref) {
|
||||
// Return or clone the git repo
|
||||
.then(function() {
|
||||
// Unique ID for repo/ref combinaison
|
||||
var repoId = crc.crc32(host+"#"+ref).toString(16);
|
||||
var repoId = crc.crc32(host+'#'+ref).toString(16);
|
||||
|
||||
// Absolute path to the folder
|
||||
var repoPath = path.resolve(GIT_TMP, repoId);
|
||||
@@ -79,9 +79,9 @@ function cloneGitRepo(host, ref) {
|
||||
if (doExists) return;
|
||||
|
||||
// Clone repo
|
||||
return exec("git clone "+host+" "+repoPath)
|
||||
return exec('git clone '+host+' '+repoPath)
|
||||
.then(function() {
|
||||
return exec("git checkout "+ref, { cwd: repoPath });
|
||||
return exec('git checkout '+ref, { cwd: repoPath });
|
||||
});
|
||||
})
|
||||
.thenResolve(repoPath);
|
||||
|
||||
+13
-13
@@ -1,13 +1,13 @@
|
||||
var _ = require("lodash");
|
||||
var path = require("path");
|
||||
var fs = require("fs");
|
||||
var _ = require('lodash');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
var i18n = require("i18n");
|
||||
var i18n = require('i18n');
|
||||
|
||||
var I18N_PATH = path.resolve(__dirname, "../../theme/i18n/");
|
||||
var DEFAULT_LANGUAGE = "en";
|
||||
var I18N_PATH = path.resolve(__dirname, '../../theme/i18n/');
|
||||
var DEFAULT_LANGUAGE = 'en';
|
||||
var LOCALES = _.map(fs.readdirSync(I18N_PATH), function(lang) {
|
||||
return path.basename(lang, ".json");
|
||||
return path.basename(lang, '.json');
|
||||
});
|
||||
|
||||
i18n.configure({
|
||||
@@ -18,11 +18,11 @@ i18n.configure({
|
||||
});
|
||||
|
||||
function compareLocales(lang, locale) {
|
||||
var langMain = _.first(lang.split("-"));
|
||||
var langSecond = _.last(lang.split("-"));
|
||||
var langMain = _.first(lang.split('-'));
|
||||
var langSecond = _.last(lang.split('-'));
|
||||
|
||||
var localeMain = _.first(locale.split("-"));
|
||||
var localeSecond = _.last(locale.split("-"));
|
||||
var localeMain = _.first(locale.split('-'));
|
||||
var localeSecond = _.last(locale.split('-'));
|
||||
|
||||
if (locale == lang) return 100;
|
||||
if (localeMain == langMain) return 50;
|
||||
@@ -42,8 +42,8 @@ var normalizeLanguage = _.memoize(function(lang) {
|
||||
.filter(function(lang) {
|
||||
return lang.score > 0;
|
||||
})
|
||||
.sortBy("score")
|
||||
.pluck("locale")
|
||||
.sortBy('score')
|
||||
.pluck('locale')
|
||||
.last()
|
||||
.value();
|
||||
return language || lang;
|
||||
|
||||
+13
-5
@@ -6,6 +6,7 @@ var cheerio = require('cheerio');
|
||||
var domSerializer = require('dom-serializer');
|
||||
var request = require('request');
|
||||
var crc = require('crc');
|
||||
var slug = require('github-slugid');
|
||||
|
||||
var links = require('./links');
|
||||
var imgUtils = require('./images');
|
||||
@@ -14,18 +15,18 @@ var batch = require('./batch');
|
||||
|
||||
var parsableExtensions = require('gitbook-parsers').extensions;
|
||||
|
||||
// Map of images that have been converted
|
||||
var imgConversionCache = {};
|
||||
|
||||
// Render a cheerio dom as html
|
||||
var renderDom = function($, dom, options) {
|
||||
function renderDom($, dom, options) {
|
||||
if (!dom && $._root && $._root.children) {
|
||||
dom = $._root.children;
|
||||
}
|
||||
|
||||
options = options|| dom.options || $._options;
|
||||
return domSerializer(dom, options);
|
||||
};
|
||||
|
||||
// Map of images that have been converted
|
||||
var imgConversionCache = {};
|
||||
}
|
||||
|
||||
function replaceText($, el, search, replace, text_only ) {
|
||||
return $(el).each(function(){
|
||||
@@ -114,6 +115,13 @@ function normalizeHtml(src, options) {
|
||||
});
|
||||
}
|
||||
|
||||
// Generate ID for headings
|
||||
$('h1,h2,h3,h4,h5,h6').each(function() {
|
||||
if ($(this).attr('id')) return;
|
||||
|
||||
$(this).attr('id', slug($(this).text()));
|
||||
});
|
||||
|
||||
// Find images to normalize
|
||||
$('img').each(function() {
|
||||
var origin;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var _ = require("lodash");
|
||||
var _ = require('lodash');
|
||||
|
||||
// Returns from a navigation and a current file, a snapshot of current detailed state
|
||||
function calculProgress(navigation, current) {
|
||||
|
||||
+7
-6
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gitbook",
|
||||
"version": "2.5.0-beta.6",
|
||||
"version": "2.6.1",
|
||||
"homepage": "https://www.gitbook.com",
|
||||
"description": "Library and cmd utility to generate GitBooks",
|
||||
"main": "lib/index.js",
|
||||
@@ -11,10 +11,10 @@
|
||||
"resolve": "0.6.3",
|
||||
"fs-extra": "0.16.5",
|
||||
"fstream-ignore": "1.0.2",
|
||||
"gitbook-parsers": "0.8.5",
|
||||
"gitbook-parsers": "0.8.7",
|
||||
"gitbook-plugin-highlight": "1.0.3",
|
||||
"gitbook-plugin-sharing": "1.0.1",
|
||||
"gitbook-plugin-search": "1.0.2",
|
||||
"gitbook-plugin-search": "1.1.0",
|
||||
"gitbook-plugin-fontsettings": "1.0.2",
|
||||
"nunjucks": "2.1.0",
|
||||
"nunjucks-autoescape": "1.0.0",
|
||||
@@ -26,11 +26,11 @@
|
||||
"gitbook-plugin-livereload": "0.0.1",
|
||||
"chokidar": "~1.0.5",
|
||||
"send": "0.2.0",
|
||||
"tiny-lr": "0.1.5",
|
||||
"tiny-lr": "0.2.1",
|
||||
"tmp": "0.0.24",
|
||||
"crc": "3.2.1",
|
||||
"bash-color": "0.0.3",
|
||||
"URIjs": "1.14.1",
|
||||
"urijs": "1.17.0",
|
||||
"request": "2.51.0",
|
||||
"npm": "2.4.1",
|
||||
"dom-serializer": "0.1.0",
|
||||
@@ -39,7 +39,8 @@
|
||||
"juice": "1.5.0",
|
||||
"jsonschema": "1.0.2",
|
||||
"json-schema-defaults": "0.1.1",
|
||||
"merge-defaults": "0.2.1"
|
||||
"merge-defaults": "0.2.1",
|
||||
"github-slugid": "1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "1.5.0",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Hello World
|
||||
|
||||
## Hello {#hello-custom}
|
||||
@@ -0,0 +1 @@
|
||||
== Readme for the bookk
|
||||
@@ -0,0 +1 @@
|
||||
# Readme for GitHub
|
||||
@@ -0,0 +1 @@
|
||||
# Summary
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"structure": {
|
||||
"readme": "README.adoc"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# Glossary
|
||||
|
||||
### Hello
|
||||
|
||||
Hello world
|
||||
+22
-22
@@ -1,63 +1,63 @@
|
||||
var path = require("path");
|
||||
var fs = require("fs");
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
var Plugin = require("../lib/plugin");
|
||||
var PLUGINS_ROOT = path.resolve(__dirname, "plugins");
|
||||
var Plugin = require('../lib/plugin');
|
||||
var PLUGINS_ROOT = path.resolve(__dirname, 'plugins');
|
||||
|
||||
describe("Code Highlighting", function () {
|
||||
describe('Code Highlighting', function () {
|
||||
var book, PAGE;
|
||||
|
||||
before(function() {
|
||||
return books.generate("highlight", "website", {
|
||||
return books.generate('highlight', 'website', {
|
||||
prepare: function(_book) {
|
||||
book = _book;
|
||||
|
||||
var plugin = new Plugin(book, "replace_highlight");
|
||||
plugin.load("./replace_highlight", PLUGINS_ROOT);
|
||||
var plugin = new Plugin(book, 'replace_highlight');
|
||||
plugin.load('./replace_highlight', PLUGINS_ROOT);
|
||||
|
||||
book.plugins.load(plugin);
|
||||
}
|
||||
})
|
||||
.then(function() {
|
||||
PAGE = fs.readFileSync(
|
||||
path.join(book.options.output, "index.html"),
|
||||
{ encoding: "utf-8" }
|
||||
path.join(book.options.output, 'index.html'),
|
||||
{ encoding: 'utf-8' }
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it("should correctly replace highlighting", function() {
|
||||
it('should correctly replace highlighting', function() {
|
||||
PAGE.should.be.html({
|
||||
"code": {
|
||||
'code': {
|
||||
index: 0,
|
||||
text: "code_test 1\n_code"
|
||||
text: 'code_test 1\n_code'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should correctly replace highlighting with language", function() {
|
||||
it('should correctly replace highlighting with language', function() {
|
||||
PAGE.should.be.html({
|
||||
"code": {
|
||||
'code': {
|
||||
index: 1,
|
||||
text: "lang_test 2\n_lang"
|
||||
text: 'lang_test 2\n_lang'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should correctly replace highlighting for inline code", function() {
|
||||
it('should correctly replace highlighting for inline code', function() {
|
||||
PAGE.should.be.html({
|
||||
"code": {
|
||||
'code': {
|
||||
index: 2,
|
||||
text: "code_test 3_code"
|
||||
text: 'code_test 3_code'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should correctly replace highlighting for inline code with html tags", function() {
|
||||
it('should correctly replace highlighting for inline code with html tags', function() {
|
||||
PAGE.should.be.html({
|
||||
"code": {
|
||||
'code': {
|
||||
index: 3,
|
||||
text: "code_<test>_code"
|
||||
text: 'code_<test>_code'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
|
||||
describe('Headings', function () {
|
||||
var book, PAGE;
|
||||
|
||||
before(function() {
|
||||
return books.generate('headings', 'website')
|
||||
.then(function(_book) {
|
||||
book = _book;
|
||||
|
||||
PAGE = fs.readFileSync(
|
||||
path.join(book.options.output, 'index.html'),
|
||||
{ encoding: 'utf-8' }
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('IDs', function() {
|
||||
it('should correctly generate an ID', function() {
|
||||
PAGE.should.be.html({
|
||||
'h1#hello-world': {
|
||||
count: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('should correctly accept custom ID', function() {
|
||||
PAGE.should.be.html({
|
||||
'h2#hello-custom': {
|
||||
count: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+37
-37
@@ -1,91 +1,91 @@
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
describe("JSON generator", function () {
|
||||
describe("Basic Book", function() {
|
||||
describe('JSON generator', function () {
|
||||
describe('Basic Book', function() {
|
||||
var book;
|
||||
|
||||
before(function() {
|
||||
return books.generate("basic", "json")
|
||||
return books.generate('basic', 'json')
|
||||
.then(function(_book) {
|
||||
book = _book;
|
||||
});
|
||||
});
|
||||
|
||||
it("should correctly output a README.json", function() {
|
||||
book.should.have.file("README.json");
|
||||
it('should correctly output a README.json', function() {
|
||||
book.should.have.file('README.json');
|
||||
});
|
||||
|
||||
it("should output a valid json", function() {
|
||||
book.should.have.jsonfile("README.json");
|
||||
it('should output a valid json', function() {
|
||||
book.should.have.jsonfile('README.json');
|
||||
});
|
||||
|
||||
describe("Page Format", function() {
|
||||
describe('Page Format', function() {
|
||||
var page;
|
||||
|
||||
before(function() {
|
||||
page = JSON.parse(
|
||||
fs.readFileSync(
|
||||
path.join(book.options.output, "README.json"),
|
||||
{ encoding: "utf-8" }
|
||||
path.join(book.options.output, 'README.json'),
|
||||
{ encoding: 'utf-8' }
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
it("should contains valid section", function() {
|
||||
page.should.have.property("sections").with.lengthOf(1);
|
||||
page.sections[0].should.have.property("content").which.is.a.String();
|
||||
page.sections[0].should.have.property("type", "normal");
|
||||
it('should contains valid section', function() {
|
||||
page.should.have.property('sections').with.lengthOf(1);
|
||||
page.sections[0].should.have.property('content').which.is.a.String();
|
||||
page.sections[0].should.have.property('type', 'normal');
|
||||
});
|
||||
|
||||
it("should contains valid progress", function() {
|
||||
page.should.have.property("progress");
|
||||
page.progress.should.have.property("chapters").with.lengthOf(1);
|
||||
page.progress.should.have.property("current");
|
||||
it('should contains valid progress', function() {
|
||||
page.should.have.property('progress');
|
||||
page.progress.should.have.property('chapters').with.lengthOf(1);
|
||||
page.progress.should.have.property('current');
|
||||
});
|
||||
|
||||
it("should contains no languages", function() {
|
||||
page.should.have.property("langs").with.lengthOf(0);
|
||||
it('should contains no languages', function() {
|
||||
page.should.have.property('langs').with.lengthOf(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("Multilingual Book", function() {
|
||||
describe('Multilingual Book', function() {
|
||||
var book;
|
||||
|
||||
before(function() {
|
||||
return books.generate("languages", "json")
|
||||
return books.generate('languages', 'json')
|
||||
.then(function(_book) {
|
||||
book = _book;
|
||||
});
|
||||
});
|
||||
|
||||
it("should correctly output READMEs", function() {
|
||||
book.should.have.file("README.json");
|
||||
book.should.have.file("en/README.json");
|
||||
book.should.have.file("fr/README.json");
|
||||
it('should correctly output READMEs', function() {
|
||||
book.should.have.file('README.json');
|
||||
book.should.have.file('en/README.json');
|
||||
book.should.have.file('fr/README.json');
|
||||
});
|
||||
|
||||
it("should output valid json", function() {
|
||||
book.should.have.jsonfile("README.json");
|
||||
book.should.have.jsonfile("en/README.json");
|
||||
book.should.have.jsonfile("fr/README.json");
|
||||
it('should output valid json', function() {
|
||||
book.should.have.jsonfile('README.json');
|
||||
book.should.have.jsonfile('en/README.json');
|
||||
book.should.have.jsonfile('fr/README.json');
|
||||
});
|
||||
|
||||
describe("Page Format", function() {
|
||||
describe('Page Format', function() {
|
||||
var page;
|
||||
|
||||
before(function() {
|
||||
page = JSON.parse(
|
||||
fs.readFileSync(
|
||||
path.join(book.options.output, "README.json"),
|
||||
{ encoding: "utf-8" }
|
||||
path.join(book.options.output, 'README.json'),
|
||||
{ encoding: 'utf-8' }
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
it("should contains no languages", function() {
|
||||
page.should.have.property("langs").with.lengthOf(2);
|
||||
it('should contains no languages', function() {
|
||||
page.should.have.property('langs').with.lengthOf(2);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
describe('Structure', function () {
|
||||
var book;
|
||||
|
||||
before(function() {
|
||||
return books.parse('structure')
|
||||
.then(function(_book) {
|
||||
book = _book;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('should prioritize structure defined in book.json', function() {
|
||||
book.readmeFile.should.equal('README.adoc');
|
||||
});
|
||||
|
||||
it('should be case incensitive', function() {
|
||||
book.glossaryFile.should.equal('glossary.md');
|
||||
book.glossary.should.have.lengthOf(1);
|
||||
});
|
||||
});
|
||||
@@ -1 +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}
|
||||
.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{font-size:1em}.page .section h6{font-size:1em;color:#777}.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:0 0 .8em}.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 0 .8em;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}
|
||||
@@ -1 +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}
|
||||
.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{font-size:1em}.page .section h6{font-size:1em;color:#777}.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:0 0 .8em}.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 0 .8em;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}
|
||||
@@ -1 +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}
|
||||
.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{font-size:1em}.page .section h6{font-size:1em;color:#777}.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:0 0 .8em}.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 0 .8em;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}
|
||||
@@ -1 +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}
|
||||
.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{font-size:1em}.page .section h6{font-size:1em;color:#777}.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:0 0 .8em}.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 0 .8em;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}
|
||||
+1807
-1447
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"LANGS_CHOOSE": "Zvolte jazyk",
|
||||
"GLOSSARY": "Slovníček",
|
||||
"GLOSSARY_INDEX": "Rejstřík",
|
||||
"GLOSSARY_OPEN": "Slovníček",
|
||||
"GITBOOK_LINK": "Publikováno pomocí GitBook",
|
||||
"SUMMARY": "Obsah",
|
||||
"SUMMARY_INTRODUCTION": "Úvod",
|
||||
"SUMMARY_TOGGLE": "Obsah",
|
||||
"SEARCH_TOGGLE": "Hledání",
|
||||
"SEARCH_PLACEHOLDER": "Vyhledat",
|
||||
"FONTSETTINGS_TOGGLE": "Nastavení písma",
|
||||
"SHARE_TOGGLE": "Sdílet",
|
||||
"SHARE_ON": "Sdílet na {{platform}}",
|
||||
"FONTSETTINGS_WHITE": "Bílá",
|
||||
"FONTSETTINGS_SEPIA": "Sépie",
|
||||
"FONTSETTINGS_NIGHT": "Noc",
|
||||
"FONTSETTINGS_SANS": "Bezpatkové",
|
||||
"FONTSETTINGS_SERIF": "Patkové"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"LANGS_CHOOSE": "Välj språk",
|
||||
"GLOSSARY": "Gloslista",
|
||||
"GLOSSARY_INDEX": "Index",
|
||||
"GLOSSARY_OPEN": "Gloslista",
|
||||
"GITBOOK_LINK": "Publicera med GitBook",
|
||||
"SUMMARY": "Innehållsförteckning",
|
||||
"SUMMARY_INTRODUCTION": "Inledning",
|
||||
"SUMMARY_TOGGLE": "Innehållsförteckning",
|
||||
"SEARCH_TOGGLE": "Sök",
|
||||
"SEARCH_PLACEHOLDER": "Skriv sökord",
|
||||
"FONTSETTINGS_TOGGLE": "Textinställningar",
|
||||
"SHARE_TOGGLE": "Dela",
|
||||
"SHARE_ON": "Dela på {{platform}}",
|
||||
"FONTSETTINGS_WHITE": "Ljus",
|
||||
"FONTSETTINGS_SEPIA": "Sepia",
|
||||
"FONTSETTINGS_NIGHT": "Mörk",
|
||||
"FONTSETTINGS_SANS": "Sans",
|
||||
"FONTSETTINGS_SERIF": "Serif"
|
||||
}
|
||||
@@ -36,6 +36,7 @@ function start(config) {
|
||||
});
|
||||
|
||||
events.trigger('start', config);
|
||||
navigation.notify();
|
||||
}
|
||||
|
||||
// Export APIs for plugins
|
||||
@@ -59,7 +60,7 @@ var gitbook = {
|
||||
// Modules mapping for plugins
|
||||
var MODULES = {
|
||||
'gitbook': gitbook,
|
||||
'jQuery': $,
|
||||
'jquery': $,
|
||||
'lodash': _
|
||||
};
|
||||
|
||||
@@ -68,6 +69,7 @@ window.$ = $;
|
||||
window.jQuery = $;
|
||||
window.require = function(mods, fn) {
|
||||
mods = _.map(mods, function(mod) {
|
||||
mod = mod.toLowerCase();
|
||||
if (!MODULES[mod]) {
|
||||
throw new Error('GitBook module '+mod+' doesn\'t exist');
|
||||
}
|
||||
|
||||
@@ -75,7 +75,11 @@ function updateNavigationPosition() {
|
||||
$('.navigation-next').css('margin-right', (bodyInnerWidth - pageWrapperWidth) + 'px');
|
||||
}
|
||||
|
||||
function preparePage() {
|
||||
function notifyPageChange() {
|
||||
events.trigger('page.change');
|
||||
}
|
||||
|
||||
function preparePage(notify) {
|
||||
var $bookBody = $('.book-body');
|
||||
var $bookInner = $bookBody.find('.body-inner');
|
||||
var $pageWrapper = $bookInner.find('.page-wrapper');
|
||||
@@ -91,7 +95,7 @@ function preparePage() {
|
||||
$bookBody.scrollTop(0);
|
||||
|
||||
// Notify
|
||||
events.trigger('page.change');
|
||||
if (notify !== false) notifyPageChange();
|
||||
}
|
||||
|
||||
function isLeftClickEvent(e) {
|
||||
@@ -150,11 +154,12 @@ function init() {
|
||||
$(window).resize(updateNavigationPosition);
|
||||
|
||||
// Prepare current page
|
||||
preparePage();
|
||||
preparePage(false);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
init: init,
|
||||
goNext: goNext,
|
||||
goPrev: goPrev
|
||||
goPrev: goPrev,
|
||||
notify: notifyPageChange
|
||||
};
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
module.exports = {
|
||||
isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
|
||||
isMobile: function() {
|
||||
return (document.width <= 600);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -25,9 +25,14 @@ function isOpen() {
|
||||
// Prepare sidebar: state and toggle button
|
||||
function init() {
|
||||
// Init last state if not mobile
|
||||
if (!platform.isMobile) {
|
||||
if (!platform.isMobile()) {
|
||||
toggleSidebar(storage.get('sidebar', true), false);
|
||||
}
|
||||
|
||||
// Close sidebar after clicking a link on mobile
|
||||
$(document).on('click', '.book-summary li.chapter a', function(e) {
|
||||
if (platform.isMobile()) toggleSidebar(false, false);
|
||||
});
|
||||
}
|
||||
|
||||
// Filter summary with a list of path
|
||||
|
||||
@@ -1,14 +1,36 @@
|
||||
var $ = require('jquery');
|
||||
var url = require('url');
|
||||
var path = require('path');
|
||||
|
||||
var state = {};
|
||||
|
||||
state.update = function(dom) {
|
||||
var $book = $(dom.find(".book"));
|
||||
var $book = $(dom.find('.book'));
|
||||
|
||||
state.$book = $book;
|
||||
state.level = $book.data("level");
|
||||
state.basePath = $book.data("basepath");
|
||||
state.revision = $book.data("revision");
|
||||
state.level = $book.data('level');
|
||||
state.basePath = $book.data('basepath');
|
||||
|
||||
// If book is multilingual, language of this book
|
||||
state.innerLanguage = $book.data('innerlanguage');
|
||||
|
||||
// Date of build
|
||||
state.revision = $book.data('revision');
|
||||
|
||||
// Original path of the file
|
||||
state.filepath = $book.data('filepath');
|
||||
|
||||
// Title of the chapter
|
||||
state.chapterTitle = $book.data('chapter-title');
|
||||
|
||||
// Absolute url to the root of the book (inner book)
|
||||
state.root = url.resolve(
|
||||
location.protocol+'//'+location.host,
|
||||
path.dirname(path.resolve(location.pathname.replace(/\/$/, '/index.html'), state.basePath))
|
||||
);
|
||||
|
||||
// Absolute root to the language (for multilingual book)
|
||||
state.bookRoot = state.innerLanguage? url.resolve(state.root, '..') : state.root;
|
||||
};
|
||||
|
||||
state.update($);
|
||||
|
||||
@@ -117,7 +117,7 @@ function updateButton(opts) {
|
||||
// Create button
|
||||
var $btn = $('<a>', {
|
||||
'class': 'btn',
|
||||
'text': opts.text,
|
||||
'text': opts.text? ' ' + opts.text : '',
|
||||
'aria-label': opts.label,
|
||||
'href': '#'
|
||||
});
|
||||
@@ -156,6 +156,8 @@ function updateButton(opts) {
|
||||
$result = $btn;
|
||||
}
|
||||
|
||||
$result.addClass('js-toolbar-action');
|
||||
|
||||
if (_.isNumber(opts.index) && opts.index >= 0) {
|
||||
insertAt($toolbar, '.btn, .dropdown, h1', opts.index, $result);
|
||||
} else {
|
||||
@@ -165,6 +167,7 @@ function updateButton(opts) {
|
||||
|
||||
// Update all buttons
|
||||
function updateAllButtons() {
|
||||
$('.js-toolbar-action').remove();
|
||||
_.each(buttons, updateButton);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.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) {
|
||||
.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, @md-h6-color: #777) {
|
||||
// Rate of growth for headings
|
||||
@scale: 0.25;
|
||||
|
||||
@@ -122,6 +123,7 @@
|
||||
|
||||
h6 {
|
||||
font-size: 1em;
|
||||
color: @md-h6-color;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
@@ -200,8 +202,8 @@
|
||||
/* Lists */
|
||||
ul, ol {
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin: 0;
|
||||
margin-bottom: @spacing;
|
||||
padding-left: 2em;
|
||||
|
||||
ol, ul {
|
||||
@@ -218,6 +220,7 @@
|
||||
/* Blockquote */
|
||||
blockquote {
|
||||
margin: 0;
|
||||
margin-bottom: @spacing;
|
||||
padding: 0 15px;
|
||||
color: @md-blockquote-color;
|
||||
border-left: 4px solid @md-blockquote-border;
|
||||
@@ -252,3 +255,4 @@
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,13 @@
|
||||
{% block description %}{% if progress.current.level == "0" %}{{ description }}{% endif %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="book" data-level="{{ progress.current.level }}" data-basepath="{{ basePath }}" data-revision="{{ revision }}">
|
||||
<div class="book"
|
||||
data-level="{{ progress.current.level }}"
|
||||
data-chapter-title="{{ progress.current.title }}"
|
||||
data-filepath="{{ progress.current.path }}"
|
||||
data-basepath="{{ basePath }}"
|
||||
data-revision="{{ revision }}"
|
||||
data-innerlanguage="{{ innerlanguage }}">
|
||||
{% include "includes/summary.html" %}
|
||||
<div class="book-body">
|
||||
<div class="body-inner">
|
||||
|
||||
Reference in New Issue
Block a user