summaryrefslogtreecommitdiff
path: root/public/views
diff options
context:
space:
mode:
Diffstat (limited to 'public/views')
-rw-r--r--public/views/body.ejs27
-rw-r--r--public/views/error.ejs20
-rw-r--r--public/views/foot.ejs30
-rw-r--r--public/views/footer.ejs0
-rw-r--r--public/views/head.ejs33
-rw-r--r--public/views/header.ejs105
-rw-r--r--public/views/index.ejs15
-rw-r--r--public/views/pretty.ejs58
8 files changed, 288 insertions, 0 deletions
diff --git a/public/views/body.ejs b/public/views/body.ejs
new file mode 100644
index 00000000..4237746b
--- /dev/null
+++ b/public/views/body.ejs
@@ -0,0 +1,27 @@
+<div class="row ui-content" style="display: none;">
+ <div class="ui-edit-area">
+ <textarea id="textit"></textarea>
+ </div>
+ <div class="ui-view-area">
+ <div class="markdown-body container-fluid"></div>
+ </div>
+</div>
+<div class="modal fade" id="clipboardModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" 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="myModalLabel">Import from clipboard</h4>
+ </div>
+ <div class="modal-body">
+ <div contenteditable data-ph="Paste your markdown or webpage here..." id="clipboardModalContent" style="overflow:auto;max-height:50vh"></div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-danger" id="clipboardModalClear">Clear</button>
+ <button type="button" class="btn btn-primary" id="clipboardModalConfirm">Import</button>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/public/views/error.ejs b/public/views/error.ejs
new file mode 100644
index 00000000..cd9f54be
--- /dev/null
+++ b/public/views/error.ejs
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <%- include head %>
+ <link rel="stylesheet" href="/css/center.css">
+</head>
+
+<body>
+ <%- include header %>
+ <div class="container-fluid text-center">
+ <div class="vertical-center-row">
+ <h1><%- code %> <%- detail %> <small><%- msg %></small></h1>
+ </div>
+ </div>
+ <%- include footer %>
+</body>
+
+</html>
+<%- include foot %> \ No newline at end of file
diff --git a/public/views/foot.ejs b/public/views/foot.ejs
new file mode 100644
index 00000000..070be36b
--- /dev/null
+++ b/public/views/foot.ejs
@@ -0,0 +1,30 @@
+<!--<script src="/js/ga.js"></script>-->
+<script src="//cdnjs.cloudflare.com/ajax/libs/spin.js/2.0.1/spin.min.js"></script>
+<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
+<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
+<!--codemirror-->
+<script src="/vendor/codemirror/codemirror.min.js"></script>
+<!--others-->
+<script src="/vendor/socket.io-1.3.5.js"></script>
+<script src="/vendor/remarkable.min.js"></script>
+<script src="/vendor/remarkable-regex.js"></script>
+<script src="/vendor/gist-embed.js"></script>
+<script src="/vendor/lz-string.min.js"></script>
+<script src="/vendor/highlight-js/highlight.min.js"></script>
+<script src="/vendor/jquery.cookie-1.4.1.min.js"></script>
+<script src="/vendor/moment-with-locales.js"></script>
+<script src="/vendor/emojify/js/emojify.js"></script>
+<script src="/vendor/to-markdown.js"></script>
+<script src="/vendor/raphael-min.js"></script>
+<script src="/vendor/underscore-min.js"></script>
+<script src="/vendor/sequence-diagrams/sequence-diagram-min.js"></script>
+<script src="/vendor/flowchart/flowchart-1.4.0.min.js"></script>
+<script src="/vendor/FileSaver.min.js"></script>
+<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="rdoizrlnkuha23r" async defer></script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({ messageStyle: "none", skipStartupTypeset: true ,tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true }});
+</script>
+<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+<script src="/js/extra.js"></script>
+<script src="/js/history.js"></script>
+<script src="/js/index.js"></script> \ No newline at end of file
diff --git a/public/views/footer.ejs b/public/views/footer.ejs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/views/footer.ejs
diff --git a/public/views/head.ejs b/public/views/head.ejs
new file mode 100644
index 00000000..23a9e64a
--- /dev/null
+++ b/public/views/head.ejs
@@ -0,0 +1,33 @@
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
+<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">
+<meta name="description" content="Realtime collaborative markdown notes on all platforms.">
+<meta name="author" content="jackycute">
+<!-- Open Graph data -->
+<meta property="og:title" content="HackMD - Collaborative notes">
+<meta property="og:type" content="website">
+<meta property="og:url" content="https://hackmd.herokuapp.com/">
+<meta property="og:description" content="Realtime collaborative markdown notes on all platforms.">
+<meta property="og:site_name" content="HackMD">
+<meta property="fb:admins" content="1463801565">
+<title>HackMD - Collaborative notes</title>
+<link rel="icon" type="image/png" href="/favicon.png">
+<link rel="apple-touch-icon" href="/apple-touch-icon.png">
+<!--<link rel="stylesheet" href="/vendor/bootstrap-3.3.1/css/bootstrap.min.css">-->
+<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
+<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
+<link rel="stylesheet" href="/vendor/codemirror/lib/codemirror.css">
+<link rel="stylesheet" href="/vendor/codemirror/addon/fold/foldgutter.css">
+<link rel="stylesheet" href="/vendor/codemirror/theme/monokai.css">
+<link rel="stylesheet" href="/css/github-extract.css">
+<link rel="stylesheet" href="/css/gist.css">
+<!--<link rel="stylesheet" href="/css/github-code-cdn.css">-->
+<link rel="stylesheet" href="/vendor/highlight-js/github.min.css">
+<link rel="stylesheet" href="/vendor/emojify/css/emojify.min.css" />
+<link rel="stylesheet" href="/css/markdown.css">
+<link rel="stylesheet" href="/css/index.css">
+<link rel="stylesheet" href="/css/extra.css">
+<link rel="stylesheet" href="/css/site.css"> \ No newline at end of file
diff --git a/public/views/header.ejs b/public/views/header.ejs
new file mode 100644
index 00000000..e8b60110
--- /dev/null
+++ b/public/views/header.ejs
@@ -0,0 +1,105 @@
+<nav class="hidden-print navbar navbar-default navbar-fixed-top">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <h4 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>
+ <div class="visible-lg">&nbsp;</div>
+ </h4>
+ <div class="nav-mobile nav-status visible-xs">
+ <div class="ui-short-status"><span class="label label-danger"><i class="fa fa-plug"></i></span>
+ </div>
+ </div>
+ <a class="navbar-brand" href="./"><i class="fa fa-file-text"></i> HackMD</a>
+ <div class="nav-mobile pull-right visible-xs">
+ <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">
+ <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-pretty" tabindex="-1" href="#" target="_blank"><i class="fa fa-print fa-fw"></i> Pretty</a>
+ </li>
+ <li class="divider"></li>
+ <li class="dropdown-header">Save</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>
+ <li class="divider"></li>
+ <li class="dropdown-header">Download</li>
+ <li role="presentation"><a role="menuitem" class="ui-download-markdown" tabindex="-1" href="#" target="_self"><i class="fa fa-file-text fa-fw"></i> Markdown</a>
+ </li>
+ <li class="divider"></li>
+ <li class="dropdown-header">Import</li>
+ <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>
+ <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>
+ </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>
+ </ul>
+ <a class="btn btn-link ui-mode">
+ <i class="fa fa-toggle-on"></i>
+ </a>
+ </div>
+ </div>
+ <div class="collapse navbar-collapse">
+ <ul class="nav navbar-nav navbar-form navbar-left" style="padding:0;">
+ <div class="btn-group" data-toggle="buttons">
+ <label class="btn btn-default ui-edit" title="Edit">
+ <input type="radio" name="mode" autocomplete="off"><i class="fa fa-edit"></i>
+ </label>
+ <label class="btn btn-default ui-view" title="View">
+ <input type="radio" name="mode" autocomplete="off"><i class="fa fa-eye"></i>
+ </label>
+ <label class="btn btn-default ui-both" title="Both">
+ <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>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a>
+ <div class="ui-status">
+ <span class="label label-danger"><i class="fa fa-plug"></i> OFFLINE</span>
+ </div>
+ </a>
+ </li>
+ </ul>
+ <div class="navbar-form navbar-right" style="padding:0;">
+ <a href="./new" target="_blank" class="btn btn-link ui-new">
+ <i class="fa fa-plus"></i> New
+ </a>
+ <a href="#" target="_blank" class="btn btn-link ui-pretty">
+ <i class="fa fa-print"></i> Pretty
+ </a>
+ <span>
+ <a class="btn btn-link" data-target="#" data-toggle="dropdown">
+ Save <i class="fa fa-caret-down"></i>
+ </a>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="menu" style="right: 230px;">
+ <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>
+ <li role="presentation"><a role="menuitem" class="ui-download-markdown" tabindex="-1" href="#" target="_self"><i class="fa fa-file-text fa-fw"></i> Markdown</a>
+ </li>
+ </ul>
+ </span>
+ <span>
+ <a class="btn btn-link" data-target="#" data-toggle="dropdown">
+ Import <i class="fa fa-caret-down"></i>
+ </a>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="menu" style="right: 150px;">
+ <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>
+ <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>
+ </li>
+ </ul>
+ </span>
+ </div>
+ </div>
+</nav>
+<div class="ui-spinner"></div> \ No newline at end of file
diff --git a/public/views/index.ejs b/public/views/index.ejs
new file mode 100644
index 00000000..c5778fc9
--- /dev/null
+++ b/public/views/index.ejs
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <%- include head %>
+</head>
+
+<body>
+ <%- include header %>
+ <%- include body %>
+ <%- include footer %>
+ <%- include foot %>
+</body>
+
+</html> \ No newline at end of file
diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs
new file mode 100644
index 00000000..01b65afa
--- /dev/null
+++ b/public/views/pretty.ejs
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>
+ HackMD - Collaborative notes
+ </title>
+ <link rel="icon" type="image/png" href="<%- url %>/favicon.png">
+<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
+ <link rel="stylesheet" href='<%- url %>/vendor/bootstrap/css/bootstrap.min.css'>
+ <link rel="stylesheet" href='<%- url %>/vendor/font-awesome/css/font-awesome.min.css'>
+ <link rel="stylesheet" href='<%- url %>/css/github-extract.css'>
+ <link rel="stylesheet" href='<%- url %>/css/gist.css'>
+ <link rel="stylesheet" href='<%- url %>/vendor/highlight-js/github.min.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'>
+</head>
+
+<body>
+ <div class="container markdown-body" style="display:none;">
+<%- body %>
+ </div>
+</body>
+
+</html>
+<!--<script src="<%- url %>/js/ga.js"></script>-->
+<script src="<%- url %>/vendor/jquery-1.11.2.min.js"></script>
+<script src="<%- url %>/vendor/lz-string.min.js"></script>
+<script src="<%- url %>/vendor/remarkable.min.js"></script>
+<script src="<%- url %>/vendor/remarkable-regex.js"></script>
+<script src="<%- url %>/vendor/gist-embed.js"></script>
+<script src="<%- url %>/vendor/string.min.js"></script>
+<script src="<%- url %>/vendor/highlight-js/highlight.min.js"></script>
+<script src="<%- url %>/vendor/emojify/js/emojify.min.js"></script>
+<script src="<%- url %>/vendor/raphael-min.js"></script>
+<script src="<%- url %>/vendor/underscore-min.js"></script>
+<script src="<%- url %>/vendor/sequence-diagrams/sequence-diagram-min.js"></script>
+<script src="<%- url %>/vendor/flowchart/flowchart-1.4.0.min.js"></script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({ messageStyle: "none", skipStartupTypeset: true ,tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true }});
+</script>
+<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+<script src="<%- url %>/js/extra.js"></script>
+<script>
+ var raw = $(".markdown-body").text();
+ var markdown = LZString.decompressFromBase64(raw);
+ var result = postProcess(md.render(markdown));
+ var markdown = $(".markdown-body");
+ markdown.html(result);
+ markdown.show();
+ finishView(markdown);
+ autoLinkify(markdown);
+ scrollToHash();
+</script> \ No newline at end of file