summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2016-07-02 16:09:26 +0800
committerWu Cheng-Han2016-07-02 16:09:26 +0800
commitd39f1fc70084ad5b7c40a03657e5ff8d03cc7944 (patch)
treefbf82bac4481652b6c5587f4cb9ced70ed63373f
parent160b51d16a180a164f9b6eddbd80939478c7bd4b (diff)
Update to make slide mode support all extra syntax and change it's rendering engine
Diffstat (limited to '')
-rw-r--r--lib/response.js12
-rw-r--r--public/css/extra.css3
-rw-r--r--public/css/html.min.css2
-rw-r--r--public/css/slide.css230
-rwxr-xr-xpublic/js/reveal-markdown.js28
-rw-r--r--public/js/slide.js65
-rw-r--r--public/views/slide.ejs123
7 files changed, 376 insertions, 87 deletions
diff --git a/lib/response.js b/lib/response.js
index 133d7a37..a04b7176 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -22,12 +22,8 @@ var md = require('reveal.js/plugin/markdown/markdown');
//reveal.js
var slideOptions = {
- template: fs.readFileSync(config.slidepath).toString(),
- theme: 'css/theme/black.css',
- highlightTheme: 'zenburn',
separator: '^(\r\n?|\n)---(\r\n?|\n)$',
- verticalSeparator: '^(\r\n?|\n)----(\r\n?|\n)$',
- revealOptions: {}
+ verticalSeparator: '^(\r\n?|\n)----(\r\n?|\n)$'
};
//public
@@ -544,11 +540,9 @@ function showPublishSlide(req, res, next) {
url: origin,
title: meta.title || title,
description: meta.description,
- theme: slideOptions.theme,
- highlightTheme: slideOptions.highlightTheme,
slides: slides,
- options: JSON.stringify(slideOptions.revealOptions, null, 2),
- GA: meta.GA
+ GA: meta.GA,
+ useCDN: config.usecdn
};
return renderPublishSlide(data, res);
}).catch(function (err) {
diff --git a/public/css/extra.css b/public/css/extra.css
index 1f39cffe..3ed7caa8 100644
--- a/public/css/extra.css
+++ b/public/css/extra.css
@@ -50,8 +50,7 @@
width: auto;
top: 50%;
left: 50%;
- margin-top: -40px;
- margin-left: -40px;
+ transform: translate(-50%, -50%);
color: white;
opacity: 0.3;
-webkit-transition: opacity 0.2s; /* Safari */
diff --git a/public/css/html.min.css b/public/css/html.min.css
index c2db103e..7edf912e 100644
--- a/public/css/html.min.css
+++ b/public/css/html.min.css
@@ -1 +1 @@
-.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.vimeo iframe,.youtube iframe,.youtube img{top:0;left:0;height:100%;position:absolute}.markdown-body{font-size:1pc;line-height:1.6;word-wrap:break-word}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .absent{color:#c00}.markdown-body .anchor{display:inline-block;padding-right:2px;margin-left:-18.36px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:1em;margin-bottom:1pc;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#000;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 code,.markdown-body h1 tt,.markdown-body h2 code,.markdown-body h2 tt,.markdown-body h3 code,.markdown-body h3 tt,.markdown-body h4 code,.markdown-body h4 tt,.markdown-body h5 code,.markdown-body h5 tt,.markdown-body h6 code,.markdown-body h6 tt{font-size:inherit}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor,.markdown-body h4 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h5 .anchor,.markdown-body h6 .anchor{line-height:1.1}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:1pc}.markdown-body hr{height:4px;padding:0;margin:1pc 0;background-color:#e7e7e7;border:0}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol.no-list,.markdown-body ul.no-list{padding:0;list-style-type:none}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:1pc}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:1pc;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 1pc;margin-bottom:1pc}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body .emoji{width:20px;height:20px;max-width:none;margin-bottom:0}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #ddd}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#333}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before,.markdown-body tt:after,.markdown-body tt:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:1pc}.markdown-body .highlight pre,.markdown-body pre{padding:1pc;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before,.markdown-body pre tt:after,.markdown-body pre tt:before{content:normal}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:9pt;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-line-num{padding:10px 8px 9px;text-align:right;background:#fff;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:700;background:#f8f8f8;border-top:0}.markdown-body kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.news .alert .markdown-body blockquote{padding:0 0 0 40px;border:0}.activity-tab .news .alert .commits,.activity-tab .news .markdown-body blockquote{padding-left:0}.task-list-item{list-style-type:none}.task-list-item label{font-weight:400}.task-list-item.enabled label{cursor:pointer}.task-list-item+.task-list-item{margin-top:3px}.task-list-item-checkbox{float:left;margin:.31em 0 .2em -1.3em!important;vertical-align:middle;cursor:default!important}.markdown-body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding-top:40px;padding-bottom:40px;max-width:758px;overflow:visible!important}.markdown-body pre{word-wrap:normal;border:inherit!important}.markdown-body code{color:inherit!important}.markdown-body pre code .wrapper{display:-webkit-inline-flex;display:-moz-inline-flex;display:-ms-inline-flex;display:-o-inline-flex;display:inline-flex}.markdown-body pre code .gutter{float:left;overflow:hidden;-webkit-user-select:none;user-select:none}.markdown-body pre code .gutter.linenumber{text-align:right;position:relative;display:inline-block;cursor:default;z-index:4;padding:0 8px 0 0;min-width:20px;box-sizing:content-box;color:#afafaf!important;border-right:3px solid #6ce26c!important}.markdown-body pre code .gutter.linenumber>span:before{content:attr(data-linenumber)}.markdown-body pre code .code{float:left;margin:0 0 0 1pc}.markdown-body .gist .line-numbers{border-left:none;border-top:none;border-bottom:none}.markdown-body .gist .line-data{border:none}.markdown-body .gist table{border-spacing:0;border-collapse:inherit!important}.markdown-body code[data-gist-id]{background:0 0;padding:0}.ui-user-icon,.vimeo,.youtube{background-position:center center;background-repeat:no-repeat;background-size:contain}.markdown-body code[data-gist-id]:after,.markdown-body code[data-gist-id]:before{content:''}.markdown-body[dir=rtl] pre{direction:ltr}.markdown-body[dir=rtl] code{direction:ltr;unicode-bidi:embed}.markdown-body .alert>p{margin-bottom:0}.markdown-body pre.flow-chart,.markdown-body pre.graphviz,.markdown-body pre.mermaid,.markdown-body pre.sequence-diagram{text-align:center;background-color:inherit;border-radius:0;white-space:inherit}.markdown-body pre.flow-chart>code,.markdown-body pre.graphviz>code,.markdown-body pre.mermaid>code,.markdown-body pre.sequence-diagram>code{text-align:left}.markdown-body pre.flow-chart>svg,.markdown-body pre.graphviz>svg,.markdown-body pre.mermaid>svg,.markdown-body pre.sequence-diagram>svg{max-width:100%;height:100%}.vimeo,.youtube{position:relative;cursor:pointer;display:table;width:100%;text-align:center;background-color:#000;overflow:hidden}.youtube{position:relative;width:100%;padding-bottom:56.25%}.vimeo img{width:100%;object-fit:contain;z-index:0}.youtube img{width:100%;object-fit:cover;z-index:0}.vimeo iframe,.youtube iframe{width:100%;vertical-align:middle;z-index:1}.vimeo .icon,.youtube .icon{position:absolute;height:auto;width:auto;top:50%;left:50%;margin-top:-40px;margin-left:-40px;color:#fff;opacity:.3;-webkit-transition:opacity .2s;transition:opacity .2s;z-index:0}.vimeo:hover .icon,.youtube:hover .icon{opacity:.6;-webkit-transition:opacity .2s;transition:opacity .2s}.slideshare .inner,.speakerdeck .inner{position:relative;width:100%}.slideshare .inner iframe,.speakerdeck .inner iframe{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.ui-infobar{max-width:758px;margin-top:25px;margin-bottom:-25px;color:#777}.ui-toc{position:fixed;bottom:20px;z-index:10000}.ui-toc-label{opacity:.3;background-color:#ccc;border:none;-webkit-transition:opacity .2s;transition:opacity .2s}.ui-toc .open .ui-toc-label{opacity:1;color:#fff;-webkit-transition:opacity .2s;transition:opacity .2s}.ui-toc-label:focus{opacity:.3;background-color:#ccc;color:#000}.ui-toc-label:hover{opacity:1;background-color:#ccc;-webkit-transition:opacity .2s;transition:opacity .2s}.ui-toc-dropdown{margin-top:23px;margin-bottom:20px;padding-left:10px;padding-right:10px;max-width:45vw;width:25vw;max-height:65vh;overflow:auto;text-align:inherit}.ui-toc-dropdown[dir=rtl] .nav{padding-right:0;letter-spacing:.0029em}.ui-toc-dropdown a{overflow:hidden;text-overflow:ellipsis;white-space:pre}.ui-toc-dropdown .nav>li>a{display:block;padding:4px 20px;font-size:13px;font-weight:500;color:#767676}.ui-toc-dropdown .nav>li>a:focus,.ui-toc-dropdown .nav>li>a:hover{padding-left:19px;color:#000;text-decoration:none;background-color:transparent;border-left:1px solid #000}.ui-toc-dropdown[dir=rtl] .nav>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav>li>a:hover{padding-right:19px;border-left:none;border-right:1px solid #000}.ui-toc-dropdown .nav>.active:focus>a,.ui-toc-dropdown .nav>.active:hover>a,.ui-toc-dropdown .nav>.active>a{padding-left:18px;font-weight:700;color:#000;background-color:transparent;border-left:2px solid #000}.ui-toc-dropdown[dir=rtl] .nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav>.active>a{padding-right:18px;border-left:none;border-right:2px solid #000}.ui-toc-dropdown .nav .nav{display:none;padding-bottom:10px}.ui-toc-dropdown .nav>.active>ul,.ui-user-icon{display:block}.ui-toc-dropdown .nav .nav>li>a{padding-top:1px;padding-bottom:1px;padding-left:30px;font-size:9pt;font-weight:400}.ui-toc-dropdown[dir=rtl] .nav .nav>li>a{padding-right:30px}.ui-toc-dropdown .nav .nav>li>ul>li>a{padding-top:1px;padding-bottom:1px;padding-left:40px;font-size:9pt;font-weight:400}.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a{padding-right:40px}.ui-toc-dropdown .nav .nav>li>a:focus,.ui-toc-dropdown .nav .nav>li>a:hover{padding-left:29px}.ui-toc-dropdown[dir=rtl] .nav .nav>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav .nav>li>a:hover{padding-right:29px}.ui-toc-dropdown .nav .nav>li>ul>li>a:focus,.ui-toc-dropdown .nav .nav>li>ul>li>a:hover{padding-left:39px}.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a:hover{padding-right:39px}.ui-toc-dropdown .nav .nav>.active:focus>a,.ui-toc-dropdown .nav .nav>.active:hover>a,.ui-toc-dropdown .nav .nav>.active>a{padding-left:28px;font-weight:500}.ui-toc-dropdown[dir=rtl] .nav .nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>a{padding-right:28px}.ui-toc-dropdown .nav .nav>.active>.nav>.active:focus>a,.ui-toc-dropdown .nav .nav>.active>.nav>.active:hover>a,.ui-toc-dropdown .nav .nav>.active>.nav>.active>a{padding-left:38px;font-weight:500}.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active>a{padding-right:38px}.markdown-body[lang^=ja]{font-family:"Helvetica Neue",Helvetica,Arial,Meiryo,"MS Gothic","MS ゴシック",sans-serif}.ui-toc-dropdown[lang^=ja]{font-family:"Source Sans Pro",Helvetica,Arial,"Meiryo UI","MS PGothic","MS Pゴシック",sans-serif}.markdown-body[lang=zh-tw]{font-family:"Helvetica Neue",Helvetica,Arial,"Microsoft JhengHei","微軟正黑",sans-serif}.ui-toc-dropdown[lang=zh-tw]{font-family:"Source Sans Pro",Helvetica,Arial,"Microsoft JhengHei UI","微軟正黑UI",sans-serif}.markdown-body[lang=zh-cn]{font-family:"Helvetica Neue",Helvetica,Arial,"Microsoft YaHei","微软雅黑",sans-serif}.ui-toc-dropdown[lang=zh-cn]{font-family:"Source Sans Pro",Helvetica,Arial,"Microsoft YaHei UI","微软雅黑UI",sans-serif}.ui-affix-toc{position:fixed;top:0;max-width:15vw;max-height:70vh;overflow:auto}.back-to-top,.go-to-bottom{display:block;padding:4px 10px;margin-top:10px;margin-left:10px;font-size:9pt;font-weight:500;color:#999}.back-to-top:focus,.back-to-top:hover,.go-to-bottom:focus,.go-to-bottom:hover{color:#563d7c;text-decoration:none}.go-to-bottom{margin-top:0}.ui-user-icon{width:20px;height:20px;border-radius:3px;margin-top:2px;margin-bottom:2px;margin-right:5px}.ui-user-icon.small,small .dropdown{display:inline-block}.ui-user-icon.small{width:18px;height:18px;vertical-align:middle;margin:0 0 .2em}small span{line-height:22px}small .dropdown a:focus,small .dropdown a:hover{text-decoration:none}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}@media print{blockquote,div,img,pre,table{page-break-inside:avoid!important}a[href]:after{font-size:9pt!important}}body{font-smoothing:subpixel-antialiased!important;-webkit-font-smoothing:subpixel-antialiased!important;-moz-osx-font-smoothing:auto!important;text-shadow:1px 1px 1px rgba(0,0,0,.004);-webkit-overflow-scrolling:touch;font-family:"Source Sans Pro",Helvetica,Arial,sans-serif;letter-spacing:.025em}:focus{outline:0!important}::-moz-focus-inner{border:0!important}body.modal-open{overflow-y:auto;padding-right:0!important} \ No newline at end of file
+.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.vimeo iframe,.youtube iframe,.youtube img{top:0;left:0;height:100%;position:absolute}.markdown-body{font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .absent{color:#c00}.markdown-body .anchor{display:inline-block;padding-right:2px;margin-left:-18.36px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#000;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 code,.markdown-body h1 tt,.markdown-body h2 code,.markdown-body h2 tt,.markdown-body h3 code,.markdown-body h3 tt,.markdown-body h4 code,.markdown-body h4 tt,.markdown-body h5 code,.markdown-body h5 tt,.markdown-body h6 code,.markdown-body h6 tt{font-size:inherit}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor,.markdown-body h4 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h5 .anchor,.markdown-body h6 .anchor{line-height:1.1}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body hr{height:4px;padding:0;margin:16px 0;background-color:#e7e7e7;border:0}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol.no-list,.markdown-body ul.no-list{padding:0;list-style-type:none}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body .emoji{width:20px;height:20px;max-width:none;margin-bottom:0}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid #ddd}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:#333}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before,.markdown-body tt:after,.markdown-body tt:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code,.markdown-body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before,.markdown-body pre tt:after,.markdown-body pre tt:before{content:normal}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-line-num{padding:10px 8px 9px;text-align:right;background:#fff;border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:700;background:#f8f8f8;border-top:0}.markdown-body kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.news .alert .markdown-body blockquote{padding:0 0 0 40px;border:0}.activity-tab .news .alert .commits,.activity-tab .news .markdown-body blockquote{padding-left:0}.task-list-item{list-style-type:none}.task-list-item label{font-weight:400}.task-list-item.enabled label{cursor:pointer}.task-list-item+.task-list-item{margin-top:3px}.task-list-item-checkbox{float:left;margin:.31em 0 .2em -1.3em!important;vertical-align:middle;cursor:default!important}.markdown-body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding-top:40px;padding-bottom:40px;max-width:758px;overflow:visible!important}.markdown-body pre{word-wrap:normal;border:inherit!important}.markdown-body code{color:inherit!important}.markdown-body pre code .wrapper{display:-webkit-inline-flex;display:-moz-inline-flex;display:-ms-inline-flex;display:-o-inline-flex;display:inline-flex}.markdown-body pre code .gutter{float:left;overflow:hidden;-webkit-user-select:none;user-select:none}.markdown-body pre code .gutter.linenumber{text-align:right;position:relative;display:inline-block;cursor:default;z-index:4;padding:0 8px 0 0;min-width:20px;box-sizing:content-box;color:#afafaf!important;border-right:3px solid #6ce26c!important}.markdown-body pre code .gutter.linenumber>span:before{content:attr(data-linenumber)}.markdown-body pre code .code{float:left;margin:0 0 0 16px}.markdown-body .gist .line-numbers{border-left:none;border-top:none;border-bottom:none}.markdown-body .gist .line-data{border:none}.markdown-body .gist table{border-spacing:0;border-collapse:inherit!important}.markdown-body code[data-gist-id]{background:0 0;padding:0}.ui-user-icon,.vimeo,.youtube{background-position:center center;background-repeat:no-repeat;background-size:contain}.markdown-body code[data-gist-id]:after,.markdown-body code[data-gist-id]:before{content:''}.markdown-body[dir=rtl] pre{direction:ltr}.markdown-body[dir=rtl] code{direction:ltr;unicode-bidi:embed}.markdown-body .alert>p{margin-bottom:0}.markdown-body pre.flow-chart,.markdown-body pre.graphviz,.markdown-body pre.mermaid,.markdown-body pre.sequence-diagram{text-align:center;background-color:inherit;border-radius:0;white-space:inherit}.markdown-body pre.flow-chart>code,.markdown-body pre.graphviz>code,.markdown-body pre.mermaid>code,.markdown-body pre.sequence-diagram>code{text-align:left}.markdown-body pre.flow-chart>svg,.markdown-body pre.graphviz>svg,.markdown-body pre.mermaid>svg,.markdown-body pre.sequence-diagram>svg{max-width:100%;height:100%}.vimeo,.youtube{position:relative;cursor:pointer;display:table;width:100%;text-align:center;background-color:#000;overflow:hidden}.youtube{position:relative;width:100%;padding-bottom:56.25%}.vimeo img{width:100%;object-fit:contain;z-index:0}.youtube img{width:100%;object-fit:cover;z-index:0}.vimeo iframe,.youtube iframe{width:100%;vertical-align:middle;z-index:1}.vimeo .icon,.youtube .icon{position:absolute;height:auto;width:auto;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;opacity:.3;-webkit-transition:opacity .2s;transition:opacity .2s;z-index:0}.vimeo:hover .icon,.youtube:hover .icon{opacity:.6;-webkit-transition:opacity .2s;transition:opacity .2s}.slideshare .inner,.speakerdeck .inner{position:relative;width:100%}.slideshare .inner iframe,.speakerdeck .inner iframe{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.ui-infobar{max-width:758px;margin-top:25px;margin-bottom:-25px;color:#777}.ui-toc{position:fixed;bottom:20px;z-index:10000}.ui-toc-label{opacity:.3;background-color:#ccc;border:none;-webkit-transition:opacity .2s;transition:opacity .2s}.ui-toc .open .ui-toc-label{opacity:1;color:#fff;-webkit-transition:opacity .2s;transition:opacity .2s}.ui-toc-label:focus{opacity:.3;background-color:#ccc;color:#000}.ui-toc-label:hover{opacity:1;background-color:#ccc;-webkit-transition:opacity .2s;transition:opacity .2s}.ui-toc-dropdown{margin-top:23px;margin-bottom:20px;padding-left:10px;padding-right:10px;max-width:45vw;width:25vw;max-height:65vh;overflow:auto;text-align:inherit}.ui-toc-dropdown[dir=rtl] .nav{padding-right:0;letter-spacing:.0029em}.ui-toc-dropdown a{overflow:hidden;text-overflow:ellipsis;white-space:pre}.ui-toc-dropdown .nav>li>a{display:block;padding:4px 20px;font-size:13px;font-weight:500;color:#767676}.ui-toc-dropdown .nav>li>a:focus,.ui-toc-dropdown .nav>li>a:hover{padding-left:19px;color:#000;text-decoration:none;background-color:transparent;border-left:1px solid #000}.ui-toc-dropdown[dir=rtl] .nav>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav>li>a:hover{padding-right:19px;border-left:none;border-right:1px solid #000}.ui-toc-dropdown .nav>.active:focus>a,.ui-toc-dropdown .nav>.active:hover>a,.ui-toc-dropdown .nav>.active>a{padding-left:18px;font-weight:700;color:#000;background-color:transparent;border-left:2px solid #000}.ui-toc-dropdown[dir=rtl] .nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav>.active>a{padding-right:18px;border-left:none;border-right:2px solid #000}.ui-toc-dropdown .nav .nav{display:none;padding-bottom:10px}.ui-toc-dropdown .nav>.active>ul,.ui-user-icon{display:block}.ui-toc-dropdown .nav .nav>li>a{padding-top:1px;padding-bottom:1px;padding-left:30px;font-size:12px;font-weight:400}.ui-toc-dropdown[dir=rtl] .nav .nav>li>a{padding-right:30px}.ui-toc-dropdown .nav .nav>li>ul>li>a{padding-top:1px;padding-bottom:1px;padding-left:40px;font-size:12px;font-weight:400}.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a{padding-right:40px}.ui-toc-dropdown .nav .nav>li>a:focus,.ui-toc-dropdown .nav .nav>li>a:hover{padding-left:29px}.ui-toc-dropdown[dir=rtl] .nav .nav>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav .nav>li>a:hover{padding-right:29px}.ui-toc-dropdown .nav .nav>li>ul>li>a:focus,.ui-toc-dropdown .nav .nav>li>ul>li>a:hover{padding-left:39px}.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a:focus,.ui-toc-dropdown[dir=rtl] .nav .nav>li>ul>li>a:hover{padding-right:39px}.ui-toc-dropdown .nav .nav>.active:focus>a,.ui-toc-dropdown .nav .nav>.active:hover>a,.ui-toc-dropdown .nav .nav>.active>a{padding-left:28px;font-weight:500}.ui-toc-dropdown[dir=rtl] .nav .nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>a{padding-right:28px}.ui-toc-dropdown .nav .nav>.active>.nav>.active:focus>a,.ui-toc-dropdown .nav .nav>.active>.nav>.active:hover>a,.ui-toc-dropdown .nav .nav>.active>.nav>.active>a{padding-left:38px;font-weight:500}.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active:focus>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active:hover>a,.ui-toc-dropdown[dir=rtl] .nav .nav>.active>.nav>.active>a{padding-right:38px}.markdown-body[lang^=ja]{font-family:"Helvetica Neue",Helvetica,Arial,Meiryo,"MS Gothic","MS ゴシック",sans-serif}.ui-toc-dropdown[lang^=ja]{font-family:"Source Sans Pro",Helvetica,Arial,"Meiryo UI","MS PGothic","MS Pゴシック",sans-serif}.markdown-body[lang=zh-tw]{font-family:"Helvetica Neue",Helvetica,Arial,"Microsoft JhengHei","微軟正黑",sans-serif}.ui-toc-dropdown[lang=zh-tw]{font-family:"Source Sans Pro",Helvetica,Arial,"Microsoft JhengHei UI","微軟正黑UI",sans-serif}.markdown-body[lang=zh-cn]{font-family:"Helvetica Neue",Helvetica,Arial,"Microsoft YaHei","微软雅黑",sans-serif}.ui-toc-dropdown[lang=zh-cn]{font-family:"Source Sans Pro",Helvetica,Arial,"Microsoft YaHei UI","微软雅黑UI",sans-serif}.ui-affix-toc{position:fixed;top:0;max-width:15vw;max-height:70vh;overflow:auto}.back-to-top,.go-to-bottom{display:block;padding:4px 10px;margin-top:10px;margin-left:10px;font-size:12px;font-weight:500;color:#999}.back-to-top:focus,.back-to-top:hover,.go-to-bottom:focus,.go-to-bottom:hover{color:#563d7c;text-decoration:none}.go-to-bottom{margin-top:0}.ui-user-icon{width:20px;height:20px;border-radius:3px;margin-top:2px;margin-bottom:2px;margin-right:5px}.ui-user-icon.small,small .dropdown{display:inline-block}.ui-user-icon.small{width:18px;height:18px;vertical-align:middle;margin:0 0 .2em}small span{line-height:22px}small .dropdown a:focus,small .dropdown a:hover{text-decoration:none}.unselectable{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}@media print{blockquote,div,img,pre,table{page-break-inside:avoid!important}a[href]:after{font-size:12px!important}}body{font-smoothing:subpixel-antialiased!important;-webkit-font-smoothing:subpixel-antialiased!important;-moz-osx-font-smoothing:auto!important;text-shadow:1px 1px 1px rgba(0,0,0,.004);-webkit-overflow-scrolling:touch;font-family:"Source Sans Pro",Helvetica,Arial,sans-serif;letter-spacing:.025em}:focus{outline:0!important}::-moz-focus-inner{border:0!important}body.modal-open{overflow-y:auto;padding-right:0!important} \ No newline at end of file
diff --git a/public/css/slide.css b/public/css/slide.css
index 08374182..dde26539 100644
--- a/public/css/slide.css
+++ b/public/css/slide.css
@@ -6,7 +6,9 @@
.reveal h5,
.reveal h6 {
font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft JhengHei", Meiryo, "MS ゴシック", "MS Gothic", sans-serif;
+ text-transform: none;
}
+
.reveal pre,
.reveal code {
font-family: "Source Code Pro", Consolas, monaco, "Microsoft JhengHei", Meiryo, "MS ゴシック", "MS Gothic", monospace;
@@ -14,3 +16,231 @@
line-height: 1.25;
-webkit-overflow-scrolling: touch;
}
+
+.vimeo,
+.youtube {
+ position: relative !important;
+ cursor: pointer;
+ display: table;
+ width: 100% !important;
+ text-align: center;
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: contain;
+ background-color: black;
+ overflow: hidden;
+ font-size: 24px !important;
+}
+
+
+/* youtube always use 16:9 aspect ratio video */
+
+.vimeo,
+.youtube {
+ position: relative;
+ width: 100%;
+ padding-bottom: 56.25% !important;
+}
+
+.vimeo > img,
+.youtube > img {
+ max-width: 100%;
+ max-height: 100%;
+ margin: 0 !important;
+ border: 0 !important;
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 0;
+}
+
+.vimeo > iframe,
+.youtube > iframe {
+ max-width: 100%;
+ max-height: 100%;
+}
+
+.slideshare .inner,
+.speakerdeck .inner {
+ padding-bottom: 62% !important;
+}
+
+.pdfobject {
+ height: 85vh !important;
+}
+
+.task-list-item-checkbox {
+ font-size: inherit;
+ height: 1em;
+ margin: 0.2em 0 0.2em -0.65em !important;
+}
+
+pre code .wrapper {
+ display: -webkit-inline-flex;
+ display: -moz-inline-flex;
+ display: -ms-inline-flex;
+ display: -o-inline-flex;
+ display: inline-flex;
+}
+
+pre code .gutter {
+ float: left;
+ overflow: hidden;
+ -webkit-user-select: none;
+ user-select: none;
+}
+
+pre code .gutter.linenumber {
+ text-align: right;
+ position: relative;
+ display: inline-block;
+ cursor: default;
+ z-index: 4;
+ padding: 0 8px 0 0;
+ min-width: 20px;
+ box-sizing: content-box;
+ color: #afafaf !important;
+ border-right: 3px solid #6ce26c !important;
+}
+
+pre code .gutter.linenumber > span:before {
+ content: attr(data-linenumber);
+}
+
+pre code .code {
+ float: left;
+ margin: 0 0 0 16px;
+}
+
+.gist .line-numbers {
+ border-left: none;
+ border-top: none;
+ border-bottom: none;
+}
+
+.gist .line-data {
+ border: none;
+}
+
+.gist table {
+ border-spacing: 0;
+ border-collapse: inherit !important;
+}
+
+code[data-gist-id] {
+ background: none;
+ padding: 0;
+}
+
+code[data-gist-id]:before {
+ content: ''
+}
+
+code[data-gist-id]:after {
+ content: ''
+}
+
+.alert {
+ border-radius: 4px;
+}
+
+.alert h4 {
+ margin-top: 0;
+ color: inherit;
+}
+
+.alert > p {
+ padding: 5px !important;
+}
+
+.alert-success {
+ color: #3c763d;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+
+.alert-success hr {
+ border-top-color: #c9e2b3;
+}
+
+.alert-success .alert-link {
+ color: #2b542c;
+}
+
+.alert-info {
+ color: #31708f;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+
+.alert-info hr {
+ border-top-color: #a6e1ec;
+}
+
+.alert-info .alert-link {
+ color: #245269;
+}
+
+.alert-warning {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+
+.alert-warning hr {
+ border-top-color: #f7e1b5;
+}
+
+.alert-warning .alert-link {
+ color: #66512c;
+}
+
+.alert-danger {
+ color: #a94442;
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+
+.alert-danger hr {
+ border-top-color: #e4b9c0;
+}
+
+.alert-danger .alert-link {
+ color: #843534;
+}
+
+pre.flow-chart,
+pre.sequence-diagram,
+pre.graphviz,
+pre.mermaid {
+ text-align: center;
+ background-color: white;
+ border-radius: 0;
+ white-space: inherit;
+}
+
+pre.flow-chart > code,
+pre.sequence-diagram > code,
+pre.graphviz > code,
+pre.mermaid > code {
+ text-align: left;
+}
+
+pre.flow-chart > svg,
+pre.sequence-diagram > svg,
+pre.graphviz > svg,
+pre.mermaid > svg {
+ max-width: 100%;
+ height: 100%;
+}
+
+.emoji {
+ margin: 0 !important;
+ background: transparent !important;
+ border: none !important;
+ box-shadow: none !important;
+ margin-bottom: -.25em !important;
+} \ No newline at end of file
diff --git a/public/js/reveal-markdown.js b/public/js/reveal-markdown.js
index a3f2505a..ca22e09c 100755
--- a/public/js/reveal-markdown.js
+++ b/public/js/reveal-markdown.js
@@ -5,27 +5,15 @@
*/
(function( root, factory ) {
if( typeof exports === 'object' ) {
- module.exports = factory( require( './marked' ) );
+ module.exports = factory();
}
else {
// Browser globals (root is window)
- root.RevealMarkdown = factory( root.marked );
+ root.RevealMarkdown = factory();
root.RevealMarkdown.initialize();
}
-}( this, function( marked ) {
-
- if( typeof marked === 'undefined' ) {
- throw 'The reveal.js Markdown plugin requires marked to be loaded';
- }
-
- if( typeof hljs !== 'undefined' ) {
- marked.setOptions({
- highlight: function( lang, code ) {
- return hljs.highlightAuto( lang, code ).value;
- }
- });
- }
-
+}( this, function() {
+
var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$',
DEFAULT_NOTES_SEPARATOR = 'note:',
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$',
@@ -364,10 +352,10 @@
var notes = section.querySelector( 'aside.notes' );
var markdown = getMarkdownFromSlide( section );
- var rendered = marked( markdown );
- rendered = preventXSS(rendered);
-
- section.innerHTML = rendered;
+ var rendered = md.render(markdown);
+ rendered = preventXSS(rendered);
+ var result = postProcess(rendered);
+ section.innerHTML = result[0].outerHTML;
addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) ||
section.parentNode.getAttribute( 'data-element-attributes' ) ||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR,
diff --git a/public/js/slide.js b/public/js/slide.js
new file mode 100644
index 00000000..f5f8a14d
--- /dev/null
+++ b/public/js/slide.js
@@ -0,0 +1,65 @@
+var body = $(".slides").html();
+$(".slides").html(S(body).unescapeHTML().s);
+
+function extend() {
+ var target = {};
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i];
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ return target;
+}
+
+// Optional libraries used to extend on reveal.js
+var deps = [{
+ src: serverurl + '/vendor/reveal.js/lib/js/classList.js',
+ condition: function() {
+ return !document.body.classList;
+ }
+}, {
+ src: serverurl + '/js/reveal-markdown.js',
+ condition: function() {
+ return !!document.querySelector('[data-markdown]');
+ }
+}, {
+ src: serverurl + '/vendor/reveal.js/plugin/notes/notes.js',
+ async: true,
+ condition: function() {
+ return !!document.body.classList;
+ }
+}];
+
+// default options to init reveal.js
+var defaultOptions = {
+ controls: true,
+ progress: true,
+ slideNumber: true,
+ history: true,
+ center: true,
+ transition: 'none',
+ dependencies: deps
+};
+
+// options from URL query string
+var queryOptions = Reveal.getQueryHash() || {};
+
+var options = extend(defaultOptions, queryOptions);
+Reveal.initialize(options);
+
+viewAjaxCallback = function () {
+ Reveal.layout();
+};
+
+function renderSlide() {
+ var title = document.title;
+ finishView($(event.currentSlide));
+ document.title = title;
+ Reveal.layout();
+}
+
+Reveal.addEventListener('ready', renderSlide);
+Reveal.addEventListener('slidechanged', renderSlide); \ No newline at end of file
diff --git a/public/views/slide.ejs b/public/views/slide.ejs
index 3fe30944..04d75b5e 100644
--- a/public/views/slide.ejs
+++ b/public/views/slide.ejs
@@ -14,11 +14,28 @@
<title><%- title %></title>
<link rel="icon" type="image/png" href="<%- url %>/favicon.png">
<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
-
+ <% if(useCDN) { %>
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/ionicons/2.0.1/css/ionicons.min.css">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css">
+ <% } else { %>
+ <link rel="stylesheet" href='<%- url %>/vendor/font-awesome/css/font-awesome.min.css'>
+ <link rel="stylesheet" href="<%- url %>/vendor/Ionicons/css/ionicons.min.css">
+ <link rel="stylesheet" href="<%- url %>/vendor/octicons/octicons/octicons.css">
+ <% } %>
+
<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/css/reveal.css">
- <link rel="stylesheet" href="<%- url %>/vendor/reveal.js/<%- theme %>" id="theme">
+ <link rel="stylesheet" href="<%- url %>/vendor/reveal.js/css/theme/black.css" id="theme">
+
<!-- For syntax highlighting -->
- <link rel="stylesheet" href="<%- url %>/vendor/reveal.js/lib/css/<%- highlightTheme %>.css">
+ <link rel="stylesheet" href="<%- url %>/vendor/reveal.js/lib/css/zenburn.css">
+
+ <link rel="stylesheet" href='<%- url %>/css/github-extract.css'>
+ <link rel="stylesheet" href='<%- url %>/css/gist.css'>
+ <link rel="stylesheet" href="<%- url %>/css/mermaid.css">
+ <link rel="stylesheet" href='<%- url %>/css/markdown.css'>
+ <link rel="stylesheet" href='<%- url %>/vendor/emojify/css/emojify.min.css'>
+ <link rel="stylesheet" href='<%- url %>/css/extra.css'>
<link rel="stylesheet" href="<%- url %>/css/site.css">
<link rel="stylesheet" href="<%- url %>/css/slide.css">
@@ -26,8 +43,6 @@
<script>
document.write( '<link rel="stylesheet" href="<%- url %>/vendor/reveal.js/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</script>
- <script src="<%- url %>/vendor/jquery/dist/jquery.min.js"></script>
- <script src="<%- url %>/vendor/velocity/velocity.min.js"></script>
</head>
<body>
@@ -35,58 +50,56 @@
<div class="slides"><%- slides %></div>
</div>
+ <script type="text/x-mathjax-config">
+ MathJax.Hub.Config({ messageStyle: "none", skipStartupTypeset: true ,tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true }});
+ </script>
+ <% if(useCDN) { %>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
+ <script src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.min.js" defer></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.6.1/js-yaml.min.js" defer></script>
+ <script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment-with-locales.min.js" defer></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/6.0.0/mermaid.min.js" defer></script>
+ <% } else { %>
+ <script src="<%- url %>/vendor/jquery/dist/jquery.min.js"></script>
+ <script src="<%- url %>/vendor/velocity/velocity.min.js" defer></script>
+ <script src="<%- url %>/vendor/js-yaml/dist/js-yaml.min.js" defer></script>
+ <script type="text/javascript" src="<%- url %>/vendor/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
+ <script src="<%- url %>/vendor/moment/min/moment-with-locales.js" defer></script>
+ <script src="<%- url %>/vendor/mermaid/dist/mermaid.min.js" defer></script>
+ <% } %>
<script src="<%- url %>/vendor/reveal.js/lib/js/head.min.js"></script>
<script src="<%- url %>/vendor/reveal.js/js/reveal.js"></script>
- <script src="<%- url %>/vendor/string/dist/string.min.js"></script>
- <script src="<%- url %>/vendor/xss/dist/xss.min.js"></script>
- <script src="<%- url %>/js/render.js"></script>
-
- <script>
- if (typeof mixpanel !== 'undefined') mixpanel.track("enter slide");
-
- var body = $(".slides").html();
- $(".slides").html(S(body).unescapeHTML().s);
-
- function extend() {
- var target = {};
- for (var i = 0; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (source.hasOwnProperty(key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- }
-
- // Optional libraries used to extend on reveal.js
- var deps = [
- { src: '<%- url %>/vendor/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
- { src: '<%- url %>/vendor/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector('[data-markdown]'); } },
- { src: '<%- url %>/js/reveal-markdown.js', condition: function() { return !!document.querySelector('[data-markdown]'); } },
- { src: '<%- url %>/vendor/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
- { src: '<%- url %>/vendor/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },
- { src: '<%- url %>/vendor/reveal.js/plugin/math/math.js', async: true }
- ];
-
- // default options to init reveal.js
- var defaultOptions = {
- controls: true,
- progress: true,
- history: true,
- center: true,
- transition: 'slide',
- dependencies: deps
- };
-
- // options from URL query string
- var queryOptions = Reveal.getQueryHash() || {};
-
- var options = <%- options %>;
- options = extend(defaultOptions, options, queryOptions);
- Reveal.initialize(options);
- </script>
+ <script src="<%- url %>/vendor/xss/dist/xss.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it/dist/markdown-it.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-abbr/dist/markdown-it-abbr.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-footnote/dist/markdown-it-footnote.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-deflist/dist/markdown-it-deflist.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-mark/dist/markdown-it-mark.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-ins/dist/markdown-it-ins.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-sub/dist/markdown-it-sub.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-sup/dist/markdown-it-sup.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-container/dist/markdown-it-container.min.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-mathjax.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-regexp.js" defer></script>
+ <script src="<%- url %>/vendor/markdown-it-imsize.js" defer></script>
+ <script src="<%- url %>/vendor/gist-embed.min.js" defer></script>
+ <script src="<%- url %>/vendor/string/dist/string.min.js" defer></script>
+ <script src="<%- url %>/vendor/highlightjs/highlight.pack.min.js" defer></script>
+ <script src="<%- url %>/vendor/js-cookie/src/js.cookie.js" defer></script>
+ <script src="<%- url %>/vendor/emojify/js/emojify.min.js" defer></script>
+ <script src="<%- url %>/vendor/raphael/raphael.min.js" defer></script>
+ <script src="<%- url %>/vendor/lodash/dist/lodash.min.js" defer></script>
+ <script src="<%- url %>/vendor/sequence-diagrams/sequence-diagram-min.js" defer></script>
+ <script src="<%- url %>/vendor/flowchart/release/flowchart.min.js" defer></script>
+ <script src="<%- url %>/vendor/viz.js/viz.js" defer></script>
+ <script src="<%- url %>/vendor/pdfobject/pdfobject.min.js" defer></script>
+ <script src="<%- url %>/vendor/md-toc.js" defer></script>
+ <script src="<%- url %>/js/common.js" defer></script>
+ <script src="<%- url %>/js/extra.js" defer></script>
+ <script src="<%- url %>/js/render.js" defer></script>
+ <script src="<%- url %>/js/slide.js" defer></script>
+
</body>
</html>