Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions views/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,30 +61,30 @@
<div class="nav">
<ul class="nav navbar-nav">

<? if(session('me')) { ?>
<?php if(session('me')) { ?>
<li><a href="/editor">Editor</a></li>
<li><a href="/new">Note</a></li>
<li><a href="/bookmark">Bookmark</a></li>
<li><a href="/favorite">Favorite</a></li>
<li><a href="/photo">Photo</a></li>
<li><a href="/email">Email</a></li>
<? } ?>
<?php } ?>

<li><a href="/docs">Docs</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<? if(session('me')) { ?>
<?php if(session('me')) { ?>
<li><a href="/settings"><?= preg_replace(array('/https?:\/\//','/\/$/'),'',session('me')) ?></a></li>
<li><a href="/signout">Sign Out</a></li>
<? } else if(property_exists($this, 'authorizing')) { ?>
<?php } else if(property_exists($this, 'authorizing')) { ?>
<li class="navbar-text"><?= $this->authorizing ?></li>
<? } else { ?>
<?php } else { ?>
<form action="/auth/start" method="get" class="navbar-form">
<input type="text" name="me" placeholder="yourdomain.com" class="form-control" />
<button type="submit" class="btn">Sign In</button>
<input type="hidden" name="redirect_uri" value="https://<?= $_SERVER['SERVER_NAME'] ?>/indieauth" />
</form>
<? } ?>
<?php } ?>

</ul>
</div>
Expand Down
14 changes: 7 additions & 7 deletions views/photo.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@

<div class="form-group">
<label for="note_content"><code>content</code> (optional)</label>
<textarea name="note_content" id="note_content" value="" class="form-control" style="height: 4em;"><? if(isset($this->note_content)) echo $this->note_content ?></textarea>
<textarea name="note_content" id="note_content" value="" class="form-control" style="height: 4em;"><?php if(isset($this->note_content)) echo $this->note_content ?></textarea>
</div>

<button class="btn btn-success" id="btn_post">Post</button>

<div style="clear:both;"></div>
</form>

<? if(!empty($this->location)): ?>
<?php if(!empty($this->location)): ?>
<div class="alert alert-success">
<strong>Success!</strong> Photo posted to: <em><a href="<?= $this->location ?>"><?= $this->location ?></a></em>
</div>
<? endif ?>
<?php endif ?>

<? if(!empty($this->error)): ?>
<?php if(!empty($this->error)): ?>
<div class="alert alert-danger">
<strong>Error:</strong> <em><?= $this->error ?></em>
</div>
<? endif ?>
<?php endif ?>

<? if(!empty($this->response)): ?>
<?php if(!empty($this->response)): ?>
<h4>Response:</h4>
<pre><?= $this->response ?></pre>
<? endif ?>
<?php endif ?>
</div>
<script>
$(function(){
Expand Down