https://github.com/kaeyleo/readertools
A reading plugin use the Vanilla JavaScript. Web移动端博客插件
https://github.com/kaeyleo/readertools
blog javascript plugin
Last synced: 3 months ago
JSON representation
A reading plugin use the Vanilla JavaScript. Web移动端博客插件
- Host: GitHub
- URL: https://github.com/kaeyleo/readertools
- Owner: kaeyleo
- License: mit
- Created: 2017-05-28T15:59:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T15:27:03.000Z (almost 8 years ago)
- Last Synced: 2025-01-08T07:28:16.238Z (5 months ago)
- Topics: blog, javascript, plugin
- Language: JavaScript
- Homepage:
- Size: 5.36 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ReaderTools
一款小而美的移动端web博客插件,简单轻量无依赖。
A tiny js lib to create reader tools for your website. No dependencies.
[DEMO](http://liaokeyu.com/readerTools)

该插件仅支持移动端web应用,请使用手机查看:

## Features
- Day-night Mode 夜间模式
- Scroll to top 返回顶部## Build
本项目使用 `gulp` 构建,在 `dist` 文件夹中开发,先手动下载或者 `git clone` 本项目,然后在根目录下 `$ npm install` 安装开发所需的依赖,最后 `$ gulp` 启动项目,并在 `http://localhost:8080/demo` 预览。
ReaderTools uses `gulp` to build a development and dist versions.
First you need install all dependencies, in repo's root:
`$ npm install`
Then run:
`$ gulp`
The result is available in `build/` folder.## Use
引入 dist 文件夹中的 `readerTools.min.css` 和 `readerTools.min.js`,需要引入icon图标 `` ,示例:
```html
......
// 文章部分的父容器
var el = document.querySelector('.page');
// 初始化,并传入文章节点的父容器,和可选配置
readerTools.init(el, {
'tools': ['top', 'mode'] // 默认值
});
......
```## License
MIT