From b9aa2a0396aa5f7db439bc362952f7710c7c24e9 Mon Sep 17 00:00:00 2001 From: raylu Date: Sun, 3 Jul 2011 04:30:08 -0700 Subject: rearrange the header and get rid of wrapper --- views/elements/authnav.html.php | 50 +++++------- views/elements/normalnav.html.php | 62 +++++---------- views/layouts/default.html.php | 155 ++++++++++++++++---------------------- 3 files changed, 99 insertions(+), 168 deletions(-) (limited to 'views') diff --git a/views/elements/authnav.html.php b/views/elements/authnav.html.php index e2f3d99..9b0af38 100644 --- a/views/elements/authnav.html.php +++ b/views/elements/authnav.html.php @@ -1,39 +1,23 @@ + +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(); ?> + \ No newline at end of file + form->create(); ?> + form->field('username', array('type' => 'textbox')); ?> + form->submit('Add'); ?> + form->end(); ?> + diff --git a/views/elements/normalnav.html.php b/views/elements/normalnav.html.php index c700aba..28eeeff 100644 --- a/views/elements/normalnav.html.php +++ b/views/elements/normalnav.html.php @@ -1,50 +1,24 @@ - - + +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(); ?> + \ No newline at end of file +

Login

+ form->create(null, array('url' => '/login', 'id' => 'login')); ?> + form->field('username', array('type' => 'textbox')); ?> + form->field('password', array('type' => 'password')); ?> + form->submit('Login'); ?> + form->end(); ?> + diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index 2ca3fc9..e7a26fa 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -1,108 +1,81 @@ - + - html->charset();?> - OtakuHub > <?php echo $this->title(); ?> - html->style(array('style', 'base', 'grid')); ?> - html->style(array('themes/light', 'themes/green')); ?> - html->style(array('prettyPhoto')); ?> - - - html->style(array('jquery.tagsinput')); ?> - html->script("/js/jquery.tagsinput.min.js"); ?> + html->charset() ?> + OtakuHub > <?= $this->title() ?> + html->style(array('style', 'base', 'grid')) ?> + html->style(array('themes/light', 'themes/green')) ?> + html->style(array('prettyPhoto')) ?> + + html->style(array('jquery.tagsinput')) ?> + html->script("/js/jquery.tagsinput.min.js") ?> - html->link('Icon', null, array('type' => 'icon')); ?> + function clearDefault(el) { + if (el.defaultValue == el.value) + el.value = "" + } + function resetValue(el) { + el.value = "Search..." + } + + html->link('Icon', null, array('type' => 'icon')) ?> - -
-
- -

Kameleon

- - - -_render('element', 'authnav', compact('user')); - } - else { - echo $this->_render('element', 'normalnav', compact('user')); - } - ?> - -
+
+ _render('element', 'authnav', compact('user')); + } + else + { + echo $this->_render('element', 'normalnav', compact('user')); + } + ?> +
- -
- content(); ?> -
- - - - - - - - - - - - - html->script("/js/jquery.anchor.js"); ?> - html->script("/js/jquery.prettyPhoto.js"); ?> +
+ content() ?> +
+ + + + + + + + +html->script("/js/jquery.anchor.js"); ?> +html->script("/js/jquery.prettyPhoto.js"); ?> - scripts(); ?> - +scripts(); ?> + - + -- cgit v1.2.3