Archived
1
0
Fork 0

updated design

This commit is contained in:
H Hautakoski 2010-09-11 21:26:05 +02:00
parent 9779dbf5ba
commit 3a88c6c433
6 changed files with 129 additions and 108 deletions

View file

@ -10,9 +10,11 @@
<body>
<div id="wrapper" class="small">
<div id="header"></div>
<div id="header">
<a href="http://<?=$this->app['url'] ?>"><span id="logo"></span></a>
</div>
<div id="nav">
<div id="nav"<?= ($this->renderMenu()->hasSubmenu()) ? ' class="wsub"' : '' ?>>
<?=$this->renderMenu() ?>
<span class="float-right">
<?=$this->authLink() ?>
@ -21,9 +23,8 @@
<a href="<?=$this->url(array('lang' => 'en')) ?>">en</a>
</span>
</div>
<div id="subnav">
<?=$this->renderSubMenu() ?>
</div>
<?=$this->renderSubMenu() ?>
<br/>

View file

@ -2,18 +2,30 @@
class Fiktiv_View_Helper_RenderMenu extends Zend_View_Helper_Abstract
{
public function renderMenu()
public function hasSubmenu()
{
$navigation = $this->view->navigation();
$container = $navigation->getContainer();
$active = $navigation->menu()->findActive($navigation->getContainer());
if ($active && $active['page']->hasPages()) {
$class = 'b';
} else {
$class = 'navigation';
return true;
}
return false;
}
return $navigation->menu()->setMaxDepth(0)->setUlClass($class)->renderMenu();
public function renderMenu()
{
return $this;
}
public function __toString()
{
return $this->_render();
}
private function _render()
{
return $this->view->navigation()->menu()->setMaxDepth(0)->setUlClass('')->renderMenu();
}
}

View file

@ -9,7 +9,7 @@ class Fiktiv_View_Helper_RenderSubMenu extends Zend_View_Helper_Abstract
$active = $navigation->menu()->findActive($navigation->getContainer());
if ($active && $active['page']->hasPages()) {
return $navigation->menu()->setUlClass('b')->renderSubMenu();
return $navigation->menu()->setUlClass('subnav')->renderSubMenu();
}
return '';

View file

@ -33,151 +33,166 @@ img { border: 0; margin: 0; padding: 0; }
form { margin: 0; }
label {
text-align: right;
width: 80px;
height: 20px;
float: left;
text-align: right;
width: 80px;
padding: 5px .6em;
margin: 2px 0;
float: left;
}
label.required { font-weight: bold; }
label.optional { color: gray }
input[type="text"],
input[type="password"],
textarea {
color: #555;
width: 200px;
background-image: url('../img/elements/textbox.png');
background-repeat: repeat-x;
background-position: top;
border: 1px solid #ccc;
margin: .2em;
padding: 5px 3px;
width: 200px;
background-image: url('../img/elements/textbox.png');
background-repeat: repeat-x;
background-position: top;
border: 1px solid #ccc;
margin: .2em;
padding: 5px 3px;
}
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
color: black;
background: white;
border: 1px solid #999;
background: white;
border: 1px solid #999;
}
textarea {
height: 80px;
overflow: auto;
height: 80px;
overflow: auto;
}
div#wrapper {
padding: 0 25px;
margin: 0 auto 75px;
padding: 0 25px;
margin: 0 auto 75px;
}
div#wrapper.small {
width: 780px;
}
#header {
div#header { height: 80px; }
div#header span#logo {
display: block;
background: url('../img/header.png') no-repeat;
height: 80px;
width: 200px;
height: 45px;
position: relative;
top: 25px;
left: 10px;
}
/* Navigation */
#nav {
background: url('../img/menu.png');
background: url('../img/menu.png') repeat-x;
color: white;
height: 22px;
padding: 8px 12px 0;
-moz-border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-khtml-border-radius: 8px;
behavior: url('css/border-radius.htc');
border-radius: 8px;
}
#nav.wsub {
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
ul.subnav {
background: url('../img/submenu.png') repeat-x;
height: 20px;
padding: 5px 12px 0;
border-style: solid;
border-color: #ccc;
border-width: 0 1px 1px 1px;
-webkit-border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-bottomright: 8px;
-moz-border-radius-bottomleft: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}
#nav a {
color: white;
font-weight: bold;
}
#nav ul.navigation {
float: left;
list-style: none;
ul.subnav, ul.subnav a {
color: #444;
}
#nav ul.navigation li {
#nav ul { float: left; }
#nav ul li,
ul.subnav li {
display: inline;
margin: 0 1.4em 0 0;
margin: 0 1.2em 0 0;
text-transform : capitalize;
}
#nav ul.navigation li.active,
#nav a:hover {
text-decoration: underline;
}
#footer {
border-top: 1px solid #bcbcbc;
height: 20px;
text-align: center;
padding: 8px 15px 0;
margin: 25px auto auto;
}
#footer, #footer a { color: #999; }
#footer #quick-nav {
float: right;
}
#footer #info {
float: left;
}
#wrapper {
margin: 0 6px;
#nav li.active a,
#nav li a:hover,
ul.subnav li.active a,
ul.subnav li a:hover {
text-decoration: underline;
}
/* Message */
div.test {
background: #bcbcbc;
height: 25px;
border: 0px solid white;
}
p.message, p.notify, p.bail {
padding: 8px;
margin: 0px auto 18px;
text-align: center;
width: 480px;
padding: 8px;
margin: 0px auto 18px;
text-align: center;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
p.message {
background: #fdf6d4;
border: 3px solid #eae5ce;
background: #d6e4ff;
border: 1px solid #5F78A9;
}
p.notify {
background: #ffffcc;
border: 1px solid #ffd700;
background: #ffffcc;
border: 1px solid #ffd700;
}
p.bail {
background: #fdc4c4;
border: 1px solid #fc9595;
background: #fdc4c4;
border: 1px solid #fc9595;
}
/* Font Colors */
.white { color: white }
.black { color: black }
.gray { color: gray }
.red { color: red }
.green { color: green }
.blue { color: blue }
.yellow { color: yellow }
.purple { color: purple }
/* Alignment */
.float-left { float: left; }
.float-right { float: right; }
.clear { clear: both; }
.center { text-align: Center; }
.center { text-align: center; }
/* Index */
@ -194,33 +209,6 @@ div#foreword a {
border: 1px solid #d6dbe3;
}
/* forms */
form#login {
/*background: url('img/login-form-head.png') no-repeat;
background-color: #9eb1d2;
border: 1px solid #f3f3f3;
background: #fcfcfc;*/
padding: 5px;
width: 265px;
}
form#login td input {
padding: 2px;
}
form#login td {
padding: 2px 4px;
}
form#login div {
background: url('img/login-form-head.png') no-repeat;
}
form#reg table {
margin: 15px auto;
}
/* Grid */
table.grid { padding: 8px; }
@ -243,3 +231,23 @@ div#agrement {
margin: 0 auto 15px;
border: 1px solid #f1f1f1;
}
/* Footer */
#footer {
border-top: 1px solid #bcbcbc;
height: 20px;
text-align: center;
padding: 8px 15px 0;
margin: 25px auto auto;
}
#footer, #footer a { color: #999; }
#footer #quick-nav {
float: right;
}
#footer #info {
float: left;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 5.7 KiB

Before After
Before After

BIN
public/img/submenu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB