滑动代码块 Spectacle-code-slide
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: OS X
- 软件首页: https://github.com/thejameskyle/spectacle-code-slide
- 软件文档: https://github.com/thejameskyle/spectacle-code-slide/blob/master/README.md
- 官方下载: https://github.com/thejameskyle/spectacle-code-slide/archive/master.zip
软件介绍
Spectacle-code-slide是一个用JavaScript开发的滑动代码块。Spectacle-code-slide目前的代码风格:
安装:
$ npm install --save spectacle-code-slide
使用:
import CodeSlide from 'spectacle-code-slide'; export default class Presentation extends React.Component { render() { return ( <Spectacle theme={theme}> <Deck transition={[]} transitionDuration={0} progress="bar"> // ... <CodeSlide transition={[]} lang="js" code={require("raw!../assets/code.example")} ranges={[ { loc: [0, 270], title: "Walking through some code" }, { loc: [0, 1], title: "The Beginning" }, { loc: [1, 2] }, { loc: [1, 2], note: "Heres a note!" }, { loc: [2, 3] }, { loc: [4, 7] }, { loc: [8, 10] }, // ... ]}/> // ... </Deck> </Spectacle> ); } }