mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-28 21:18:57 +00:00
Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21cf5fcaf4 | |||
| 8c7509759b | |||
| dc9ac0d0ff | |||
| 93b401ca9f | |||
| 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 |
+1
-2
@@ -1,9 +1,8 @@
|
|||||||
sudo: false
|
sudo: false
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
|
- "stable"
|
||||||
- "4.1"
|
- "4.1"
|
||||||
- "0.12"
|
- "0.12"
|
||||||
- "0.11"
|
|
||||||
- "0.10"
|
|
||||||
before_install:
|
before_install:
|
||||||
- npm install svgexport -g
|
- npm install svgexport -g
|
||||||
|
|||||||
@@ -57,3 +57,7 @@ Translators
|
|||||||
- @a-moses
|
- @a-moses
|
||||||
- Ukrainian
|
- Ukrainian
|
||||||
- @Karnaukhov
|
- @Karnaukhov
|
||||||
|
- Czech
|
||||||
|
- @mjanda
|
||||||
|
- Swedish
|
||||||
|
- Jacob Burenstam (@buren)
|
||||||
|
|||||||
+18
@@ -2,6 +2,24 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## 2.6.2
|
||||||
|
- Fix `gitbook.state.bookRoot`, `gitbook.state.root` now has a trailing slash
|
||||||
|
- Update nunjucks to 2.2.0
|
||||||
|
|
||||||
|
## 2.6.1
|
||||||
|
- Use CamelCase for `gitbook.state.innerLanguage`
|
||||||
|
|
||||||
|
## 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.2
|
## 2.5.2
|
||||||
- Fix custom stylesheets for ebook generation
|
- Fix custom stylesheets for ebook generation
|
||||||
- Trigger event `start` before `page.change`
|
- Trigger event `start` before `page.change`
|
||||||
|
|||||||
@@ -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:
|
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
|
#### 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.
|
# Test against these versions of Node.js.
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- nodejs_version: "0.10"
|
- nodejs_version: "0.12"
|
||||||
- nodejs_version: "0.11"
|
- nodejs_version: "4.1"
|
||||||
|
|
||||||
# Install scripts. (runs after repo cloning)
|
# Install scripts. (runs after repo cloning)
|
||||||
install:
|
install:
|
||||||
|
|||||||
+26
-18
@@ -356,10 +356,10 @@ Book.prototype.parsePlugins = function() {
|
|||||||
// Parse readme to extract defaults title and description
|
// Parse readme to extract defaults title and description
|
||||||
Book.prototype.parseReadme = function() {
|
Book.prototype.parseReadme = function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var structure = that.config.getStructure('readme');
|
var filename = that.config.getStructure('readme', true);
|
||||||
that.log.debug.ln('start parsing readme:', structure);
|
that.log.debug.ln('start parsing readme:', filename);
|
||||||
|
|
||||||
return that.findFile(structure)
|
return that.findFile(filename)
|
||||||
.then(function(readme) {
|
.then(function(readme) {
|
||||||
if (!readme) throw 'No README file';
|
if (!readme) throw 'No README file';
|
||||||
if (!_.contains(that.files, readme.path)) throw 'README file is ignored';
|
if (!_.contains(that.files, readme.path)) throw 'README file is ignored';
|
||||||
@@ -390,10 +390,10 @@ Book.prototype.parseReadme = function() {
|
|||||||
Book.prototype.parseLangs = function() {
|
Book.prototype.parseLangs = function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
var structure = that.config.getStructure('langs');
|
var filename = that.config.getStructure('langs', true);
|
||||||
that.log.debug.ln('start parsing languages index:', structure);
|
that.log.debug.ln('start parsing languages index:', filename);
|
||||||
|
|
||||||
return that.findFile(structure)
|
return that.findFile(filename)
|
||||||
.then(function(langs) {
|
.then(function(langs) {
|
||||||
if (!langs) return [];
|
if (!langs) return [];
|
||||||
|
|
||||||
@@ -421,10 +421,10 @@ Book.prototype.parseLangs = function() {
|
|||||||
Book.prototype.parseSummary = function() {
|
Book.prototype.parseSummary = function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
var structure = that.config.getStructure('summary');
|
var filename = that.config.getStructure('summary', true);
|
||||||
that.log.debug.ln('start parsing summary:', structure);
|
that.log.debug.ln('start parsing summary:', filename);
|
||||||
|
|
||||||
return that.findFile(structure)
|
return that.findFile(filename)
|
||||||
.then(function(summary) {
|
.then(function(summary) {
|
||||||
if (!summary) throw 'No SUMMARY file';
|
if (!summary) throw 'No SUMMARY file';
|
||||||
|
|
||||||
@@ -459,10 +459,10 @@ Book.prototype.parseSummary = function() {
|
|||||||
Book.prototype.parseGlossary = function() {
|
Book.prototype.parseGlossary = function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
var structure = that.config.getStructure('glossary');
|
var filename = that.config.getStructure('glossary', true);
|
||||||
that.log.debug.ln('start parsing glossary: ', structure);
|
that.log.debug.ln('start parsing glossary: ', filename);
|
||||||
|
|
||||||
return that.findFile(structure)
|
return that.findFile(filename)
|
||||||
.then(function(glossary) {
|
.then(function(glossary) {
|
||||||
if (!glossary) return [];
|
if (!glossary) return [];
|
||||||
|
|
||||||
@@ -600,19 +600,27 @@ Book.prototype.parsePage = function(filename, options) {
|
|||||||
Book.prototype.findFile = function(filename) {
|
Book.prototype.findFile = function(filename) {
|
||||||
var that = this;
|
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) {
|
return prev.then(function(output) {
|
||||||
// Stop if already find a parser
|
// Stop if already find a parser
|
||||||
if (output) return output;
|
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 {
|
return {
|
||||||
parser: parsers.get(ext),
|
parser: parsers.get(ext),
|
||||||
path: filepath
|
path: realFilepath
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -181,8 +181,12 @@ Configuration.prototype.dump = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Get structure file
|
// Get structure file
|
||||||
Configuration.prototype.getStructure = function(name) {
|
Configuration.prototype.getStructure = function(name, dontStripExt) {
|
||||||
return this.options.structure[name].split('.').slice(0, -1).join('.');
|
var filename = this.options.structure[name];
|
||||||
|
if (dontStripExt) return filename;
|
||||||
|
|
||||||
|
filename = filename.split('.').slice(0, -1).join('.');
|
||||||
|
return filename;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return normalized language
|
// Return normalized language
|
||||||
|
|||||||
+10
-10
@@ -1,11 +1,11 @@
|
|||||||
var util = require("util");
|
var util = require('util');
|
||||||
var path = require("path");
|
var path = require('path');
|
||||||
var Q = require("q");
|
var Q = require('q');
|
||||||
var _ = require("lodash");
|
var _ = require('lodash');
|
||||||
|
|
||||||
var fs = require("../utils/fs");
|
var fs = require('../utils/fs');
|
||||||
var BaseGenerator = require("../generator");
|
var BaseGenerator = require('../generator');
|
||||||
var links = require("../utils/links");
|
var links = require('../utils/links');
|
||||||
|
|
||||||
var Generator = function() {
|
var Generator = function() {
|
||||||
BaseGenerator.apply(this, arguments);
|
BaseGenerator.apply(this, arguments);
|
||||||
@@ -26,7 +26,7 @@ Generator.prototype.convertFile = function(input) {
|
|||||||
sections: page.sections
|
sections: page.sections
|
||||||
};
|
};
|
||||||
|
|
||||||
var output = links.changeExtension(page.path, ".json");
|
var output = links.changeExtension(page.path, '.json');
|
||||||
output = path.join(that.options.output, output);
|
output = path.join(that.options.output, output);
|
||||||
|
|
||||||
return fs.writeFile(
|
return fs.writeFile(
|
||||||
@@ -51,7 +51,7 @@ Generator.prototype.writeReadme = function() {
|
|||||||
langs = that.book.langs;
|
langs = that.book.langs;
|
||||||
mainLang = langs.length > 0? _.first(langs).lang : null;
|
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
|
// Read readme from main language
|
||||||
return fs.readFile(
|
return fs.readFile(
|
||||||
@@ -67,7 +67,7 @@ Generator.prototype.writeReadme = function() {
|
|||||||
|
|
||||||
// Write it as README.json
|
// Write it as README.json
|
||||||
return fs.writeFile(
|
return fs.writeFile(
|
||||||
path.join(that.options.output, "README.json"),
|
path.join(that.options.output, 'README.json'),
|
||||||
JSON.stringify(json, null, 4)
|
JSON.stringify(json, null, 4)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ Generator.prototype._writeTemplate = function(tpl, options, output, interpolate)
|
|||||||
title: that.options.title,
|
title: that.options.title,
|
||||||
description: that.options.description,
|
description: that.options.description,
|
||||||
language: that.book.config.normalizeLanguage(),
|
language: that.book.config.normalizeLanguage(),
|
||||||
|
innerlanguage: that.book.isSubBook()? that.book.config.get('language') : null,
|
||||||
|
|
||||||
glossary: that.book.glossary,
|
glossary: that.book.glossary,
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/*eslint no-console: 0*/
|
/* eslint no-console: 0 */
|
||||||
|
|
||||||
var Q = require('q');
|
var Q = require('q');
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ var fsUtils = {
|
|||||||
fs.exists(path, d.resolve);
|
fs.exists(path, d.resolve);
|
||||||
return d.promise;
|
return d.promise;
|
||||||
},
|
},
|
||||||
|
findFile: findFile,
|
||||||
existsSync: fs.existsSync.bind(fs),
|
existsSync: fs.existsSync.bind(fs),
|
||||||
readFileSync: fs.readFileSync.bind(fs),
|
readFileSync: fs.readFileSync.bind(fs),
|
||||||
clean: cleanFolder,
|
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;
|
module.exports = fsUtils;
|
||||||
|
|||||||
+19
-19
@@ -1,14 +1,14 @@
|
|||||||
var Q = require("q");
|
var Q = require('q');
|
||||||
var _ = require("lodash");
|
var _ = require('lodash');
|
||||||
var path = require("path");
|
var path = require('path');
|
||||||
var crc = require("crc");
|
var crc = require('crc');
|
||||||
var exec = Q.denodeify(require("child_process").exec);
|
var exec = Q.denodeify(require('child_process').exec);
|
||||||
var URI = require("URIjs");
|
var URI = require('urijs');
|
||||||
var pathUtil = require("./path");
|
var pathUtil = require('./path');
|
||||||
|
|
||||||
var fs = require("./fs");
|
var fs = require('./fs');
|
||||||
|
|
||||||
var GIT_PREFIX = "git+";
|
var GIT_PREFIX = 'git+';
|
||||||
var GIT_TMP = null;
|
var GIT_TMP = null;
|
||||||
|
|
||||||
|
|
||||||
@@ -30,20 +30,20 @@ function parseGitUrl(giturl) {
|
|||||||
giturl = giturl.slice(GIT_PREFIX.length);
|
giturl = giturl.slice(GIT_PREFIX.length);
|
||||||
|
|
||||||
uri = new URI(giturl);
|
uri = new URI(giturl);
|
||||||
ref = uri.fragment() || "master";
|
ref = uri.fragment() || 'master';
|
||||||
uri.fragment(null);
|
uri.fragment(null);
|
||||||
|
|
||||||
// Extract file inside the repo (after the .git)
|
// Extract file inside the repo (after the .git)
|
||||||
fileParts =uri.path().split(".git");
|
fileParts =uri.path().split('.git');
|
||||||
filepath = fileParts.length > 1? fileParts.slice(1).join(".git") : "";
|
filepath = fileParts.length > 1? fileParts.slice(1).join('.git') : '';
|
||||||
if (filepath[0] == "/") filepath = filepath.slice(1);
|
if (filepath[0] == '/') filepath = filepath.slice(1);
|
||||||
|
|
||||||
// Recreate pathname without the real filename
|
// Recreate pathname without the real filename
|
||||||
uri.path(_.first(fileParts)+".git");
|
uri.path(_.first(fileParts)+'.git');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
host: uri.toString(),
|
host: uri.toString(),
|
||||||
ref: ref || "master",
|
ref: ref || 'master',
|
||||||
filepath: filepath
|
filepath: filepath
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ function parseGitUrl(giturl) {
|
|||||||
function cloneGitRepo(host, ref) {
|
function cloneGitRepo(host, ref) {
|
||||||
var isBranch = false;
|
var isBranch = false;
|
||||||
|
|
||||||
ref = ref || "master";
|
ref = ref || 'master';
|
||||||
if (!validateSha(ref)) isBranch = true;
|
if (!validateSha(ref)) isBranch = true;
|
||||||
|
|
||||||
return Q()
|
return Q()
|
||||||
@@ -69,7 +69,7 @@ function cloneGitRepo(host, ref) {
|
|||||||
// Return or clone the git repo
|
// Return or clone the git repo
|
||||||
.then(function() {
|
.then(function() {
|
||||||
// Unique ID for repo/ref combinaison
|
// 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
|
// Absolute path to the folder
|
||||||
var repoPath = path.resolve(GIT_TMP, repoId);
|
var repoPath = path.resolve(GIT_TMP, repoId);
|
||||||
@@ -79,9 +79,9 @@ function cloneGitRepo(host, ref) {
|
|||||||
if (doExists) return;
|
if (doExists) return;
|
||||||
|
|
||||||
// Clone repo
|
// Clone repo
|
||||||
return exec("git clone "+host+" "+repoPath)
|
return exec('git clone '+host+' '+repoPath)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return exec("git checkout "+ref, { cwd: repoPath });
|
return exec('git checkout '+ref, { cwd: repoPath });
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.thenResolve(repoPath);
|
.thenResolve(repoPath);
|
||||||
|
|||||||
+13
-13
@@ -1,13 +1,13 @@
|
|||||||
var _ = require("lodash");
|
var _ = require('lodash');
|
||||||
var path = require("path");
|
var path = require('path');
|
||||||
var fs = require("fs");
|
var fs = require('fs');
|
||||||
|
|
||||||
var i18n = require("i18n");
|
var i18n = require('i18n');
|
||||||
|
|
||||||
var I18N_PATH = path.resolve(__dirname, "../../theme/i18n/");
|
var I18N_PATH = path.resolve(__dirname, '../../theme/i18n/');
|
||||||
var DEFAULT_LANGUAGE = "en";
|
var DEFAULT_LANGUAGE = 'en';
|
||||||
var LOCALES = _.map(fs.readdirSync(I18N_PATH), function(lang) {
|
var LOCALES = _.map(fs.readdirSync(I18N_PATH), function(lang) {
|
||||||
return path.basename(lang, ".json");
|
return path.basename(lang, '.json');
|
||||||
});
|
});
|
||||||
|
|
||||||
i18n.configure({
|
i18n.configure({
|
||||||
@@ -18,11 +18,11 @@ i18n.configure({
|
|||||||
});
|
});
|
||||||
|
|
||||||
function compareLocales(lang, locale) {
|
function compareLocales(lang, locale) {
|
||||||
var langMain = _.first(lang.split("-"));
|
var langMain = _.first(lang.split('-'));
|
||||||
var langSecond = _.last(lang.split("-"));
|
var langSecond = _.last(lang.split('-'));
|
||||||
|
|
||||||
var localeMain = _.first(locale.split("-"));
|
var localeMain = _.first(locale.split('-'));
|
||||||
var localeSecond = _.last(locale.split("-"));
|
var localeSecond = _.last(locale.split('-'));
|
||||||
|
|
||||||
if (locale == lang) return 100;
|
if (locale == lang) return 100;
|
||||||
if (localeMain == langMain) return 50;
|
if (localeMain == langMain) return 50;
|
||||||
@@ -42,8 +42,8 @@ var normalizeLanguage = _.memoize(function(lang) {
|
|||||||
.filter(function(lang) {
|
.filter(function(lang) {
|
||||||
return lang.score > 0;
|
return lang.score > 0;
|
||||||
})
|
})
|
||||||
.sortBy("score")
|
.sortBy('score')
|
||||||
.pluck("locale")
|
.pluck('locale')
|
||||||
.last()
|
.last()
|
||||||
.value();
|
.value();
|
||||||
return language || lang;
|
return language || lang;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
var _ = require("lodash");
|
var _ = require('lodash');
|
||||||
|
|
||||||
// Returns from a navigation and a current file, a snapshot of current detailed state
|
// Returns from a navigation and a current file, a snapshot of current detailed state
|
||||||
function calculProgress(navigation, current) {
|
function calculProgress(navigation, current) {
|
||||||
|
|||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitbook",
|
"name": "gitbook",
|
||||||
"version": "2.5.2",
|
"version": "2.6.2",
|
||||||
"homepage": "https://www.gitbook.com",
|
"homepage": "https://www.gitbook.com",
|
||||||
"description": "Library and cmd utility to generate GitBooks",
|
"description": "Library and cmd utility to generate GitBooks",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
"gitbook-parsers": "0.8.7",
|
"gitbook-parsers": "0.8.7",
|
||||||
"gitbook-plugin-highlight": "1.0.3",
|
"gitbook-plugin-highlight": "1.0.3",
|
||||||
"gitbook-plugin-sharing": "1.0.1",
|
"gitbook-plugin-sharing": "1.0.1",
|
||||||
"gitbook-plugin-search": "1.0.2",
|
"gitbook-plugin-search": "1.1.0",
|
||||||
"gitbook-plugin-fontsettings": "1.0.2",
|
"gitbook-plugin-fontsettings": "1.0.2",
|
||||||
"nunjucks": "2.1.0",
|
"nunjucks": "2.2.0",
|
||||||
"nunjucks-autoescape": "1.0.0",
|
"nunjucks-autoescape": "1.0.0",
|
||||||
"nunjucks-filter": "1.0.0",
|
"nunjucks-filter": "1.0.0",
|
||||||
"i18n": "0.5.0",
|
"i18n": "0.5.0",
|
||||||
@@ -26,11 +26,11 @@
|
|||||||
"gitbook-plugin-livereload": "0.0.1",
|
"gitbook-plugin-livereload": "0.0.1",
|
||||||
"chokidar": "~1.0.5",
|
"chokidar": "~1.0.5",
|
||||||
"send": "0.2.0",
|
"send": "0.2.0",
|
||||||
"tiny-lr": "0.1.5",
|
"tiny-lr": "0.2.1",
|
||||||
"tmp": "0.0.24",
|
"tmp": "0.0.24",
|
||||||
"crc": "3.2.1",
|
"crc": "3.2.1",
|
||||||
"bash-color": "0.0.3",
|
"bash-color": "0.0.3",
|
||||||
"URIjs": "1.14.1",
|
"urijs": "1.17.0",
|
||||||
"request": "2.51.0",
|
"request": "2.51.0",
|
||||||
"npm": "2.4.1",
|
"npm": "2.4.1",
|
||||||
"dom-serializer": "0.1.0",
|
"dom-serializer": "0.1.0",
|
||||||
|
|||||||
@@ -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
|
||||||
+37
-37
@@ -1,91 +1,91 @@
|
|||||||
var fs = require("fs");
|
var fs = require('fs');
|
||||||
var path = require("path");
|
var path = require('path');
|
||||||
|
|
||||||
describe("JSON generator", function () {
|
describe('JSON generator', function () {
|
||||||
describe("Basic Book", function() {
|
describe('Basic Book', function() {
|
||||||
var book;
|
var book;
|
||||||
|
|
||||||
before(function() {
|
before(function() {
|
||||||
return books.generate("basic", "json")
|
return books.generate('basic', 'json')
|
||||||
.then(function(_book) {
|
.then(function(_book) {
|
||||||
book = _book;
|
book = _book;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should correctly output a README.json", function() {
|
it('should correctly output a README.json', function() {
|
||||||
book.should.have.file("README.json");
|
book.should.have.file('README.json');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should output a valid json", function() {
|
it('should output a valid json', function() {
|
||||||
book.should.have.jsonfile("README.json");
|
book.should.have.jsonfile('README.json');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Page Format", function() {
|
describe('Page Format', function() {
|
||||||
var page;
|
var page;
|
||||||
|
|
||||||
before(function() {
|
before(function() {
|
||||||
page = JSON.parse(
|
page = JSON.parse(
|
||||||
fs.readFileSync(
|
fs.readFileSync(
|
||||||
path.join(book.options.output, "README.json"),
|
path.join(book.options.output, 'README.json'),
|
||||||
{ encoding: "utf-8" }
|
{ encoding: 'utf-8' }
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should contains valid section", function() {
|
it('should contains valid section', function() {
|
||||||
page.should.have.property("sections").with.lengthOf(1);
|
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('content').which.is.a.String();
|
||||||
page.sections[0].should.have.property("type", "normal");
|
page.sections[0].should.have.property('type', 'normal');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should contains valid progress", function() {
|
it('should contains valid progress', function() {
|
||||||
page.should.have.property("progress");
|
page.should.have.property('progress');
|
||||||
page.progress.should.have.property("chapters").with.lengthOf(1);
|
page.progress.should.have.property('chapters').with.lengthOf(1);
|
||||||
page.progress.should.have.property("current");
|
page.progress.should.have.property('current');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should contains no languages", function() {
|
it('should contains no languages', function() {
|
||||||
page.should.have.property("langs").with.lengthOf(0);
|
page.should.have.property('langs').with.lengthOf(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Multilingual Book", function() {
|
describe('Multilingual Book', function() {
|
||||||
var book;
|
var book;
|
||||||
|
|
||||||
before(function() {
|
before(function() {
|
||||||
return books.generate("languages", "json")
|
return books.generate('languages', 'json')
|
||||||
.then(function(_book) {
|
.then(function(_book) {
|
||||||
book = _book;
|
book = _book;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should correctly output READMEs", function() {
|
it('should correctly output READMEs', function() {
|
||||||
book.should.have.file("README.json");
|
book.should.have.file('README.json');
|
||||||
book.should.have.file("en/README.json");
|
book.should.have.file('en/README.json');
|
||||||
book.should.have.file("fr/README.json");
|
book.should.have.file('fr/README.json');
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should output valid json", function() {
|
it('should output valid json', function() {
|
||||||
book.should.have.jsonfile("README.json");
|
book.should.have.jsonfile('README.json');
|
||||||
book.should.have.jsonfile("en/README.json");
|
book.should.have.jsonfile('en/README.json');
|
||||||
book.should.have.jsonfile("fr/README.json");
|
book.should.have.jsonfile('fr/README.json');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Page Format", function() {
|
describe('Page Format', function() {
|
||||||
var page;
|
var page;
|
||||||
|
|
||||||
before(function() {
|
before(function() {
|
||||||
page = JSON.parse(
|
page = JSON.parse(
|
||||||
fs.readFileSync(
|
fs.readFileSync(
|
||||||
path.join(book.options.output, "README.json"),
|
path.join(book.options.output, 'README.json'),
|
||||||
{ encoding: "utf-8" }
|
{ encoding: 'utf-8' }
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should contains no languages", function() {
|
it('should contains no languages', function() {
|
||||||
page.should.have.property("langs").with.lengthOf(2);
|
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}
|
||||||
+1771
-1758
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"
|
||||||
|
}
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
module.exports = {
|
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
|
// Prepare sidebar: state and toggle button
|
||||||
function init() {
|
function init() {
|
||||||
// Init last state if not mobile
|
// Init last state if not mobile
|
||||||
if (!platform.isMobile) {
|
if (!platform.isMobile()) {
|
||||||
toggleSidebar(storage.get('sidebar', true), false);
|
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
|
// Filter summary with a list of path
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ state.update = function(dom) {
|
|||||||
state.level = $book.data('level');
|
state.level = $book.data('level');
|
||||||
state.basePath = $book.data('basepath');
|
state.basePath = $book.data('basepath');
|
||||||
|
|
||||||
|
// If book is multilingual, language of this book
|
||||||
|
state.innerLanguage = $book.data('innerlanguage');
|
||||||
|
|
||||||
// Date of build
|
// Date of build
|
||||||
state.revision = $book.data('revision');
|
state.revision = $book.data('revision');
|
||||||
|
|
||||||
@@ -20,11 +23,14 @@ state.update = function(dom) {
|
|||||||
// Title of the chapter
|
// Title of the chapter
|
||||||
state.chapterTitle = $book.data('chapter-title');
|
state.chapterTitle = $book.data('chapter-title');
|
||||||
|
|
||||||
// Absolute url to the root of the book
|
// Absolute url to the root of the book (inner book)
|
||||||
state.root = url.resolve(
|
state.root = url.resolve(
|
||||||
location.protocol+'//'+location.host,
|
location.protocol+'//'+location.host,
|
||||||
path.dirname(path.resolve(location.pathname.replace(/\/$/, '/index.html'), state.basePath))
|
path.dirname(path.resolve(location.pathname.replace(/\/$/, '/index.html'), state.basePath))
|
||||||
);
|
).replace(/\/?$/, '/');
|
||||||
|
|
||||||
|
// Absolute root to the language (for multilingual book)
|
||||||
|
state.bookRoot = state.innerLanguage? url.resolve(state.root, '..') : state.root;
|
||||||
};
|
};
|
||||||
|
|
||||||
state.update($);
|
state.update($);
|
||||||
|
|||||||
@@ -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
|
// Rate of growth for headings
|
||||||
@scale: 0.25;
|
@scale: 0.25;
|
||||||
|
|
||||||
@@ -122,6 +123,7 @@
|
|||||||
|
|
||||||
h6 {
|
h6 {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
|
color: @md-h6-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Code blocks */
|
/* Code blocks */
|
||||||
@@ -200,8 +202,8 @@
|
|||||||
/* Lists */
|
/* Lists */
|
||||||
ul, ol {
|
ul, ol {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-top: 0;
|
margin: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: @spacing;
|
||||||
padding-left: 2em;
|
padding-left: 2em;
|
||||||
|
|
||||||
ol, ul {
|
ol, ul {
|
||||||
@@ -218,6 +220,7 @@
|
|||||||
/* Blockquote */
|
/* Blockquote */
|
||||||
blockquote {
|
blockquote {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
margin-bottom: @spacing;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
color: @md-blockquote-color;
|
color: @md-blockquote-color;
|
||||||
border-left: 4px solid @md-blockquote-border;
|
border-left: 4px solid @md-blockquote-border;
|
||||||
@@ -252,3 +255,4 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,13 @@
|
|||||||
{% block description %}{% if progress.current.level == "0" %}{{ description }}{% endif %}{% endblock %}
|
{% block description %}{% if progress.current.level == "0" %}{{ description }}{% endif %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<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 }}">
|
<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" %}
|
{% include "includes/summary.html" %}
|
||||||
<div class="book-body">
|
<div class="book-body">
|
||||||
<div class="body-inner">
|
<div class="body-inner">
|
||||||
|
|||||||
Reference in New Issue
Block a user