summaryrefslogtreecommitdiff
path: root/public/views
diff options
context:
space:
mode:
Diffstat (limited to 'public/views')
-rw-r--r--public/views/foot.ejs8
-rw-r--r--public/views/header.ejs24
2 files changed, 29 insertions, 3 deletions
diff --git a/public/views/foot.ejs b/public/views/foot.ejs
index 9cd4ba03..15eff6e1 100644
--- a/public/views/foot.ejs
+++ b/public/views/foot.ejs
@@ -71,8 +71,12 @@
<script src="<%- url %>/vendor/md-toc.js" defer></script>
<script src="<%- url %>/vendor/showup/showup.js" defer></script>
<script src="<%- url %>/vendor/randomColor.js" defer></script>
+<% if(dropbox) { %>
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="change this" async defer></script>
+<% } %>
+<% if(googleDrive) { %>
<script src="https://www.google.com/jsapi" defer></script>
+<% } %>
<script src="<%- url %>/js/google-drive-upload.js" defer></script>
<script src="<%- url %>/js/google-drive-picker.js" defer></script>
<script src="<%- url %>/js/common.js" defer></script>
@@ -81,4 +85,6 @@
<script src="<%- url %>/js/history.js" defer></script>
<script src="<%- url %>/js/index.js" defer></script>
<script src="<%- url %>/js/syncscroll.js" defer></script>
-<script src="https://apis.google.com/js/client:plusone.js?onload=onGoogleClientLoaded" defer></script> \ No newline at end of file
+<% if(googleDrive) { %>
+<script src="https://apis.google.com/js/client:plusone.js?onload=onGoogleClientLoaded" defer></script>
+<% } %>
diff --git a/public/views/header.ejs b/public/views/header.ejs
index 8172a47e..aeadb043 100644
--- a/public/views/header.ejs
+++ b/public/views/header.ejs
@@ -1,7 +1,7 @@
<nav class="navbar navbar-default navbar-fixed-top unselectable hidden-print">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
- <span class="pull-right" style="margin-top: 17px; color: #777;">
+ <span class="pull-right" style="margin-top: 17px; color: #777;">
<div class="visible-xs">&nbsp;</div>
<div class="visible-sm">&nbsp;</div>
<div class="visible-md">&nbsp;</div>
@@ -33,21 +33,31 @@
<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>
+ <% if(googleDrive || googleDrive || github) { %>
<li class="dropdown-header">Export</li>
+ <% if(typeof dropbox !== 'undefined' && dropbox) { %>
<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>
+ <% } %>
+ <% if(typeof googleDrive !== 'undefined' && googleDrive) { %>
<li role="presentation"><a role="menuitem" class="ui-save-google-drive" tabindex="-1" href="#" target="_self"><i class="fa fa-cloud-upload fa-fw"></i> Google Drive</a>
</li>
+ <% } %>
<% if(typeof github !== 'undefined' && github) { %>
<li role="presentation"><a role="menuitem" class="ui-save-gist" tabindex="-1" href="#" target="_blank"><i class="fa fa-github fa-fw"></i> Gist</a>
</li>
<% } %>
<li class="divider"></li>
+ <% } %>
<li class="dropdown-header">Import</li>
+ <% if(typeof dropbox !== 'undefined' && dropbox) { %>
<li role="presentation"><a role="menuitem" class="ui-import-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a>
</li>
+ <% } %>
+ <% if(typeof googleDrive !== 'undefined' && googleDrive) { %>
<li role="presentation"><a role="menuitem" class="ui-import-google-drive" tabindex="-1" href="#" target="_self"><i class="fa fa-cloud-download fa-fw"></i> Google Drive</a>
</li>
+ <% } %>
<li role="presentation"><a role="menuitem" class="ui-import-gist" href="#" data-toggle="modal" data-target="#gistImportModal"><i class="fa fa-github fa-fw"></i> Gist</a>
</li>
<li role="presentation"><a role="menuitem" class="ui-import-clipboard" href="#" data-toggle="modal" data-target="#clipboardModal"><i class="fa fa-clipboard fa-fw"></i> Clipboard</a>
@@ -118,21 +128,31 @@
<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>
+ <% if(googleDrive || googleDrive || github) { %>
<li class="dropdown-header">Export</li>
+ <% if(typeof dropbox !== 'undefined' && dropbox) { %>
<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>
+ <% } %>
+ <% if(typeof googleDrive !== 'undefined' && googleDrive) { %>
<li role="presentation"><a role="menuitem" class="ui-save-google-drive" tabindex="-1" href="#" target="_self"><i class="fa fa-cloud-upload fa-fw"></i> Google Drive</a>
</li>
+ <% } %>
<% if(typeof github !== 'undefined' && github) { %>
<li role="presentation"><a role="menuitem" class="ui-save-gist" tabindex="-1" href="#" target="_blank"><i class="fa fa-github fa-fw"></i> Gist</a>
</li>
<% } %>
<li class="divider"></li>
+ <% } %>
<li class="dropdown-header">Import</li>
+ <% if(typeof dropbox !== 'undefined' && dropbox) { %>
<li role="presentation"><a role="menuitem" class="ui-import-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a>
</li>
+ <% } %>
+ <% if(typeof googleDrive !== 'undefined' && googleDrive) { %>
<li role="presentation"><a role="menuitem" class="ui-import-google-drive" tabindex="-1" href="#" target="_self"><i class="fa fa-cloud-download fa-fw"></i> Google Drive</a>
</li>
+ <% } %>
<li role="presentation"><a role="menuitem" class="ui-import-gist" href="#" data-toggle="modal" data-target="#gistImportModal"><i class="fa fa-github fa-fw"></i> Gist</a>
</li>
<li role="presentation"><a role="menuitem" class="ui-import-clipboard" href="#" data-toggle="modal" data-target="#clipboardModal"><i class="fa fa-clipboard fa-fw"></i> Clipboard</a>
@@ -148,4 +168,4 @@
</ul>
</div>
</nav>
-<div class="ui-spinner unselectable hidden-print"></div> \ No newline at end of file
+<div class="ui-spinner unselectable hidden-print"></div>