summaryrefslogtreecommitdiff
path: root/public/views
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-05-15 09:56:01 +0800
committerCheng-Han, Wu2016-05-15 09:56:01 +0800
commit217e683422418cc8e4d9618028864edf3e0c346d (patch)
tree9db9e784a1b0aa996236a21ebad277f60f38d3ca /public/views
parent4aa4e3eacc36ae54c49ac94cf40594f33c4d9b1d (diff)
parent55a1ba0699c77ecfea2d2f2cefa6fae9ff0c289d (diff)
Merge PR #101
Diffstat (limited to 'public/views')
-rw-r--r--public/views/foot.ejs8
-rw-r--r--public/views/header.ejs24
-rw-r--r--public/views/index.ejs38
3 files changed, 50 insertions, 20 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 bbabe778..1092a2d1 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 == "true") || (typeof dropbox !== 'undefined' && dropbox) || (typeof github !== 'undefined' && 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(googleDrive == "true") { %>
<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(googleDrive == "true") { %>
<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 == "true") || (typeof dropbox !== 'undefined' && dropbox) || (typeof github !== 'undefined' && 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(googleDrive == "true") { %>
<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(googleDrive == "true") { %>
<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>
diff --git a/public/views/index.ejs b/public/views/index.ejs
index 69b525e9..7648211f 100644
--- a/public/views/index.ejs
+++ b/public/views/index.ejs
@@ -15,7 +15,7 @@
<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
<!-- Bootstrap core CSS -->
- <% if(useCDN) { %>
+ <% if(useCDN) { %>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.2/css/font-awesome.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.9.0/bootstrap-social.min.css">
@@ -58,8 +58,10 @@
<p class="lead">
Realtime collaborative markdown notes on all platforms.
</p>
+ <% if(facebook || twitter || github || dropbox) { %>
<a type="button" class="btn btn-lg btn-success ui-signin" data-toggle="modal" data-target=".signin-modal" style="display:none;">Sign In</a>
<div class="ui-or" style="display:none;">Or</div>
+ <% }%>
<p class="lead">
<a href="<%- url %>/new" class="btn btn-lg btn-default">New note</a>
</p>
@@ -70,6 +72,7 @@
</div>
<div id="history" class="section" style="display:none;">
+ <% if(facebook || twitter || github || dropbox) { %>
<div class="ui-signin">
<h4>
<a type="button" class="btn btn-success" data-toggle="modal" data-target=".signin-modal">Sign In</a> to get own history!
@@ -81,6 +84,7 @@
<a href="<%- url %>/new" class="btn btn-default">New note</a> Or
<a href="#" class="btn btn-danger ui-logout">Sign Out</a>
</div>
+ <% }%>
<hr>
<form class="form-inline">
<div class="form-group" style="vertical-align: bottom;">
@@ -179,25 +183,25 @@
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
- <% if(useCDN) { %>
- <script src="//code.jquery.com/jquery-1.11.3.min.js" defer></script>
- <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" defer></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js" defer></script>
+ <% if(useCDN) { %>
+ <script src="//code.jquery.com/jquery-1.11.3.min.js" defer></script>
+ <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" defer></script>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/jquery.gsap.min.js" defer></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js" defer></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment-with-locales.min.js" defer></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js" defer></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/js-url/2.0.2/url.min.js" defer></script>
- <% } else { %>
- <script src="<%- url %>/vendor/jquery/dist/jquery.min.js" defer></script>
- <script src="<%- url %>/vendor/bootstrap/dist/js/bootstrap.min.js" defer></script>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js" defer></script>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment-with-locales.min.js" defer></script>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js" defer></script>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/js-url/2.0.2/url.min.js" defer></script>
+ <% } else { %>
+ <script src="<%- url %>/vendor/jquery/dist/jquery.min.js" defer></script>
+ <script src="<%- url %>/vendor/bootstrap/dist/js/bootstrap.min.js" defer></script>
<script src="<%- url %>/vendor/gsap/src/minified/TweenMax.min.js" defer></script>
<script src="<%- url %>/vendor/gsap/src/minified/jquery.gsap.min.js" defer></script>
- <script src="<%- url %>/vendor/select2/select2.min.js" defer></script>
- <script src="<%- url %>/vendor/moment/min/moment-with-locales.min.js" defer></script>
+ <script src="<%- url %>/vendor/select2/select2.min.js" defer></script>
+ <script src="<%- url %>/vendor/moment/min/moment-with-locales.min.js" defer></script>
<script src="<%- url %>/vendor/handlebars/handlebars.min.js" defer></script>
- <script src="<%- url %>/vendor/js-url/url.min.js" defer></script>
- <% } %>
+ <script src="<%- url %>/vendor/js-url/url.min.js" defer></script>
+ <% } %>
<script src="<%- url %>/vendor/js.cookie.js" defer></script>
<script src="<%- url %>/vendor/list.min.js" defer></script>
<script src="<%- url %>/vendor/FileSaver.min.js" defer></script>
@@ -208,4 +212,4 @@
<script src="<%- url %>/js/cover.js" defer></script>
</body>
-</html> \ No newline at end of file
+</html>