From 1ce0c238258c99bb56e45595197dd63dd1947b44 Mon Sep 17 00:00:00 2001 From: raylu Date: Sun, 3 Jul 2011 18:47:10 -0700 Subject: get rid of separate nav elements --- views/elements/authnav.html.php | 23 --------------------- views/elements/normalnav.html.php | 24 ---------------------- views/layouts/default.html.php | 43 +++++++++++++++++++++++++++++++++++++-- webroot/css/base.css | 17 +++++++--------- 4 files changed, 48 insertions(+), 59 deletions(-) delete mode 100644 views/elements/authnav.html.php delete mode 100644 views/elements/normalnav.html.php diff --git a/views/elements/authnav.html.php b/views/elements/authnav.html.php deleted file mode 100644 index 012ddde..0000000 --- a/views/elements/authnav.html.php +++ /dev/null @@ -1,23 +0,0 @@ - - -form->create(null, array('url' => '/search/index/anime', 'class' => 'search', 'method' => 'get')); ?> -form->text('search', array('value' => 'Search...', 'onFocus' => 'clearDefault(this)', 'style' => 'width: 200px')); ?> - -form->end(); ?> - - diff --git a/views/elements/normalnav.html.php b/views/elements/normalnav.html.php deleted file mode 100644 index ae8583e..0000000 --- a/views/elements/normalnav.html.php +++ /dev/null @@ -1,24 +0,0 @@ - - -form->create(null, array('url' => '/search/index/anime', 'class' => 'search', 'method' => 'get')); ?> -form->text('search', array('value' => 'Search...', 'onFocus' => 'clearDefault(this)', 'style' => 'width: 200px')); ?> - -form->end(); ?> - - diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index b53d02a..bb918ce 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -27,16 +27,55 @@ use \lithium\security\Auth;
'/', + '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 ' + '; } + echo ' + + '; ?> + + form->create(null, array('url' => '/search/index/anime', 'class' => 'search', 'method' => 'get')); ?> + form->text('search', array('value' => 'Search...', 'onFocus' => 'clearDefault(this)', 'style' => 'width: 200px')); ?> + + form->end(); ?> +
diff --git a/webroot/css/base.css b/webroot/css/base.css index addd2e8..0e7649a 100644 --- a/webroot/css/base.css +++ b/webroot/css/base.css @@ -194,20 +194,19 @@ img.fr { nav { float: left; } -#nav { +nav ul { line-height: 100%; margin: 0 auto; padding: 10px; width: 100%; } -#nav li { +nav ul li { display: inline-block; list-style: none; z-index: 100; margin-left: 15px; } -/* main level link */ -#nav a { +nav a { font-weight: bold; text-decoration: none; display: block; @@ -216,12 +215,11 @@ nav { -webkit-border-radius: 3px; -moz-border-radius: 3px; } -#nav a:hover { +nav a:hover { background: #000; color: #000; } -/* main level link hover */ -#nav .current a, #nav li:hover > a { +nav .current a, nav li:hover > a { background: #e5e5e5; color: #444; border-top: solid 1px #cccccc; @@ -231,14 +229,13 @@ nav { padding:7px 11px 8px; text-shadow:0 1px 0 #FFFFFF; } -/* rounded corners of first and last link */ -#nav ul li:first-child > a { +nav ul li:first-child > a { -webkit-border-top-left-radius: 3px; -moz-border-radius-topleft: 3px; -webkit-border-top-right-radius: 3px; -moz-border-radius-topright: 3px; } -#nav ul li:last-child > a { +nav ul li:last-child > a { -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-right-radius: 3px; -- cgit v1.2.3