Browse Source

show logged-in user on editor

fixes #9
pull/64/head
Aaron Parecki 8 years ago
parent
commit
ab0c5f9bfa
No known key found for this signature in database GPG Key ID: 276C2817346D6056
4 changed files with 12 additions and 14 deletions
  1. +3
    -1
      controllers/editor.php
  2. +1
    -1
      public/editor-files/style.css
  3. +7
    -11
      views/editor.php
  4. +1
    -1
      views/layout.php

+ 3
- 1
controllers/editor.php View File

@ -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);
}
});

+ 1
- 1
public/editor-files/style.css View File

@ -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;

+ 7
- 11
views/editor.php View File

@ -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>

+ 1
- 1
views/layout.php View File

@ -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>

Loading…
Cancel
Save