Compare commits

...

45 Commits

Author SHA1 Message Date
Samy Pesse f998e2dec9 Bump version to 2.0.4 2015-05-28 18:07:20 +02:00
Samy Pesse 2c0bd53a91 Fix i18n used in multilingual book 2015-05-28 17:06:09 +02:00
Samy Pesse 6dd7f6162f Add title to languages chooser
Related to #757
2015-05-28 16:14:03 +02:00
Samy Pesse 475b0bb2b3 Adapt to nunjucks 1.3.x 2015-05-28 15:59:14 +02:00
Samy Pesse e6343935e3 Update nunjucks to fix raw tags 2015-05-28 15:50:46 +02:00
Samy Pessé 946883fd4c Merge pull request #772 from GitbookIO/feature/glossary_order
Fix #768: sort glossary, start with longest matchs
2015-05-28 15:21:03 +02:00
Samy Pessé b1b7e3148b Merge pull request #743 from chudaol/master
Added vk sharing button.
2015-05-28 14:54:03 +02:00
Samy Pesse 32203f6438 Sort glossary before applying it on pages 2015-05-28 14:49:53 +02:00
Samy Pesse f2d3c5d2ed Add test for #768 2015-05-28 14:38:21 +02:00
Samy Pessé 7e2f0ed4bc Merge pull request #758 from aschempp/hotfix/x-ua-compatible
Fix the X-UA-Compatible meta tag
2015-05-28 14:18:19 +02:00
Samy Pessé a877acf905 Merge pull request #759 from aschempp/hotfix/stylesheets
Move style sheets to the <head> section
2015-05-28 14:17:39 +02:00
Samy Pesse ac756ddf7e Bump version to 2.0.3 2015-05-27 21:11:58 +02:00
Samy Pesse 36e2236e6b Fix #765: in init handle correctly empty entries
Add tests for it, fix #769
2015-05-27 21:05:36 +02:00
Samy Pesse 72df665520 Update gitbook-parsers@0.7.5 2015-05-27 19:11:50 +02:00
Samy Pessé 07785528a5 Merge pull request #767 from wilhelmmatilainen/patch-1
Don't create panic by telling about false overwrite
2015-05-27 13:17:05 +02:00
Wilhelm bb579dd581 Don't create panic by telling about false overwrite 2015-05-27 14:13:02 +03:00
Samy Pessé a7d3064340 Change license to valid SPDX code 2015-05-26 16:10:11 +02:00
Andreas Schempp 1a60778248 Move style sheets to the <head> section
see https://github.com/GitbookIO/gitbook/issues/756
2015-05-23 09:14:26 +02:00
Andreas Schempp cda4bb5bda Fix the X-UA-Compatible meta tag
see https://github.com/GitbookIO/gitbook/issues/755
2015-05-23 09:06:58 +02:00
Olga Filipova 7543781046 Added vk sharing button. 2015-05-12 22:30:09 +02:00
Samy Pessé 82f3ffad06 Merge pull request #730 from creynders/patch-1
Fix typo in warning in `lib/plugin`
2015-05-04 14:47:56 +02:00
creynders dc4d2a1731 Fix typo in warning in lib/plugin 2015-05-04 13:16:47 +02:00
Samy Pessé 2523925915 Bump version to 2.0.2 2015-05-02 12:39:05 +02:00
Samy Pesse d5bbd8475c Fix #721: use links.join instead of path.join for links in page 2015-04-23 12:58:24 -05:00
Samy Pesse 54d195268a Add test relative links (related to #721) 2015-04-23 12:05:04 -05:00
Samy Pesse a0deb9509f Merge branch 'awrelll-master' 2015-04-20 07:53:16 -05:00
Samy Pesse b0b1433594 Fix authors list merge 2015-04-20 07:52:12 -05:00
Samy Pessé 17a2c0a37c Merge pull request #706 from savikko/patch-1
Added Finnish author
2015-04-14 18:56:31 -05:00
Samy Pessé fd68ea1cc2 Merge pull request #705 from savikko/master
Added Finnish
2015-04-14 18:56:21 -05:00
Tommi Savikko 784874c776 Added Finnish author 2015-04-14 22:39:23 +03:00
Thomas Clayton f45c6d3466 Added Finnish 2015-04-14 21:50:46 +03:00
Samy Pessé 98af70902f Merge pull request #701 from anthonyfok/patch-1
Fix typo in lib/book.js: lanuages → languages
2015-04-10 20:50:35 -05:00
Anthony Fok 41a67b5c4c Fix typo in lib/book.js: lanuages → languages 2015-04-10 07:41:12 -06:00
Samy Pessé 83ee903af4 Merge pull request #700 from paulmillr/master
Switch from gaze to chokidar.
2015-04-10 10:39:13 +02:00
Samy Pessé e591b0e485 Merge pull request #696 from sindresorhus/escaperegex-module
use the `escape-string-regexp` module
2015-04-10 10:37:53 +02:00
Paul Miller bcc9a34742 Switch from gaze to chokidar. 2015-04-10 06:09:04 +03:00
Sindre Sorhus 6b56c7de7f use the escape-string-regexp module
no point in hardcoding this.

https://github.com/sindresorhus/escape-string-regexp
2015-04-08 18:24:26 +07:00
Iancu Aurel 7b42719699 korean and japanese added 2015-04-07 17:34:40 +03:00
awrelll 64b8343f67 korean support added 2015-04-07 17:32:33 +03:00
awrelll fcc5089fa6 japan support added 2015-04-07 17:26:45 +03:00
Samy Pessé 334f782aa8 Merge pull request #693 from awrelll/patch-1
Romanian author added
2015-04-07 16:21:56 +02:00
Samy Pessé 1776f2bf77 Merge pull request #691 from awrelll/master
support for romanian language
2015-04-07 16:21:34 +02:00
Iancu Aurel e259412f79 Romanian author added 2015-04-07 17:21:05 +03:00
awrelll 999a02f110 support for romanian language 2015-04-07 17:12:41 +03:00
Samy Pessé 604d0fba65 Update nunjucks@1.3.0 2015-04-03 22:31:55 +02:00
30 changed files with 259 additions and 57 deletions
+8
View File
@@ -42,3 +42,11 @@ Translators
- Hu Hao (@howiehu)
- French
- Samy Pessé (@SamyPesse)
- Romanian
- Iancu Aurel (@awrelll)
- Finnish
- Tommi Savikko (@savikko)
- Japanese
- Iancu Aurel (@awrelll)
- Korean
- Iancu Aurel (@awrelll)
+18
View File
@@ -2,6 +2,24 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 2.0.4
- Fix `{% raw %}`, got confused with "fake" variable declarations
- Fix title of language chooser
- Fix the X-UA-Compatible meta tag
- Move style sheets to the <head> section
## 2.0.3
- Fix `gitbook init` for SUMMARY with empty entries
- Fix escaping of code blocks in markdown
## 2.0.2
- Fix relative links in windows
- Improve watcher in serve command (switch to chokidar)
- Add Romanian translation (`ro`)
- Add Finish translation (`fi`)
- Add Japanese translation (`jp`)
- Add Korean translation (`kr`)
## 2.0.1
- Improve error logging (display file, line and column)
- Add back support for `options.originalInput`
+16 -12
View File
@@ -115,7 +115,7 @@ Book.prototype.parse = function() {
return that.parseLangs()
.then(function() {
multilingual = that.langs.length > 0;
if (multilingual) that.log.info.ln("Parsing multilingual book, with", that.langs.length, "lanuages");
if (multilingual) that.log.info.ln("Parsing multilingual book, with", that.langs.length, "languages");
// Sub-books that inherit from the current book configuration
that.books = _.map(that.langs, function(lang) {
@@ -789,20 +789,19 @@ Book.prototype.normError = function(err, opts, defs) {
};
// Init and return a book
Book.init = function(root) {
var book = new Book(root);
Book.init = function(root, opts) {
var book = new Book(root, opts);
var extensionToUse = ".md";
var chaptersPaths = function(chapters) {
return _.reduce(chapters || [], function(accu, chapter) {
if (!chapter.path) return accu;
var o = {
title: chapter.title
};
if (chapter.path) o.path = chapter.path;
return accu.concat(
_.filter([
{
title: chapter.title,
path: chapter.path
}
].concat(chaptersPaths(chapter.articles)))
[o].concat(chaptersPaths(chapter.articles))
);
}, []);
};
@@ -839,12 +838,17 @@ Book.init = function(root) {
.then(function(chapters) {
// Create files that don't exist
return Q.all(_.map(chapters, function(chapter) {
if (!chapter.path) return Q();
var absolutePath = path.resolve(book.root, chapter.path);
return fs.exists(absolutePath)
.then(function(exists) {
book.log.info.ln("create", chapter.path);
if(exists) return;
if(exists) {
book.log.info.ln("found", chapter.path);
return;
} else {
book.log.info.ln("create", chapter.path);
}
return fs.mkdirp(path.dirname(absolutePath))
.then(function() {
+4 -3
View File
@@ -4,8 +4,8 @@ var Q = require("q");
var _ = require("lodash");
var nunjucks = require("nunjucks");
var AutoEscapeExtension = require("nunjucks-autoescape");
var FilterExtension = require("nunjucks-filter");
var AutoEscapeExtension = require("nunjucks-autoescape")(nunjucks);
var FilterExtension = require("nunjucks-filter")(nunjucks);
var fs = require("../utils/fs");
var BaseGenerator = require("../generator");
@@ -100,7 +100,6 @@ Generator.prototype.prepareTemplateEngine = function() {
that.env.addFilter('lvl', function(lvl) {
return lvl.split(".").length;
});
that.env.addGlobal('__', that.book.i18n.bind(that.book));
// Add extension
that.env.addExtension('AutoEscapeExtension', new AutoEscapeExtension(that.env));
@@ -238,6 +237,8 @@ Generator.prototype._writeTemplate = function(tpl, options, output, interpolate)
basePath: ".",
staticBase: path.join(".", "gitbook"),
'__': that.book.i18n.bind(that.book)
}, options)
);
})
+1 -1
View File
@@ -155,7 +155,7 @@ Plugin.prototype.callHook = function(name, data) {
if (!hookFunc) return Q(data);
this.book.log.debug.ln("call hook", name);
if (!_.contains(Plugin.HOOKS, name)) this.book.log.warn.ln("hook '"+name+"' used by plugin '"+this.name+"' is deprecated, and will be remove in the coming versions");
if (!_.contains(Plugin.HOOKS, name)) this.book.log.warn.ln("hook '"+name+"' used by plugin '"+this.name+"' is deprecated, and will be removed in the coming versions");
return Q()
.then(function() {
+2 -2
View File
@@ -2,9 +2,9 @@ var _ = require("lodash");
var Q = require("q");
var path = require("path");
var nunjucks = require("nunjucks");
var escapeStringRegexp = require("escape-string-regexp");
var git = require("./utils/git");
var stringUtils = require("./utils/string");
var fs = require("./utils/fs");
var batch = require("./utils/batch");
var pkg = require("../package.json");
@@ -302,7 +302,7 @@ TemplateEngine.prototype.addBlock = function(name, block) {
TemplateEngine.prototype._applyShortcut = function(parser, content, shortcut) {
if (!_.contains(shortcut.parsers, parser)) return content;
var regex = new RegExp(
stringUtils.escapeRegex(shortcut.start) + "([\\s\\S]*?[^\\$])" + stringUtils.escapeRegex(shortcut.end),
escapeStringRegexp(shortcut.start) + "([\\s\\S]*?[^\\$])" + escapeStringRegexp(shortcut.end),
'g'
);
return content.replace(regex, function(all, match) {
+6 -3
View File
@@ -193,7 +193,7 @@ function normalizeHtml(src, options) {
// Keep it as it is
} else if (links.isRelative(href)) {
var parts = url.parse(href);
var absolutePath = path.join(options.base, parts.pathname);
var absolutePath = links.join(options.base, parts.pathname);
var anchor = parts.hash || "";
// If is in navigation relative: transform as content
@@ -237,13 +237,16 @@ function normalizeHtml(src, options) {
});
// Replace glossary terms
_.each(options.glossary, function(term) {
var glossary = _.sortBy(options.glossary, function(term) {
return -term.name.length;
});
_.each(glossary, function(term) {
var r = new RegExp( "\\b(" + pregQuote(term.name.toLowerCase()) + ")\\b" , 'gi' );
var includedInFiles = false;
$("*").each(function() {
// Ignore codeblocks
if (_.contains(["code", "pre"], this.name.toLowerCase())) return;
if (_.contains(["code", "pre", "a"], this.name.toLowerCase())) return;
replaceText($, this, r, function(match) {
// Add to files index in glossary
-5
View File
@@ -20,12 +20,7 @@ function optionsToShellArgs(options) {
.join(" ");
}
function escapeRegex(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
}
module.exports = {
escapeRegex: escapeRegex,
escapeShellArg: escapeShellArg,
optionsToShellArgs: optionsToShellArgs,
toLowerCase: String.prototype.toLowerCase.call.bind(String.prototype.toLowerCase)
+8 -7
View File
@@ -1,7 +1,7 @@
var Q = require('q');
var _ = require('lodash');
var path = require('path');
var Gaze = require('gaze').Gaze;
var chokidar = require('chokidar');
var parsers = require('gitbook-parsers')
@@ -17,17 +17,18 @@ function watch(dir) {
toWatch.push("**/*"+ext);
});
var gaze = new Gaze(toWatch, {
cwd: dir
var watcher = chokidar.watch(toWatch, {
cwd: dir,
ignoreInitial: true
});
gaze.once("all", function(e, filepath) {
gaze.close();
watcher.once("all", function(e, filepath) {
watcher.close();
d.resolve(filepath);
});
gaze.once("error", function(err) {
gaze.close();
watcher.once("error", function(err) {
watcher.close();
d.reject(err);
});
+9 -8
View File
@@ -1,6 +1,6 @@
{
"name": "gitbook",
"version": "2.0.1",
"version": "2.0.4",
"homepage": "https://www.gitbook.com",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",
@@ -12,16 +12,16 @@
"resolve": "0.6.3",
"fs-extra": "0.16.5",
"fstream-ignore": "1.0.2",
"gitbook-parsers": "0.7.4",
"nunjucks": "git+https://github.com/mozilla/nunjucks.git#0f8b21b8df7e8e852b2e1889388653b7075f0d09",
"nunjucks-autoescape": "0.1.1",
"nunjucks-filter": "0.1.0",
"gitbook-parsers": "0.7.5",
"nunjucks": "mozilla/nunjucks#103513c294835bcbe64222de6db494e2555e294e",
"nunjucks-autoescape": "1.0.0",
"nunjucks-filter": "1.0.0",
"i18n": "0.5.0",
"semver": "2.2.1",
"npmi": "0.1.1",
"cheerio": "0.19.0",
"gitbook-plugin-livereload": "0.0.1",
"gaze": "~0.5.1",
"chokidar": "~1.0.1",
"send": "0.2.0",
"tiny-lr": "0.1.5",
"tmp": "0.0.24",
@@ -32,7 +32,8 @@
"npm": "2.4.1",
"dom-serializer": "0.1.0",
"spawn-cmd": "0.0.2",
"highlight.js": "8.4.0"
"highlight.js": "8.4.0",
"escape-string-regexp": "1.0.3"
},
"devDependencies": {
"mocha": "2.2.1",
@@ -60,7 +61,7 @@
"gitbook"
],
"author": "FriendCode Inc. <contact@gitbook.com>",
"license": "Apache 2",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/GitbookIO/gitbook/issues"
},
+4
View File
@@ -7,3 +7,7 @@ Just a simple and easy to understand test.
## hakunamatata
This word is not present in the content.
## test long
This is a test with a longer text that the first entry to test order.
+2
View File
@@ -6,3 +6,5 @@ The word test should be replaced by a glossary link.
But the word test should not be replaced in code blocks
```
The two words test long should be replaced by the correct glossary links.
+3
View File
@@ -0,0 +1,3 @@
*
!SUMMARY.md
!.gitignore
+6
View File
@@ -0,0 +1,6 @@
# Summary
* [Hello](hello.md)
* [Hello 2](hello2.md)
* Hello 3
* [Hello 4](hello3/hello4.md)
+1
View File
@@ -0,0 +1 @@
# Readme
+4
View File
@@ -0,0 +1,4 @@
# Summary
* [Folder1](folder1/README.md)
* [Folder2](folder2/README.md)
+3
View File
@@ -0,0 +1,3 @@
# Folder 1
[Link to folder2](../folder2/README.md)
+1
View File
@@ -0,0 +1 @@
# Folder 2
+10 -1
View File
@@ -14,7 +14,7 @@ describe('Glossary', function () {
it('should correctly list items', function() {
book.should.have.property("glossary");
book.glossary.should.have.lengthOf(2);
book.glossary.should.have.lengthOf(3);
});
});
@@ -73,6 +73,15 @@ describe('Glossary', function () {
}
});
});
it('should correctly select the longest term', function() {
readme.should.be.html({
".page-inner a[href='GLOSSARY.html#test_long']": {
count: 1,
text: "test long"
}
});
});
});
});
});
+23
View File
@@ -0,0 +1,23 @@
var fs = require('fs');
var path = require('path');
var should = require('should');
var Book = require('../').Book;
var LOG_LEVELS = require('../').LOG_LEVELS;
describe('Init Books', function () {
var initRoot;
before(function() {
initRoot = path.resolve(__dirname, "books/init");
return Book.init(initRoot, {
logLevel: LOG_LEVELS.DISABLED,
});
});
it('should create all chapters', function() {
should(fs.existsSync(path.resolve(initRoot, "hello.md"))).be.ok;
should(fs.existsSync(path.resolve(initRoot, "hello2.md"))).be.ok;
should(fs.existsSync(path.resolve(initRoot, "hello3/hello4.md"))).be.ok;
});
});
+28
View File
@@ -1,4 +1,9 @@
var should = require('should');
var fs = require('fs');
var _ = require('lodash');
var path = require('path');
var cheerio = require('cheerio');
var links = require("../lib/utils/links");
describe('Links', function () {
@@ -34,4 +39,27 @@ describe('Links', function () {
links.toAbsolute("/sub/test.md", "test", "test").should.be.equal("../sub/test.md");
});
});
describe('page', function() {
var book;
before(function() {
return books.generate("links", "website")
.then(function(_book) {
book = _book;
});
});
it('should correctly replace relative links', function() {
var readme = fs.readFileSync(
path.join(book.options.output, "folder1/index.html"),
{ encoding: "utf-8" }
);
var $ = cheerio.load(readme);
var $a = $(".page-inner a");
$a.attr('href').should.be.exactly("../folder2/index.html");
})
});
});
+20
View File
@@ -0,0 +1,20 @@
{
"LANGS_CHOOSE": "Valitse kieli",
"GLOSSARY": "Sanasto",
"GLOSSARY_INDEX": "Hakemisto",
"GLOSSARY_OPEN": "Sanasto",
"GITBOOK_LINK": "Julkaistu GitBookilla",
"SUMMARY": "Sisällysluettelo",
"SUMMARY_INTRODUCTION": "Johdanto",
"SUMMARY_TOGGLE": "Sisällysluettelu",
"SEARCH_TOGGLE": "Etsi",
"SEARCH_PLACEHOLDER": "Kirjoita hakusana",
"FONTSETTINGS_TOGGLE": "Fonttivalinnat",
"SHARE_TOGGLE": "Jaa",
"SHARE_ON": "Jaa {{platform}}ssa",
"FONTSETTINGS_WHITE": "Valkoinen",
"FONTSETTINGS_SEPIA": "Seepia",
"FONTSETTINGS_NIGHT": "Yö",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
+20
View File
@@ -0,0 +1,20 @@
{
"LANGS_CHOOSE": "言語を選択",
"GLOSSARY": "用語集",
"GLOSSARY_INDEX": "インデックス",
"GLOSSARY_OPEN": "用語集",
"GITBOOK_LINK": "で公開 GitBook",
"SUMMARY": "目次",
"SUMMARY_INTRODUCTION": "はじめに",
"SUMMARY_TOGGLE": "目次",
"SEARCH_TOGGLE": "検索",
"SEARCH_PLACEHOLDER": "検索すると入力",
"FONTSETTINGS_TOGGLE": "フォント設定",
"SHARE_TOGGLE": "シェア",
"SHARE_ON": "でシェア {{platform}}",
"FONTSETTINGS_WHITE": "白",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "夜",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
+20
View File
@@ -0,0 +1,20 @@
{
"LANGS_CHOOSE": "언어를 선택하세요",
"GLOSSARY": "어휘",
"GLOSSARY_INDEX": "색인",
"GLOSSARY_OPEN": "어휘",
"GITBOOK_LINK": "에 게시 GitBook",
"SUMMARY": "차례",
"SUMMARY_INTRODUCTION": "소개",
"SUMMARY_TOGGLE": "차례",
"SEARCH_TOGGLE": "수색",
"SEARCH_PLACEHOLDER": "검색어 입력",
"FONTSETTINGS_TOGGLE": "글꼴 설정",
"SHARE_TOGGLE": "몫",
"SHARE_ON": "공유 {{platform}}",
"FONTSETTINGS_WHITE": "화이트",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "밤",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
+20
View File
@@ -0,0 +1,20 @@
{
"LANGS_CHOOSE": "Alege o limba",
"GLOSSARY": "Glosar",
"GLOSSARY_INDEX": "Index",
"GLOSSARY_OPEN": "Glosar",
"GITBOOK_LINK": "Publicata cu GitBook",
"SUMMARY": "Cuprins",
"SUMMARY_INTRODUCTION": "Introducere",
"SUMMARY_TOGGLE": "Cuprins",
"SEARCH_TOGGLE": "Cauta",
"SEARCH_PLACEHOLDER": "Ce cauti",
"FONTSETTINGS_TOGGLE": "Setari de font",
"SHARE_TOGGLE": "Distribuie",
"SHARE_ON": "Distribuie pe {{platform}}",
"FONTSETTINGS_WHITE": "Alb",
"FONTSETTINGS_SEPIA": "Sepia",
"FONTSETTINGS_NIGHT": "Noapte",
"FONTSETTINGS_SANS": "Sans",
"FONTSETTINGS_SERIF": "Serif"
}
+3
View File
@@ -16,6 +16,9 @@ define([
},
"instapaper": function($el) {
window.open("http://www.instapaper.com/text?u="+encodeURIComponent(location.href));
},
"vk": function($el) {
window.open("http://vkontakte.ru/share.php?url="+encodeURIComponent(location.href));
}
};
+6 -6
View File
@@ -1,8 +1,8 @@
<!DOCTYPE HTML>
<html lang="{{ language }}" {% block htmlTag %}{% endblock %} {% if options.direction == "rtl" %}dir="rtl"{% endif %}>
{{ htmlSnippet("html:start")|default("")|safe }}
{{ htmlSnippet("html:start")|default("", true)|safe }}
<head>
{{ htmlSnippet("head:start")|default("")|safe }}
{{ htmlSnippet("head:start")|default("", true)|safe }}
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
@@ -11,14 +11,14 @@
{% if options.author %}<meta name="author" content="{{ options.author }}">{% endif %}
{% if options.isbn %}<meta name="identifier" content="{{ options.isbn }}" scheme="ISBN">{% endif %}
{% block head %}{% endblock %}
{{ htmlSnippet("head:end")|default("")|safe }}
{{ htmlSnippet("head:end")|default("", true)|safe }}
</head>
<body>
{{ htmlSnippet("body:start")|default("")|safe }}
{{ htmlSnippet("body:start")|default("", true)|safe }}
{% block style %}{% endblock %}
{% block content %}{% endblock %}
{% block javascript %}{% endblock %}
{{ htmlSnippet("body:end")|default("")|safe }}
{{ htmlSnippet("body:end")|default("", true)|safe }}
</body>
{{ htmlSnippet("html:end")|default("")|safe }}
{{ htmlSnippet("html:end")|default("", true)|safe }}
</html>
@@ -54,6 +54,10 @@
{% if options.links.sharing.weibo == true %}
<a href="#" target="_blank" class="btn pull-right weibo-sharing-link sharing-link" data-sharing="weibo" aria-label="Weibo"><i class="fa fa-weibo"></i></a>
{% endif %}
{% if options.links.sharing.vk == true %}
<a href="#" target="_blank" class="btn pull-right vk-sharing-link sharing-link" data-sharing="vk" aria-label="VK"><i class="fa fa-vk"></i></a>
{% endif %}
<!-- Title -->
<h1>
+1 -1
View File
@@ -1,6 +1,6 @@
{% extends "./layout.html" %}
{% block title %}{{ title }}{% endblock %}
{% block title %}{{ __("LANGS_CHOOSE") }} | {{ title }}{% endblock %}
{% block style %}
<link rel="stylesheet" href="{{ staticBase }}/style.css">
+8 -8
View File
@@ -1,10 +1,10 @@
<!DOCTYPE HTML>
<html lang="{{ language }}" {% if options.direction == "rtl" %}dir="rtl"{% endif %}>
{{ htmlSnippet("html:start")|default("")|safe }}
{{ htmlSnippet("html:start")|default("", true)|safe }}
<head>
{{ htmlSnippet("head:start")|default("")|safe }}
{{ htmlSnippet("head:start")|default("", true)|safe }}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>{% block title %}{% endblock %}</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="{% block description %}{% endblock %}">
@@ -17,15 +17,15 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="{{ staticBase }}/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="{{ staticBase }}/images/favicon.ico" type="image/x-icon">
{% block style %}{% endblock %}
{% block head %}{% endblock %}
{{ htmlSnippet("head:end")|default("")|safe }}
{{ htmlSnippet("head:end")|default("", true)|safe }}
</head>
<body>
{{ htmlSnippet("body:start")|default("")|safe }}
{% block style %}{% endblock %}
{{ htmlSnippet("body:start")|default("", true)|safe }}
{% block content %}{% endblock %}
{% block javascript %}{% endblock %}
{{ htmlSnippet("body:end")|default("")|safe }}
{{ htmlSnippet("body:end")|default("", true)|safe }}
</body>
{{ htmlSnippet("html:end")|default("")|safe }}
{{ htmlSnippet("html:end")|default("", true)|safe }}
</html>