mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
Start architecturing new default theme
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
const React = require('react');
|
||||
const { InjectedComponent } = require('./components/InjectedComponent');
|
||||
|
||||
const Application = React.createClass({
|
||||
render() {
|
||||
return <InjectedComponent matching={{ role: 'Body' }} />
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = Application;
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"name": "gitbook-plugin-theme-default",
|
||||
"description": "Default theme for GitBook",
|
||||
"main": "./index.js",
|
||||
"version": "1.0.5",
|
||||
"engines": {
|
||||
"gitbook": ">=3.0.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/GitbookIO/gitbook.git"
|
||||
},
|
||||
"author": "GitBook Inc. <contact@gitbook.com>",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/GitbookIO/gitbook/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Samy Pessé",
|
||||
"email": "samy@gitbook.com"
|
||||
}
|
||||
],
|
||||
"gitbook": {
|
||||
"properties": {
|
||||
"styles": {
|
||||
"type": "object",
|
||||
"title": "Custom Stylesheets",
|
||||
"properties": {
|
||||
"website": {
|
||||
"title": "Stylesheet for website output",
|
||||
"default": "styles/website.css"
|
||||
},
|
||||
"pdf": {
|
||||
"title": "Stylesheet for PDF output",
|
||||
"default": "styles/pdf.css"
|
||||
},
|
||||
"epub": {
|
||||
"title": "Stylesheet for ePub output",
|
||||
"default": "styles/epub.css"
|
||||
},
|
||||
"mobi": {
|
||||
"title": "Stylesheet for Mobi output",
|
||||
"default": "styles/mobi.css"
|
||||
},
|
||||
"ebook": {
|
||||
"title": "Stylesheet for ebook outputs (PDF, ePub, Mobi)",
|
||||
"default": "styles/ebook.css"
|
||||
},
|
||||
"print": {
|
||||
"title": "Stylesheet to replace default ebook css",
|
||||
"default": "styles/print.css"
|
||||
}
|
||||
}
|
||||
},
|
||||
"showLevel": {
|
||||
"type": "boolean",
|
||||
"title": "Show level indicator in TOC",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
const React = require('react');
|
||||
const GitBook = require('gitbook-core');
|
||||
|
||||
const ThemeBody = React.createClass({
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
My Base theme for gitbook
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = GitBook.createPlugin((dispatch, state) => {
|
||||
dispatch(GitBook.registerComponent(ThemeBody, { role: 'Body' }));
|
||||
});
|
||||
@@ -22,6 +22,7 @@
|
||||
"fresh-require": "1.0.3",
|
||||
"front-matter": "^2.1.0",
|
||||
"gitbook-asciidoc": "1.2.2",
|
||||
"gitbook-core": "*",
|
||||
"gitbook-markdown": "2.0.1",
|
||||
"gitbook-plugin-fontsettings": "2.0.0",
|
||||
"gitbook-plugin-highlight": "2.0.2",
|
||||
|
||||
Reference in New Issue
Block a user