add book.js

This commit is contained in:
nick
2018-03-03 12:11:07 +08:00
parent 51d82157f0
commit a22a8a1bd3
435 changed files with 27430 additions and 0 deletions

3
node_modules/gitbook-plugin-donate/.npmignore generated vendored Normal file
View File

@ -0,0 +1,3 @@
node_modules/
*.log
.DS_Store

31
node_modules/gitbook-plugin-donate/README.md generated vendored Normal file
View File

@ -0,0 +1,31 @@
# Gitbook Donate Plugin
[![npm](https://img.shields.io/npm/v/gitbook-plugin-donate.svg?style=plastic)](https://npmjs.org/package/gitbook-plugin-donate) [![npm](https://img.shields.io/npm/dm/gitbook-plugin-donate.svg?style=plastic)](https://npmjs.org/package/gitbook-plugin-donate) [![npm](https://img.shields.io/npm/dt/gitbook-plugin-donate.svg?style=plastic)](https://npmjs.org/package/gitbook-plugin-donate)
Config:
```json
{
"plugins": ["donate"],
"pluginsConfig": {
"donate": {
"wechat": "例:/images/qr.png",
"alipay": "http://blog.willin.wang/static/images/qr.png",
"title": "默认空",
"button": "默认值Donate",
"alipayText": "默认值:支付宝捐赠",
"wechatText": "默认值:微信捐赠"
}
}
}
```
如果喜欢,请打赏
## LICENSE
MIT
Alipay Donation(通过支付宝捐赠)
![qr](https://cloud.githubusercontent.com/assets/1890238/15489630/fccbb9cc-2193-11e6-9fed-b93c59d6ef37.png)

120
node_modules/gitbook-plugin-donate/assets/plugin.css generated vendored Normal file
View File

@ -0,0 +1,120 @@
.gitbook-donate {
padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;
}
#rewardButton {
cursor: pointer;
border: 0;
outline: 0;
border-radius: 100%;
padding: 0;
margin: 0;
letter-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
}
#rewardButton span {
display: inline-block;
width: 80px;
height: 35px;
line-height: 35px;
border-radius: 5px;
color: #fff;
font-weight: 400;
font-style: normal;
font-variant: normal;
font-stretch: normal;
font-size: 18px;
font-family: "Microsoft Yahei";
background: #f44336;
}
#rewardButton span:hover {
background: #f7877f;
}
#QR {
padding-top: 20px;
}
#QR a {
border: 0;
}
#QR img {
width: 180px;
max-width: 100%;
display: inline-block;
margin: 0.8em 2em 0 2em;
}
#wechat:hover p {
animation: roll 0.1s infinite linear;
-webkit-animation: roll 0.1s infinite linear;
-moz-animation: roll 0.1s infinite linear;
}
#alipay:hover p {
animation: roll 0.1s infinite linear;
-webkit-animation: roll 0.1s infinite linear;
-moz-animation: roll 0.1s infinite linear;
}
@-moz-keyframes roll {
from {
-webkit-transform: rotateZ(30deg);
-moz-transform: rotateZ(30deg);
-ms-transform: rotateZ(30deg);
-o-transform: rotateZ(30deg);
transform: rotateZ(30deg);
}
to {
-webkit-transform: rotateZ(-30deg);
-moz-transform: rotateZ(-30deg);
-ms-transform: rotateZ(-30deg);
-o-transform: rotateZ(-30deg);
transform: rotateZ(-30deg);
}
}
@-webkit-keyframes roll {
from {
-webkit-transform: rotateZ(30deg);
-moz-transform: rotateZ(30deg);
-ms-transform: rotateZ(30deg);
-o-transform: rotateZ(30deg);
transform: rotateZ(30deg);
}
to {
-webkit-transform: rotateZ(-30deg);
-moz-transform: rotateZ(-30deg);
-ms-transform: rotateZ(-30deg);
-o-transform: rotateZ(-30deg);
transform: rotateZ(-30deg);
}
}
@-o-keyframes roll {
from {
-webkit-transform: rotateZ(30deg);
-moz-transform: rotateZ(30deg);
-ms-transform: rotateZ(30deg);
-o-transform: rotateZ(30deg);
transform: rotateZ(30deg);
}
to {
-webkit-transform: rotateZ(-30deg);
-moz-transform: rotateZ(-30deg);
-ms-transform: rotateZ(-30deg);
-o-transform: rotateZ(-30deg);
transform: rotateZ(-30deg);
}
}
@keyframes roll {
from {
-webkit-transform: rotateZ(30deg);
-moz-transform: rotateZ(30deg);
-ms-transform: rotateZ(30deg);
-o-transform: rotateZ(30deg);
transform: rotateZ(30deg);
}
to {
-webkit-transform: rotateZ(-30deg);
-moz-transform: rotateZ(-30deg);
-ms-transform: rotateZ(-30deg);
-o-transform: rotateZ(-30deg);
transform: rotateZ(-30deg);
}
}

56
node_modules/gitbook-plugin-donate/assets/plugin.js generated vendored Normal file
View File

