szurubooru/src/Views/layout-normal.phtml

48 lines
1.7 KiB
PHTML
Raw Normal View History

2013-10-05 12:55:03 +02:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
2013-10-05 21:22:28 +02:00
<?php if (isset($this->context->subTitle)): ?>
<title><?php printf('%s&nbsp;&ndash;&nbsp;%s', $this->context->title, $this->context->subTitle) ?></title>
<?php else: ?>
<title><?php echo $this->context->title ?></title>
<?php endif ?>
2013-10-05 12:55:03 +02:00
</head>
<body>
2013-10-05 19:24:08 +02:00
<nav>
<ul>
<li><a href="<?php echo \Chibi\UrlHelper::route('index', 'index') ?>">Home</a></li>
<li><a href="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>">Browse</a></li>
<li><a href="<?php echo \Chibi\UrlHelper::route('comment', 'list') ?>">Comments</a></li>
<li><a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => 'favmin:1']) ?>">Favorites</a></li>
<li><a href="<?php echo \Chibi\UrlHelper::route('user', 'show', ['name' => $this->context->user->name]) ?>">Account</a></li>
<li><a href="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>">Upload</a></li>
<li>
<form action="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>" method="get">
<input type="search" name="query" placeholder="search&hellip;">
<input type="submit" name="submit" value="Go">
</form>
</li>
<li>
2013-10-05 20:00:13 +02:00
<?php if (!$this->context->loggedIn): ?>
2013-10-05 19:24:08 +02:00
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'login') ?>">Login</a>
&nbsp;or&nbsp;
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'register') ?>">register</a>
<?php else: ?>
<?php echo $this->context->user->name ?>
&nbsp;
<a href="<?php echo \Chibi\UrlHelper::route('auth', 'logout') ?>">
Logout
</a>
<?php endif ?>
</li>
</ul>
</nav>
2013-10-05 12:55:03 +02:00
2013-10-05 19:24:08 +02:00
<section>
<?php echo $this->renderView() ?>
</section>
2013-10-05 12:55:03 +02:00
</body>
</html>