summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Croft2016-05-12 12:32:10 -0400
committerJason Croft2016-05-12 12:32:10 -0400
commite65d43bd81dc9af9be0c6df599800bc3ccf15a5e (patch)
tree99f23b8a7d3885ca440ae952e6034da56c9d83f5
parent30e602a7400f3b38918a55f1470610b8d4ee49d7 (diff)
parent4aa4e3eacc36ae54c49ac94cf40594f33c4d9b1d (diff)
Merge remote-tracking branch 'origin/master' into gitlab_snippets
# Conflicts: # bower.json # public/views/body.ejs
Diffstat (limited to '')
-rw-r--r--app.js3
-rw-r--r--bower.json2
-rw-r--r--public/views/body.ejs3
-rw-r--r--public/views/head.ejs2
-rw-r--r--public/views/header.ejs12
-rw-r--r--public/views/help-modal.ejs132
-rw-r--r--public/views/html.hbs2
-rw-r--r--public/views/index.ejs4
-rw-r--r--public/views/pretty.ejs2
-rw-r--r--public/views/signin-modal.ejs (renamed from public/views/modal.ejs)0
10 files changed, 149 insertions, 13 deletions
diff --git a/app.js b/app.js
index 60eb61b5..5d847f76 100644
--- a/app.js
+++ b/app.js
@@ -516,5 +516,8 @@ models.sequelize.sync().then(startListen);
// log uncaught exception
process.on('uncaughtException', function (err) {
+ logger.error('An uncaught exception has occured.');
logger.error(err);
+ logger.error('Process will exit now.');
+ process.exit(1);
}); \ No newline at end of file
diff --git a/bower.json b/bower.json
index 70973750..d27cf55a 100644
--- a/bower.json
+++ b/bower.json
@@ -20,7 +20,7 @@
"dependencies": {
"bootstrap": "~3.3.6",
"jquery": "~1.11.3",
- "font-awesome": "~4.6.0",
+ "font-awesome": "~4.6.2",
"Ionicons": "ionicons#~2.0.1",
"reveal.js": "~3.2.0",
"gsap": "greensock#~1.18.0",
diff --git a/public/views/body.ejs b/public/views/body.ejs
index f0b62c28..5e183dc3 100644
--- a/public/views/body.ejs
+++ b/public/views/body.ejs
@@ -234,4 +234,5 @@
</div>
</div>
</div>
-<%- include modal %> \ No newline at end of file
+<%- include signin-modal %>
+<%- include help-modal %> \ No newline at end of file
diff --git a/public/views/head.ejs b/public/views/head.ejs
index cdc59048..ba78b9dc 100644
--- a/public/views/head.ejs
+++ b/public/views/head.ejs
@@ -12,7 +12,7 @@
<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
<% 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.5.0/css/font-awesome.min.css">
+<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.2/css/font-awesome.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/ionicons/2.0.1/css/ionicons.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.9.0/bootstrap-social.min.css">
diff --git a/public/views/header.ejs b/public/views/header.ejs
index ee89ddeb..6629d3a4 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; float: right;">
+ <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>
@@ -13,7 +13,7 @@
<ul class="dropdown-menu list" role="menu" aria-labelledby="menu">
</ul>
</div>
- <a class="navbar-brand" href="<%- url %>/"><i class="fa fa-file-text"></i> HackMD</a>
+ <a class="navbar-brand pull-left" href="<%- url %>"><i class="fa fa-file-text"></i> HackMD</a>
<div class="nav-mobile pull-right visible-xs">
<span class="btn btn-link btn-file ui-upload-image" title="Upload Image" style="display:none;">
<i class="fa fa-camera"></i><input type="file" accept="image/*" name="upload" multiple>
@@ -67,7 +67,7 @@
<li role="presentation"><a role="menuitem" class="ui-download-html" tabindex="-1" href="#" target="_self"><i class="fa fa-file-code-o fa-fw"></i> HTML</a>
</li>
<li class="divider"></li>
- <li><a href="https://www.facebook.com/messages/866415986748945" class="ui-feedback" title="Feedback" target="_blank"><i class="fa fa-bullhorn fa-fw"></i> Feedback</a>
+ <li role="presentation"><a role="menuitem" class="ui-help" href="#" data-toggle="modal" data-target=".help-modal"><i class="fa fa-question-circle fa-fw"></i> Help</a>
</li>
</ul>
<a class="btn btn-link ui-mode">
@@ -88,9 +88,9 @@
<input type="radio" name="mode" autocomplete="off"><i class="fa fa-columns"></i>
</label>
</div>
- <a href="https://www.facebook.com/messages/866415986748945" class="btn btn-link ui-feedback" title="Feedback" target="_blank">
- <i class="fa fa-bullhorn"></i>
- </a>
+ <span class="btn btn-link btn-file ui-help" title="Help" data-toggle="modal" data-target=".help-modal">
+ <i class="fa fa-question-circle"></i>
+ </span>
<span class="btn btn-link btn-file ui-upload-image" title="Upload Image" style="display:none;">
<i class="fa fa-camera"></i><input type="file" accept="image/*" name="upload" multiple>
</span>
diff --git a/public/views/help-modal.ejs b/public/views/help-modal.ejs
new file mode 100644
index 00000000..15342262
--- /dev/null
+++ b/public/views/help-modal.ejs
@@ -0,0 +1,132 @@
+<!-- help modal -->
+<div class="modal fade help-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
+ </button>
+ <h4 class="modal-title" id="mySmallModalLabel"><i class="fa fa-question-circle"></i> Help</h4>
+ </div>
+ <div class="modal-body">
+ <div class="row">
+ <div class="col-lg-3">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Contacts</h3>
+ </div>
+ <div class="panel-body">
+ <a href="https://github.com/hackmdio/hackmd/issues" title="Report an issue" target="_blank"><i class="fa fa-tag fa-fw"></i> Report an issue</a>
+ <br>
+ <a href="mailto:hackmdio@gmail.com" title="Send us email"><i class="fa fa-envelope fa-fw"></i> Send us email</a>
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Documents</h3>
+ </div>
+ <div class="panel-body">
+ <a href="./features" title="Features" target="_blank"><i class="fa fa-dot-circle-o fa-fw"></i> Features</a>
+ <br>
+ <a href="./yaml-metadata" title="YAML Metadata" target="_blank"><i class="fa fa-dot-circle-o fa-fw"></i> YAML Metadata</a>
+ <br>
+ <a href="./slide-example" title="Slide Example" target="_blank"><i class="fa fa-dot-circle-o fa-fw"></i> Slide Example</a>
+ </div>
+ </div>
+ </div>
+ <div class="col-lg-9">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">Cheatsheet</h3>
+ </div>
+ <div class="panel-body" style="max-height: 470px; overflow: auto;">
+ <table class="table table-condensed">
+ <thead>
+ <tr>
+ <th>Example</th>
+ <th>Syntax</th>
+ </tr>
+ </thead>
+ <tbody class="markdown-body" style="font-family: inherit; font-size: 14px; padding: 0; max-width: inherit;">
+ <tr>
+ <td>Header</td>
+ <td># Header</td>
+ </tr>
+ <tr>
+ <td><ul><li>Unordered List</li></ul><ol><li>Ordered List</li></ol><ul><li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled><label></label>Todo List</li></ul></td>
+ <td>- Unordered List<br>1. Ordered List<br>- [ ] Todo List</td>
+ </tr>
+ <tr>
+ <td><blockquote> Blockquote</blockquote></td>
+ <td>> Blockquote</td>
+ </tr>
+ <tr>
+ <td><strong>Bold font</strong></td>
+ <td>**Bold font**</td>
+ </tr>
+ <tr>
+ <td><i>Italics font</i></td>
+ <td>*Italics font*</td>
+ </tr>
+ <tr>
+ <td><s>Strikethrough</s></td>
+ <td>~~strikethrough~~</td>
+ </tr>
+ <tr>
+ <td>19<sup>th</sup></td>
+ <td>19^th^</td>
+ </tr>
+ <tr>
+ <td>H<sub>2</sub>O</td>
+ <td>H~2~O</td>
+ </tr>
+ <tr>
+ <td><ins>Inserted text</ins></td>
+ <td>++Inserted text++</td>
+ </tr>
+ <tr>
+ <td><mark>Marked text</mark></td>
+ <td>==Marked text==</td>
+ </tr>
+ <tr>
+ <td><a>Link</a></td>
+ <td>[title](http://)</td>
+ </tr>
+ <tr>
+ <td>Image</td>
+ <td>![alt](http:// title)</td>
+ </tr>
+ <tr>
+ <td><code>Code</code></td>
+ <td>`code`</td>
+ </tr>
+ <tr>
+ <td><pre style="border:none !important;"><code class="javascript hljs"><div class="wrapper"><div class="gutter linenumber"><span data-linenumber="1"></span></div><div class="code"><span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>;
+</div></div></code></pre></td>
+ <td>```javascript<br>var i = 0;<br>```</td>
+ </tr>
+ <tr>
+ <td><img align="absmiddle" alt=":smile:" class="emoji" src="./vendor/emojify/images/smile.png" title=":smile:"></img></td>
+ <td>:smile:</td>
+ </tr>
+ <tr>
+ <td>Externals</td>
+ <td>{%youtube youtube_id %}</td>
+ </tr>
+ <tr>
+ <td>L<sup>a</sup>T<sub>e</sub>X</td>
+ <td>$L^aT_eX$</td>
+ </tr>
+ <tr>
+ <td><div class="alert alert-info"><p>This is a alert area.</p></div></td>
+ <td>:::info<br>This is a alert area.<br>:::</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/public/views/html.hbs b/public/views/html.hbs
index d59c4afe..4c6ff00d 100644
--- a/public/views/html.hbs
+++ b/public/views/html.hbs
@@ -17,7 +17,7 @@
<link rel="apple-touch-icon" href="{{{url}}}/apple-touch-icon.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.2/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">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/highlight.js/8.8.0/styles/github-gist.min.css">
diff --git a/public/views/index.ejs b/public/views/index.ejs
index 85d955b7..69b525e9 100644
--- a/public/views/index.ejs
+++ b/public/views/index.ejs
@@ -17,7 +17,7 @@
<!-- Bootstrap core CSS -->
<% 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.5.0/css/font-awesome.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">
<% } else { %>
<link rel="stylesheet" href="<%- url %>/vendor/bootstrap/dist/css/bootstrap.min.css">
@@ -174,7 +174,7 @@
</div>
</div>
</div>
- <%- include modal %>
+ <%- include signin-modal %>
<!-- Bootstrap core JavaScript
================================================== -->
diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs
index 0ef3a104..3387e3e7 100644
--- a/public/views/pretty.ejs
+++ b/public/views/pretty.ejs
@@ -16,7 +16,7 @@
<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
<% if(useCDN) { %>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.2/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 { %>
diff --git a/public/views/modal.ejs b/public/views/signin-modal.ejs
index 4eb33bf3..4eb33bf3 100644
--- a/public/views/modal.ejs
+++ b/public/views/signin-modal.ejs