diff options
author | Wu Cheng-Han | 2015-12-18 09:40:52 -0600 |
---|---|---|
committer | Wu Cheng-Han | 2015-12-18 09:40:52 -0600 |
commit | 031c96c72d168a23cca0c609f46e019eced8bc64 (patch) | |
tree | 6e10c7dd5c10294aa7230d11626f4f0004b78f91 /public | |
parent | 54b33f181f70786a2df624061e7a2ffb93a3eb73 (diff) |
Updated slide mode
Diffstat (limited to '')
-rw-r--r-- | public/js/index.js | 11 | ||||
-rw-r--r-- | public/views/header.ejs | 23 | ||||
-rw-r--r-- | public/views/slide/listing.hbs (renamed from public/views/templates/listing.html) | 0 | ||||
-rw-r--r-- | public/views/slide/reveal.hbs (renamed from public/views/templates/reveal.html) | 12 |
4 files changed, 32 insertions, 14 deletions
diff --git a/public/js/index.js b/public/js/index.js index 4706d210..88410749 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -283,7 +283,6 @@ var ui = { shortStatus: $(".ui-short-status"), status: $(".ui-status"), new: $(".ui-new"), - slide: $(".ui-slide"), publish: $(".ui-publish"), download: { markdown: $(".ui-download-markdown"), @@ -296,6 +295,10 @@ var ui = { dropbox: $(".ui-import-dropbox"), clipboard: $(".ui-import-clipboard") }, + beta: { + pdf: $(".ui-beta-pdf"), + slide: $(".ui-beta-slide") + }, mode: $(".ui-mode"), edit: $(".ui-edit"), view: $(".ui-view"), @@ -793,7 +796,6 @@ function closestIndex(arr, closestTo) { var url = window.location.protocol + '//' + window.location.host + window.location.pathname; //share ui.toolbar.publish.attr("href", url + "/publish"); -ui.toolbar.slide.attr("href", url + "/slide"); //download //markdown ui.toolbar.download.markdown.click(function () { @@ -853,6 +855,11 @@ ui.toolbar.uploadImage.bind('change', function (e) { ui.toc.dropdown.click(function (e) { e.stopPropagation(); }); +//beta +//pdf +ui.toolbar.beta.pdf.attr("download", "").attr("href", url + "/pdf"); +//slide +ui.toolbar.beta.slide.attr("href", url + "/slide"); function scrollToTop() { if (currentMode == modeType.both) { diff --git a/public/views/header.ejs b/public/views/header.ejs index 47246a1d..c98202c0 100644 --- a/public/views/header.ejs +++ b/public/views/header.ejs @@ -21,14 +21,18 @@ <a data-target="#" data-toggle="dropdown" class="btn btn-link"> <i class="fa fa-caret-down"></i> </a> - <ul class="dropdown-menu" role="menu" aria-labelledby="menu"> + <ul class="dropdown-menu list" role="menu" aria-labelledby="menu"> <li role="presentation"><a role="menuitem" class="ui-new" tabindex="-1" href="./new" target="_blank"><i class="fa fa-plus fa-fw"></i> New</a> </li> - <li role="presentation"><a role="menuitem" class="ui-slide" tabindex="-1" href="#" target="_blank"><i class="fa fa-television fa-fw"></i> Slides</a> - </li> <li role="presentation"><a role="menuitem" class="ui-publish" tabindex="-1" href="#" target="_blank"><i class="fa fa-print fa-fw"></i> Publish</a> </li> <li class="divider"></li> + <li class="dropdown-header">Beta</li> + <li role="presentation"><a role="menuitem" class="ui-beta-pdf" tabindex="-1" href="#" target="_self"><i class="fa fa-file-pdf-o fa-fw"></i> Export PDF</a> + </li> + <li role="presentation"><a role="menuitem" class="ui-beta-slide" tabindex="-1" href="#" target="_blank"><i class="fa fa-tv fa-fw"></i> Slide Mode</a> + </li> + <li class="divider"></li> <li class="dropdown-header">Export</li> <li role="presentation"><a role="menuitem" class="ui-save-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a> </li> @@ -89,11 +93,6 @@ </a> </li> <li> - <a href="#" target="_blank" class="ui-slide"> - <i class="fa fa-television"></i> Slide - </a> - </li> - <li> <a href="#" target="_blank" class="ui-publish"> <i class="fa fa-print"></i> Publish </a> @@ -103,6 +102,12 @@ Menu <i class="fa fa-caret-down"></i> </a> <ul class="dropdown-menu" role="menu" aria-labelledby="menu"> + <li class="dropdown-header">Beta</li> + <li role="presentation"><a role="menuitem" class="ui-beta-pdf" tabindex="-1" href="#" target="_self"><i class="fa fa-file-pdf-o fa-fw"></i> Export PDF</a> + </li> + <li role="presentation"><a role="menuitem" class="ui-beta-slide" tabindex="-1" href="#" target="_blank"><i class="fa fa-tv fa-fw"></i> Slide Mode</a> + </li> + <li class="divider"></li> <li class="dropdown-header">Export</li> <li role="presentation"><a role="menuitem" class="ui-save-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a> </li> @@ -123,4 +128,4 @@ </ul> </div> </nav> -<div class="ui-spinner unselectable hidden-print"></div> +<div class="ui-spinner unselectable hidden-print"></div>
\ No newline at end of file diff --git a/public/views/templates/listing.html b/public/views/slide/listing.hbs index 371f4ac3..371f4ac3 100644 --- a/public/views/templates/listing.html +++ b/public/views/slide/listing.hbs diff --git a/public/views/templates/reveal.html b/public/views/slide/reveal.hbs index 04b8c9fc..876a7ba3 100644 --- a/public/views/templates/reveal.html +++ b/public/views/slide/reveal.hbs @@ -2,7 +2,13 @@ <html lang="en"> <head> <meta charset="utf-8"> - <title>Reveal.js</title> + <meta name="apple-mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-status-bar-style" content="black"> + <meta name="mobile-web-app-capable" content="yes"> + <title>{{title}}</title> + <link rel="icon" type="image/png" href="https://hackmd.io/favicon.png"> + <link rel="apple-touch-icon" href="https://hackmd.io/apple-touch-icon.png"> + <link rel="stylesheet" href="/vendor/reveal.js/css/reveal.css"> <link rel="stylesheet" href="/vendor/reveal.js/{{{theme}}}" id="theme"> <!-- For syntax highlighting --> @@ -19,7 +25,7 @@ <div class="reveal"> <div class="slides">{{{slides}}}</div> </div> - + <script src="/vendor/reveal.js/lib/js/head.min.js"></script> <script src="/vendor/reveal.js/js/reveal.js"></script> <script src="/vendor/string.min.js"></script> @@ -57,7 +63,7 @@ progress: true, history: true, center: true, - transition: 'default', + transition: 'slide', dependencies: deps }; |