|
|
@@ -27,16 +27,55 @@ use \lithium\security\Auth;
|
|
|
</head>
|
|
|
<header>
|
|
|
<?php
|
|
|
+ $links = array(
|
|
|
+ 'Home' => '/',
|
|
|
+ 'Anime' => '/anime',
|
|
|
+ 'Manga' => '/manga',
|
|
|
+ );
|
|
|
$user = Auth::check('default');
|
|
|
if ($user)
|
|
|
{
|
|
|
- echo $this->_render('element', 'authnav', compact('user'));
|
|
|
+ $links['Feed'] = '/users/feed';
|
|
|
+ $links['Profile'] = '/users/feed';
|
|
|
+ $links['Logout'] = '/logout';
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- echo $this->_render('element', 'normalnav', compact('user'));
|
|
|
+ $links['Sign up'] = '/users/signup';
|
|
|
+ $links['Login'] = '#login';
|
|
|
+ echo '
|
|
|
+ <div id="login" style="display: none">
|
|
|
+ <h2>Login</h2>
|
|
|
+ ';
|
|
|
+ echo $this->form->create(null, array('url' => '/login', 'id' => 'login'));
|
|
|
+ echo $this->form->field('username', array('type' => 'textbox'));
|
|
|
+ echo $this->form->field('password', array('type' => 'password'));
|
|
|
+ echo $this->form->submit('Login');
|
|
|
+ echo $this->form->end();
|
|
|
+ echo '</div>';
|
|
|
}
|
|
|
+ echo '
|
|
|
+ <nav>
|
|
|
+ <ul>
|
|
|
+ ';
|
|
|
+ foreach ($links as $name => $path) {
|
|
|
+ if ($path == '/')
|
|
|
+ echo '<li class="current">';
|
|
|
+ else
|
|
|
+ echo '<li>';
|
|
|
+ echo "<a href=\"$path\">$name</a></li>";
|
|
|
+ }
|
|
|
+ echo '
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+ ';
|
|
|
?>
|
|
|
+
|
|
|
+ <?= $this->form->create(null, array('url' => '/search/index/anime', 'class' => 'search', 'method' => 'get')); ?>
|
|
|
+ <?= $this->form->text('search', array('value' => 'Search...', 'onFocus' => 'clearDefault(this)', 'style' => 'width: 200px')); ?>
|
|
|
+ <input type="submit" value="Go">
|
|
|
+ <?= $this->form->end(); ?>
|
|
|
+
|
|
|
<br class="cl" />
|
|
|
</header>
|
|
|
<div id="page">
|