summaryrefslogtreecommitdiff
path: root/public/views
diff options
context:
space:
mode:
authorWu Cheng-Han2016-01-12 08:01:42 -0600
committerWu Cheng-Han2016-01-12 08:01:42 -0600
commit2ecec3b59aabe2fd6156338cd4cbab7672d4f9b1 (patch)
treea27846db2e2e8d0ef1480893a8ad2b69dac36ad0 /public/views
parent1672df3dceebe885ded02530799a78d5a07be1d7 (diff)
Support show last change user with profile and support YAML config inside the note with robots, lang, dir, breaks options
Diffstat (limited to 'public/views')
-rw-r--r--public/views/body.ejs7
-rw-r--r--public/views/foot.ejs2
-rw-r--r--public/views/head.ejs3
-rw-r--r--public/views/html.hbs3
-rw-r--r--public/views/pretty.ejs21
5 files changed, 29 insertions, 7 deletions
diff --git a/public/views/body.ejs b/public/views/body.ejs
index f47cf175..b3a49db8 100644
--- a/public/views/body.ejs
+++ b/public/views/body.ejs
@@ -5,7 +5,12 @@
<div class="ui-view-area">
<div class="ui-infobar container-fluid unselectable hidden-print">
<small>
- <span class="ui-lastchange text-uppercase"></span>
+ <span>
+ <span class="ui-lastchangeuser">&thinsp;<i class="ui-user-icon small" data-toggle="tooltip" data-placement="right"></i></span>
+ <span class="ui-no-lastchangeuser">&thinsp;<i class="fa fa-clock-o"></i></span>
+ &nbsp;<span class="text-uppercase">changed</span>
+ <span class="ui-lastchange text-uppercase"></span>
+ </span>
<span class="ui-permission dropdown pull-right">
<a id="permissionLabel" class="ui-permission-label text-uppercase" data-target="#" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
</a>
diff --git a/public/views/foot.ejs b/public/views/foot.ejs
index ee04d440..c042438d 100644
--- a/public/views/foot.ejs
+++ b/public/views/foot.ejs
@@ -6,6 +6,7 @@
<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/socket.io/1.3.7/socket.io.min.js" defer></script>
+<script src="//cdnjs.cloudflare.com/ajax/libs/js-yaml/3.4.6/js-yaml.min.js" defer></script>
<% } else { %>
<script src="/vendor/spin.js/spin.min.js" defer></script>
<script src="/vendor/jquery/dist/jquery.min.js"></script>
@@ -14,6 +15,7 @@
<script src="/vendor/gsap/src/minified/TweenMax.min.js" defer></script>
<script src="/vendor/gsap/src/minified/jquery.gsap.min.js" defer></script>
<script src="/vendor/socket.io-client/socket.io.js" defer></script>
+<script src="/vendor/js-yaml/dist/js-yaml.min.js" defer></script>
<% } %>
<script src="/vendor/jquery-ui/jquery-ui.min.js" defer></script>
<!--codemirror-->
diff --git a/public/views/head.ejs b/public/views/head.ejs
index fa690108..795665b4 100644
--- a/public/views/head.ejs
+++ b/public/views/head.ejs
@@ -4,6 +4,9 @@
<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">
+<% if(typeof robots !== 'undefined' && robots) { %>
+<meta name="robots" content="<%- robots %>">
+<% } %>
<title><%- title %></title>
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
diff --git a/public/views/html.hbs b/public/views/html.hbs
index e3aa1331..5c7e6bea 100644
--- a/public/views/html.hbs
+++ b/public/views/html.hbs
@@ -9,6 +9,7 @@
<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">
+ {{{robots}}}
<title>
{{title}}
</title>
@@ -42,7 +43,7 @@
</ul>
</div>
</div>
- <div id="toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="top:17px;display:none;">
+ <div id="toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="top:17px;display:none;" {{{lang}}} {{{dir}}}>
{{{toc-affix}}}
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs
index 46c559f9..6fe02827 100644
--- a/public/views/pretty.ejs
+++ b/public/views/pretty.ejs
@@ -8,6 +8,9 @@
<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">
+ <% if(typeof robots !== 'undefined' && robots) { %>
+ <meta name="robots" content="<%- robots %>">
+ <% } %>
<title><%- title %></title>
<link rel="icon" type="image/png" href="<%- url %>/favicon.png">
<link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png">
@@ -37,13 +40,19 @@
<body style="display:none;">
<div class="ui-infobar container-fluid unselectable hidden-print">
<small>
- <span class="ui-lastchange text-uppercase"><%- updatetime %></span>
- <span class="pull-right"><%- viewcount %> views <a href="#" class="ui-edit" title="Edit this note"><i class="fa fa-pencil"></i></a></span>
+ <span>
+ <% if(lastchangeuserprofile) { %>
+ <span class="ui-lastchangeuser">&thinsp;<i class="ui-user-icon small" style="background-image: url(<%- lastchangeuserprofile.photo %>);" data-toggle="tooltip" data-placement="right" title="<%- lastchangeuserprofile.name %>"></i></span>
+ <% } else { %>
+ <span class="ui-no-lastchangeuser">&thinsp;<i class="fa fa-clock-o"></i></span>
+ <% } %>
+ &nbsp;<span class="text-uppercase">changed</span>
+ <span class="ui-lastchange text-uppercase"><%- 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>
</div>
- <div id="doc" class="container markdown-body">
-<%- body %>
- </div>
+ <div id="doc" class="container markdown-body"><%- body %></div>
<div class="ui-toc dropup unselectable hidden-print" style="display:none;">
<div class="pull-right dropdown">
<a id="tocLabel" class="ui-toc-label btn btn-default" data-target="#" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" title="Table of content">
@@ -60,9 +69,11 @@
<% if(useCDN) { %>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" defer></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.4.6/js-yaml.min.js" defer></script>
<% } else { %>
<script src="<%- url %>/vendor/jquery/dist/jquery.min.js"></script>
<script src="<%- url %>/vendor/bootstrap/dist/js/bootstrap.min.js" defer></script>
+<script src="<%- url %>/vendor/js-yaml/dist/js-yaml.min.js" defer></script>
<% } %>
<script src="<%- url %>/vendor/lz-string.min.js" defer></script>
<script src="<%- url %>/vendor/remarkable.min.js" defer></script>