summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2016-12-17 16:00:26 -0800
committerAaron Parecki <aaron@parecki.com>2016-12-17 16:00:26 -0800
commitab0c5f9bfabacbf737cec3fb5796ce66dd37d877 (patch)
treeed5393b79a4dd6cd66d639920d76c0ad75459628
parent0a662e33ee432e2583a934cb161a0a1e5b49b76f (diff)
show logged-in user on editor
fixes #9
-rw-r--r--controllers/editor.php4
-rw-r--r--public/editor-files/style.css2
-rw-r--r--views/editor.php18
-rw-r--r--views/layout.php2
4 files changed, 12 insertions, 14 deletions
diff --git a/controllers/editor.php b/controllers/editor.php
index c880a00..3818328 100644
--- a/controllers/editor.php
+++ b/controllers/editor.php
@@ -2,7 +2,9 @@
$app->get('/editor', function() use($app) {
if($user=require_login($app)) {
- $html = $app->render('editor.php');
+ $html = $app->render('editor.php', [
+ 'user' => $user
+ ]);
$app->response()->body($html);
}
});
diff --git a/public/editor-files/style.css b/public/editor-files/style.css
index e5b14b5..9bb8042 100644
--- a/public/editor-files/style.css
+++ b/public/editor-files/style.css
@@ -75,7 +75,7 @@ img { border: 0; }
.toolbar-left .logo {
vertical-align: middle;
}
-#draft-status {
+.toolbar .item.text {
color: #aaa;
font-family: sans-serif;
font-size: 16px;
diff --git a/views/editor.php b/views/editor.php
index 44b2987..78b1858 100644
--- a/views/editor.php
+++ b/views/editor.php
@@ -3,8 +3,8 @@
<head>
<title>Quill Editor</title>
<meta charset="utf-8">
- <link rel="pingback" href="http://webmention.io/aaronpk/xmlrpc" />
- <link rel="webmention" href="http://webmention.io/aaronpk/webmention" />
+ <link rel="pingback" href="https://webmention.io/aaronpk/xmlrpc" />
+ <link rel="webmention" href="https://webmention.io/aaronpk/webmention" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- standard viewport tag to set the viewport to the device's width
@@ -44,6 +44,7 @@
<div class="toolbar">
<div class="toolbar-left">
<span class="item"><a href="/"><img src="/editor-files/quill-logo-36.png" width="36" height="31" class="logo"></a></span>
+ <span class="item text"><b><?= display_url($this->user->url) ?></b></span>
<span class="item text"><span id="draft-status">Draft</span></span>
</div>
<div class="toolbar-right">
@@ -69,8 +70,10 @@
<div style="clear:right;"></div>
<div class="helptext" id="publish-help">
- <div>Clicking "Publish Now" will send a request to your Micropub endpoint.</div><br>
- <div>The request will include two fields, "name" and "content", where the content will be the full HTML for this post.</div>
+ <div style="font-size:0.8em;">
+ Clicking "Publish Now" will send a request to your Micropub endpoint.<br><br>
+ The request will include two fields, "name" and "content", where the content will be the full HTML for this post.
+ </div>
</div>
<div class="helptext hidden" id="publish-in-progress">
@@ -78,7 +81,6 @@
</div>
<div class="helptext hidden" id="publish-success">
- <div>It worked! The post is on your site!</div><br>
<div><a href="" id="publish-success-url">View your post</a></div>
</div>
@@ -100,12 +102,6 @@
<div id="content" class="editable"></div>
</div>
-<div id="new_version_available">
- <div class="inner">
- There is a new version available! Refresh to load the new version.
- </div>
-</div>
-
<script src="/editor-files/editor.js"></script>
</body>
diff --git a/views/layout.php b/views/layout.php
index 9fad319..0553f63 100644
--- a/views/layout.php
+++ b/views/layout.php
@@ -75,7 +75,7 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<?php if(session('me')) { ?>
- <li><a href="/settings">⚙ <?= preg_replace(array('/https?:\/\//','/\/$/'),'',session('me')) ?></a></li>
+ <li><a href="/settings">⚙ <?= display_url(session('me')) ?></a></li>
<li><a href="/signout">Sign Out</a></li>
<?php } else if(property_exists($this, 'authorizing')) { ?>
<li class="navbar-text"><?= $this->authorizing ?></li>