@ -0,0 +1,56 @@
require(['gitbook', 'jQuery'], function(gitbook, $) {
var wechatURL;
var alipayURL;
var titleText;
var buttonText;
var wechatText;
var alipayText;
function insertDonateLink() {
if ($('.gitbook-donate').length === 0 && wechatURL !== undefined && (wechatURL !== '' || alipayURL !== '')) {
var html = [
'<div class="gitbook-donate">',
'<div>' + titleText + '</div>',
'<button id="rewardButton" disable="enable" onclick="var qr = document.getElementById(\'QR\'); if (qr.style.display === \'none\') {qr.style.display=\'block\';} else {qr.style.display=\'none\'}">',
'<span>' + buttonText + '</span>',
'</button>',
'<div id="QR" style="display: none;">'
];
if (wechatURL !== '') {
html = html.concat([
'<div id="wechat" style="display: inline-block">',
'<a href="' + wechatURL + '" class="fancybox" rel="group">',
'<img id="wechat_qr" src="' + wechatURL + '" alt="WeChat Pay"/>',
'</a>',
'<p>' + wechatText + '</p>',
'</div>'
]);
}
if (alipayURL !== '') {
html = html.concat([
'<div id="alipay" style="display: inline-block">',
'<a href="' + alipayURL+ '" class="fancybox" rel="group">',
'<img id="alipay_qr" src="' + alipayURL + '" alt="Alipay"/>',
'</a>',
'<p>' + alipayText + '</p>', '</div>'
]);
}
html = html.concat(['</div>', '</div>']);
$('.page-inner section.normal:last').after(html.join(''));
}
}
gitbook.events.bind('start', function(e, config) {
wechatURL = config.donate.wechat || '';
wechatText = config.donate.wechatText || '微信捐赠';
alipayURL = config.donate.alipay || '';
alipayText = config.donate.alipayText || '支付宝捐赠';
titleText = config.donate.title || '';
buttonText = config.donate.button || '赏';
insertDonateLink();
});
gitbook.events.bind('page.change', function() {
insertDonateLink();
});
});

11
node_modules/gitbook-plugin-donate/index.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
module.exports = {
website: {
assets: './assets',
css: [
'plugin.css'
],
js: [
'plugin.js'
]
}
};

126
node_modules/gitbook-plugin-donate/package.json generated vendored Normal file
View File

@ -0,0 +1,126 @@
{
"_args": [
[
{
"name": "gitbook-plugin-donate",
"raw": "gitbook-plugin-donate@1.0.2",
"rawSpec": "1.0.2",
"scope": null,
"spec": "1.0.2",
"type": "version"
},
"/Users/Nick/www/nick/gitbook"
]
],
"_from": "gitbook-plugin-donate@1.0.2",
"_id": "gitbook-plugin-donate@1.0.2",
"_inCache": true,
"_installable": true,
"_location": "/gitbook-plugin-donate",
"_nodeVersion": "6.2.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/gitbook-plugin-donate-1.0.2.tgz_1464927178723_0.8439654144458473"
},
"_npmUser": {
"email": "willin@willin.org",
"name": "willin"
},
"_npmVersion": "3.9.3",
"_phantomChildren": {},
"_requested": {
"name": "gitbook-plugin-donate",
"raw": "gitbook-plugin-donate@1.0.2",
"rawSpec": "1.0.2",
"scope": null,
"spec": "1.0.2",
"type": "version"
},
"_requiredBy": [
"#USER"
],
"_resolved": "https://registry.npmjs.org/gitbook-plugin-donate/-/gitbook-plugin-donate-1.0.2.tgz",
"_shasum": "b5e9522cd693158e1afee780b5f01393fd323f64",
"_shrinkwrap": null,
"_spec": "gitbook-plugin-donate@1.0.2",
"_where": "/Users/Nick/www/nick/gitbook",
"author": {
"name": "Willin Wang"
},
"bugs": {
"url": "https://github.com/willin/gitbook-plugin-donate/issues"
},
"dependencies": {},
"description": "Gitbook 捐赠打赏按钮插件",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "b5e9522cd693158e1afee780b5f01393fd323f64",
"tarball": "https://registry.npmjs.org/gitbook-plugin-donate/-/gitbook-plugin-donate-1.0.2.tgz"
},
"engines": {
"gitbook": "*"
},
"gitHead": "a87e6dd90bf780d4e6989f0056f1bf0c84cd5483",
"gitbook": {
"properties": {
"alipay": {
"default": "",
"title": "Alipay QR URL",
"type": "string"
},
"alipayText": {
"default": "支付宝打赏",
"title": "Alipay QR Text",
"type": "string"
},
"button": {
"default": "Donate",
"required": true,
"title": "Button Text",
"type": "string"
},
"title": {
"default": "",
"required": false,
"title": "Text above donate button",
"type": "string"
},
"wechat": {
"default": "",
"title": "Wechat QR URL",
"type": "string"
},
"wechatText": {
"default": "微信打赏",
"title": "Wechat QR text",
"type": "string"
}
}
},
"homepage": "https://github.com/willin/gitbook-plugin-donate#readme",
"keywords": [
"gitbook",
"plugin",
"donate",
"alipay",
"wechat"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"email": "willin@willin.org",
"name": "willin"
}
],
"name": "gitbook-plugin-donate",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/willin/gitbook-plugin-donate.git"
},
"scripts": {},
"version": "1.0.2"
}