项目作者: talltotal

项目描述 :
ppt plugin for vuepress
高级语言: Vue
项目地址: git://github.com/talltotal/vuepress-plugin-ppt.git
创建时间: 2019-06-04T03:57:40Z
项目社区:https://github.com/talltotal/vuepress-plugin-ppt

开源协议:

下载


@talltotal/vuepress-plugin-ppt

install

  1. yarn add -D @talltotal/vuepress-plugin-ppt
  2. # OR npm install -D @talltotal/vuepress-plugin-ppt

Usage

config.js 中引入

  1. module.exports = {
  2. plugins: ['@talltotal/vuepress-plugin-ppt']
  3. }

在 md 文档中使用

  1. frontmatter 增加 ppt 组件的配置,以及一些隐藏其他页面元素的设置
    • showPage Boolean 是否显示分页下标
    • listStyle Object 页面自定义样式,以页码为key
  2. 正文部分用 ::: ppt + ::: 包裹,中间以 ---- 为分页标识

另外,最好在组件外加个容器或自定义布局

Additionally, you can add a container or custom layout outside the component

  1. ---
  2. navbar: false
  3. # ppt options
  4. ppt:
  5. title: '@talltotal/vuepress-plugin-ppt'
  6. # whether to display pagination
  7. showPage: true
  8. # custom style apply on each page
  9. baseStyle: 'text-shadow: 0 0 2px rgba(0,0,0,0.2);'
  10. # custom page-style with page number as 'key'
  11. listStyle:
  12. 1: 'background-image: url(/imgs/bg.jpg)'
  13. ---
  14. ::: ppt
  15. # page one
  16. xxxx
  17. ----
  18. # page two
  19. xxxx
  20. ----
  21. # page three
  22. xxxx
  23. :::

操作

  • 键盘
    • ⬆️⬅️:上一张
    • ⬇️➡️:下一张
  • 手势
    • 向左划:上一张
    • 向右划:下一张