Skip to content

Commit

Permalink
0.8.0 最新版
Browse files Browse the repository at this point in the history
  • Loading branch information
ksky521 committed Jul 8, 2014
1 parent 41641a8 commit 597810a
Show file tree
Hide file tree
Showing 13 changed files with 1,702 additions and 264 deletions.
58 changes: 0 additions & 58 deletions Gruntfile.js

This file was deleted.

27 changes: 9 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
nodePPT - 做最好的网页版ppt
=============
## 0.8 版本更新
* 直接支持html和markdown混编,不在使用[code]语法
* 添加更多列表渐显动效:moveIn/fadeIn/zoomIn/bounceIn
* 支持加粗和强调,按键【H】动效
* 修改不合理的样式
* 持续优化~

## 0.7 版本更新
* 添加更多转场动效
* bug fix
Expand Down Expand Up @@ -109,19 +116,7 @@ nodeppt generate ./ppts/demo.md -a -o output/path
nodeppt path -o output/path -a
```

### 创建
支持markdown语法快速创建网页幻灯片。

```bash
nodeppt create markdown_file_name
```

按照提示输入基本信息后就可以创建,默认创建是markdown版本,如果需要创建html版本,可以使用:

```bash
nodeppt create ppt-name.html
# or
nodeppt create ppt-name.htm
```
#### markdown语法
Expand Down Expand Up @@ -189,15 +184,13 @@ nodeppt:https://github.com/ksky521/nodePPT

<a name="mixed-code"></a>
#### 插入html代码
如果需要完全diy自己的ppt内容,可以使用```[code][/code]``` 来包裹html代码。例如:
如果需要完全diy自己的ppt内容,可以**直接使用** html标签,支持markdown和html混编。例如:

```markdown
[code]
<div class="file-setting">
<p>这是html</p>
</div>
<p id="css-demo">这是css样式</p>
<p>使用&#91;code]&#91;/code]包裹的代码,会直接插入到页面</p>
<p>具体看下项目中 ppts/demo.md 代码</p>
<script>
function testScriptTag(){
Expand All @@ -210,12 +203,11 @@ nodeppt:https://github.com/ksky521/nodePPT
color: red;
}
</style>
[/code]
```

<a name="callback"></a>
#### 转场回调
前端的ppt,难免会在页面中演示一些demo,除了上面的插入html语法:```[code][/code]``` 之外,还提供了```in-callback``````out-callback```,分别用于:切换(切走)到当前ppt,执行的js函数名。例如:
前端的ppt,难免会在页面中演示一些demo,除了上面的插入html语法外,还提供了```incallback``````outcallback```,分别用于:切入(切走)到当前ppt,执行的js函数名。例如:

```markdown
[slide data-outcallback="outcallback" data-incallback="incallback"]
Expand Down Expand Up @@ -293,7 +285,6 @@ nodeppt start -h

* 执行 ```nodeppt start```
* 访问 [http://127.0.0.1:8080/](http://127.0.0.1:8080/)
* 查看在线demo:[http://myslide.duapp.com/](http://myslide.duapp.com/)


[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ksky521/nodeppt/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
Expand Down
2 changes: 1 addition & 1 deletion assets/css/nodeppt2.0.css

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions assets/js/nodeppt.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@
var i = slideCount;
var slide;
var transition = defaultOptions.transition;

var buildClass = '.build > *,.fadeIn > *,.moveIn > *,.bounceIn > *,.zoomIn > *';
while (slide = $slides[i--]) {
var items = $('.build > *', slide);
var items = $(buildClass, slide);
var dataset = slide.dataset;
for (var j = 0, item; item = items[j]; j++) {
var t = item.classList
Expand Down Expand Up @@ -341,7 +341,11 @@
case 72:
// H: Toggle code highlighting
$doc.body.classList.toggle('highlight-code');
setTimeout(function(){
$doc.body.classList.toggle('highlight-code');
},2000);
break;
// 下掉宽屏模式,默认width:100%
case 87:
// W: Toggle widescreen
// Only respect 'w' on body. Don't want to capture keys from an <input>.
Expand Down
Loading

0 comments on commit 597810a

Please sign in to comment.