diff options
Diffstat (limited to '')
-rw-r--r-- | public/views/body.ejs | 28 | ||||
-rw-r--r-- | public/views/hackmd.ejs | 15 | ||||
-rw-r--r-- | public/views/header.ejs | 6 | ||||
-rw-r--r-- | public/views/index.ejs | 206 | ||||
-rw-r--r-- | public/views/modal.ejs | 34 | ||||
-rw-r--r-- | public/views/pretty.ejs | 4 | ||||
-rw-r--r-- | public/views/slide.hbs (renamed from public/views/slide/reveal.hbs) | 2 | ||||
-rw-r--r-- | public/views/slide/listing.hbs | 22 |
8 files changed, 259 insertions, 58 deletions
diff --git a/public/views/body.ejs b/public/views/body.ejs index 54562ea6..044f7e6d 100644 --- a/public/views/body.ejs +++ b/public/views/body.ejs @@ -8,7 +8,7 @@ <span> <span class="ui-lastchangeuser" style="display: none;"> <i class="ui-user-icon small" data-toggle="tooltip" data-placement="right"></i></span> <span class="ui-no-lastchangeuser"> <i class="fa fa-clock-o"></i></span> - <span class="text-uppercase">changed</span> + <span class="text-uppercase ui-status-lastchange"></span> <span class="ui-lastchange text-uppercase"></span> </span> <span class="ui-permission dropdown pull-right"> @@ -73,32 +73,6 @@ </div> </div> </div> -<!-- signin modal --> -<div class="modal fade signin-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> - <div class="modal-dialog modal-sm"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> - </button> - <h4 class="modal-title" id="mySmallModalLabel">Please sign in to edit</h4> - </div> - <div class="modal-body"> - <a href="<%- url %>/auth/facebook" class="btn btn-lg btn-block btn-social btn-facebook"> - <i class="fa fa-facebook"></i> Sign in via Facebook - </a> - <a href="<%- url %>/auth/twitter" class="btn btn-lg btn-block btn-social btn-twitter"> - <i class="fa fa-twitter"></i> Sign in via Twitter - </a> - <a href="<%- url %>/auth/github" class="btn btn-lg btn-block btn-social btn-github"> - <i class="fa fa-github"></i> Sign in via GitHub - </a> - <a href="<%- url %>/auth/dropbox" class="btn btn-lg btn-block btn-social btn-dropbox"> - <i class="fa fa-dropbox"></i> Sign in via Dropbox - </a> - </div> - </div> - </div> -</div> <!-- locked modal --> <div class="modal fade locked-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm"> diff --git a/public/views/hackmd.ejs b/public/views/hackmd.ejs new file mode 100644 index 00000000..c5778fc9 --- /dev/null +++ b/public/views/hackmd.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/header.ejs b/public/views/header.ejs index 410886d1..bf8f9f66 100644 --- a/public/views/header.ejs +++ b/public/views/header.ejs @@ -38,8 +38,10 @@ </li> <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> <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> @@ -119,8 +121,10 @@ </li> <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> + <% } %> <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> diff --git a/public/views/index.ejs b/public/views/index.ejs index c5778fc9..85d955b7 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -2,14 +2,210 @@ <html lang="en"> <head> - <%- include head %> + <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"> + <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"> + + <!-- 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="//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"> + <link rel="stylesheet" href="<%- url %>/vendor/font-awesome/css/font-awesome.min.css"> + <link rel="stylesheet" href="<%- url %>/css/bootstrap-social.css"> + <% } %> + <link rel="stylesheet" href="<%- url %>/vendor/select2/select2.css"> + <link rel="stylesheet" href="<%- url %>/vendor/select2/select2-bootstrap.css"> + <!-- Custom styles for this template --> + <link rel="stylesheet" href="<%- url %>/css/cover.css"> + <link rel="stylesheet" href="<%- url %>/css/site.css"> </head> <body> - <%- include header %> - <%- include body %> - <%- include footer %> - <%- include foot %> + <div class="site-wrapper"> + <div class="site-wrapper-inner"> + <div class="cover-container"> + + <div class="masthead clearfix"> + <div class="inner"> + <h3 class="masthead-brand"></h3> + <nav> + <ul class="nav masthead-nav"> + <li class="ui-home active"><a href="#">Home</a> + </li> + <li class="ui-history"><a href="#">History</a> + </li> + <li class="ui-releasenotes"><a href="#">Release Notes</a> + </li> + </ul> + </nav> + </div> + </div> + + <div id="home" class="section"> + <div class="inner cover"> + <h1 class="cover-heading"><i class="fa fa-file-text"></i> HackMD</h1> + <p class="lead"> + Realtime collaborative markdown notes on all platforms. + </p> + <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> + <h5>Share directly with URL <i class="fa fa-link"></i></h5> + <a class="btn btn-primary" href="<%- url %>/features">More features <i class="fa fa-chevron-right"></i></a> + </div> + <br> + </div> + + <div id="history" class="section" style="display:none;"> + <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! + </h4> + <p>Below are history from browser</p> + </div> + <div class="ui-signout" style="display:none;"> + <h4 class="ui-welcome">Welcome! <span class="ui-name"></span></h4> + <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;"> + <input class="form-control ui-use-tags" style="min-width:172px;max-width:344px;" /> + </div> + <div class="form-group"> + <input class="search form-control" placeholder="Search anything..." /> + </div> + <a href="#" class="sort btn btn-default" data-sort="text" title="Sort by title"> + Title + </a> + <a href="#" class="sort btn btn-default" data-sort="timestamp" title="Sort by time"> + Time + </a> + <span class="hidden-xs hidden-sm"> + <a href="#" class="btn btn-default ui-save-history" title="Export history"><i class="fa fa-save"></i></a> + <span class="btn btn-default btn-file ui-open-history" title="Import history"> + <i class="fa fa-folder-open-o"></i><input type="file" /> + </span> + <a href="#" class="btn btn-default ui-clear-history" title="Clear history" data-toggle="modal" data-target=".delete-modal"><i class="fa fa-trash-o"></i></a> + </span> + <a href="#" class="btn btn-default ui-refresh-history" title="Refresh history"><i class="fa fa-refresh"></i></a> + </form> + <h4 class="ui-nohistory" style="display:none;"> + No history + </h4> + <a href="#" class="btn btn-primary ui-import-from-browser" style="display:none;">Import from browser</a> + <ul id="history-list" class="list"> + </ul> + </div> + <div id="releasenotes" class="section" style="display:none;"> + <div id="template" style="display:none;"> + {{#each release}} + <div class="inner cover"> + <h5 class="cover-heading"> + <div class="text-left"> + <i class="fa fa-tag"></i> {{version}} + <span class="label label-default">{{tag}}</span> + <div class="pull-right"> + <i class="fa fa-clock-o"></i> {{date}} + </div> + </div> + </h5> + <hr>{{#each detail}} + <div class="text-left"> + <h5><i class="fa fa-dot-circle-o"></i> {{title}}</h5> + <ul> + {{#each item}} + <li> + {{this}} + </li> + {{/each}} + </ul> + </div> + {{/each}} + </div> + {{#unless @last}} + <br>{{/unless}} {{/each}} + </div> + </div> + + <div class="mastfoot"> + <div class="inner"> + <h6> + <iframe src="//ghbtns.com/github-btn.html?user=hackmdio&repo=hackmd&type=star&count=true" frameborder="0" scrolling="0" width="90px" height="20px" style="vertical-align:middle;"></iframe> + </h6> + <p>© 2016 <a href="https://www.facebook.com/TakeHackMD" target="_blank"><i class="fa fa-facebook-square"></i> HackMD</a> by <a href="https://github.com/jackycute" target="_blank"><i class="fa fa-github-square"></i> jackycute</a> + </p> + </div> + </div> + </div> + </div> + </div> + <!-- delete modal --> + <div class="modal fade delete-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog modal-sm"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="myModalLabel">Are you sure?</h4> + </div> + <div class="modal-body" style="color:black;"> + <h5 class="ui-delete-modal-msg"></h5> + <strong class="ui-delete-modal-item"></strong> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> + <button type="button" class="btn btn-danger ui-delete-modal-confirm">Yes, do it!</button> + </div> + </div> + </div> + </div> + <%- include modal %> + + <!-- 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> + <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="<%- 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/handlebars/handlebars.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> + <script src="<%- url %>/vendor/store.min.js" defer></script> + <script src="<%- url %>/vendor/lz-string/libs/lz-string.min.js" defer></script> + <script src="<%- url %>/js/common.js" defer></script> + <script src="<%- url %>/js/history.js" defer></script> + <script src="<%- url %>/js/cover.js" defer></script> </body> </html>
\ No newline at end of file diff --git a/public/views/modal.ejs b/public/views/modal.ejs new file mode 100644 index 00000000..260ff423 --- /dev/null +++ b/public/views/modal.ejs @@ -0,0 +1,34 @@ +<!-- signin modal --> +<div class="modal fade signin-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> + <div class="modal-dialog modal-sm"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="mySmallModalLabel">Choose method</h4> + </div> + <div class="modal-body"> + <% if(facebook) { %> + <a href="<%- url %>/auth/facebook" class="btn btn-lg btn-block btn-social btn-facebook"> + <i class="fa fa-facebook"></i> Sign in via Facebook + </a> + <% } %> + <% if(twitter) { %> + <a href="<%- url %>/auth/twitter" class="btn btn-lg btn-block btn-social btn-twitter"> + <i class="fa fa-twitter"></i> Sign in via Twitter + </a> + <% } %> + <% if(github) { %> + <a href="<%- url %>/auth/github" class="btn btn-lg btn-block btn-social btn-github"> + <i class="fa fa-github"></i> Sign in via GitHub + </a> + <% } %> + <% if(dropbox) { %> + <a href="<%- url %>/auth/dropbox" class="btn btn-lg btn-block btn-social btn-dropbox"> + <i class="fa fa-dropbox"></i> Sign in via Dropbox + </a> + <% } %> + </div> + </div> + </div> +</div>
\ No newline at end of file diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index ed6e638f..c8e959f4 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -49,8 +49,8 @@ <% } else { %> <span class="ui-no-lastchangeuser"> <i class="fa fa-clock-o"></i></span> <% } %> - <span class="text-uppercase">changed</span> - <span class="ui-lastchange text-uppercase"><%- updatetime %></span> + <span class="text-uppercase ui-status-lastchange"></span> + <span class="ui-lastchange text-uppercase" data-createtime="<%- createtime %>" data-updatetime="<%- updatetime %>"></span> </span> <span class="pull-right"><%- viewcount %> views <a href="#" class="ui-edit" title="Edit this note"><i class="fa fa-fw fa-pencil"></i></a></span> </small> diff --git a/public/views/slide/reveal.hbs b/public/views/slide.hbs index 8a93c267..262a5df7 100644 --- a/public/views/slide/reveal.hbs +++ b/public/views/slide.hbs @@ -20,7 +20,7 @@ <script> document.write( '<link rel="stylesheet" href="{{{url}}}/vendor/reveal.js/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' ); </script> - <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> + <script src="{{{url}}}/vendor/jquery/dist/jquery.min.js"></script> </head> <body> diff --git a/public/views/slide/listing.hbs b/public/views/slide/listing.hbs deleted file mode 100644 index 7da8ebab..00000000 --- a/public/views/slide/listing.hbs +++ /dev/null @@ -1,22 +0,0 @@ -<!doctype html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <title>Directory Listing</title> - <link rel="stylesheet" href="{{{url}}}/vendor/reveal.js/{{{theme}}}" id="theme"> - <style type="text/css"> - body { - margin: 1em; - } - a { - color: white; - display: block; - } - </style> - <link rel="icon" href="http://i.imgur.com/IVlU2PU.png" sizes="512x512" /> - </head> - - <body> - {{{listing}}} - </body> -</html> |