summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-theme-default/src/components/Sidebar.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2017-01-06 17:15:30 +0100
committerGitHub <noreply@github.com>2017-01-06 17:15:30 +0100
commit7029c01806781f5ed74f175545ea154aa17cc6fd (patch)
treed87189690b5acc78acbd3d9688edc37b251541f3 /packages/gitbook-plugin-theme-default/src/components/Sidebar.js
parent11893255d1167382b16871d2ca831c90a40af57d (diff)
downloadgitbook-7029c01806781f5ed74f175545ea154aa17cc6fd.zip
gitbook-7029c01806781f5ed74f175545ea154aa17cc6fd.tar.gz
gitbook-7029c01806781f5ed74f175545ea154aa17cc6fd.tar.bz2
Switch to markup-it for parsing (#1659)
* Start new parsers in gitbook itself * Update markup-it * Fix eslint errors * Adapt basic parsing for summary * Start tests for summaryFromDocument * Continue * Add parsing of glossary * Add back languages parsing * Adapt most tests for parsing * Adapt all tests 🙌 * Adapt travis tests * Bootstrap lerna before running tests * Fix lowercase in require (linux) * Fix command gitbook init * Fix generation of ready by init command * Fix generation of summary * Fix watch after serve * Add trademark to sidebar * Add back favicon to default theme * Open trademark in new tab
Diffstat (limited to 'packages/gitbook-plugin-theme-default/src/components/Sidebar.js')
-rw-r--r--packages/gitbook-plugin-theme-default/src/components/Sidebar.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/gitbook-plugin-theme-default/src/components/Sidebar.js b/packages/gitbook-plugin-theme-default/src/components/Sidebar.js
index ab628df..fd10730 100644
--- a/packages/gitbook-plugin-theme-default/src/components/Sidebar.js
+++ b/packages/gitbook-plugin-theme-default/src/components/Sidebar.js
@@ -3,6 +3,25 @@ const { React } = GitBook;
const Summary = require('./Summary');
+/**
+ * The GitBook trademark.
+ * @type {ReactClass}
+ */
+const GitBookTrademark = React.createClass({
+ render() {
+ return (
+ <a className="GitBookTrademark" href="https://www.gitbook.com/?utm_source=gitbook&utm_medium=trademark" target="_blank">
+ <span>Published with <b>GitBook</b></span>
+ <GitBook.Image src="gitbook/theme-default/images/logo.svg" />
+ </a>
+ );
+ }
+});
+
+/**
+ * Sidebar containing a serch bar, the table of contents, and the GitBook trademark.
+ * @type {ReactClass}
+ */
const Sidebar = React.createClass({
propTypes: {
summary: GitBook.PropTypes.Summary
@@ -16,6 +35,8 @@ const Sidebar = React.createClass({
<div className="Sidebar book-summary">
<GitBook.InjectedComponent matching={{ role: 'search:container:input' }} />
<Summary summary={summary} />
+
+ <GitBookTrademark />
</div>
</div>
);