Commits

Christoffer Niska committed 34b4cd8

Updated the demo.

Comments (0)

Files changed (4)

demo/less/styles.less

 @imageUrl: "../../../demo/images/";
 
 body {
-	padding-top: 60px;
+	padding-top: 100px;
 	padding-bottom: 40px;
 }
 
 	margin-bottom: 0.6em;
 }
 
+.subnav {
+    border: 1px solid #E5E5E5;
+    .border-radius(4px);
+    .size(36px, 100%);
+    #gradient > .vertical(#F5F5F5, #EEE);
+
+    &.subnav-fixed {
+        border-color: #D5D5D5;
+        border-width: 0 0 1px;
+        left: 0;
+        position: fixed;
+        right: 0;
+        top: 40px;
+        z-index: 1030;
+		.border-radius(0);
+		.box-shadow(inset 0 1px 0 #FFF, 0 1px 5px rgba(0, 0, 0, .1));
+    }
+
+    .nav {
+        margin: 0 auto;
+        width: 1170px;
+
+        & > li > a {
+            margin: 0;
+            padding-top: 11px;
+            padding-bottom: 11px;
+            border-left: 1px solid whiteSmoke;
+            border-right: 1px solid #E5E5E5;
+            .border-radius(0);
+        }
+        
+        & > li:first-child > a {
+            border-left: 0;
+        }
+        
+        & > li:last-child > a {
+            border-right: 0;
+        }
+        
+        & > .active >a, & .action > a:hover {
+            background-color: #E9E9E9;
+            border-right-color: #DDD;
+            color: #777;
+            .box-shadow(inset 0 3px 5px rgba(0, 0, 0, .05));
+        }
+    }
+}
+
 footer {
 	.powered {
 		color: #888;
 }
 
 section {
-	padding-top: 50px;
+	padding-top: 80px;
 
 	a.top {
 		display: block;
 	font-weight: bold;
 }
 
-#subnav {
-	left: 20px;
-	position: fixed;
-	top: 60px;
-	width: 270px;
-}
-
 // POST-IMPORTS
 
 // Responsive style must be included after the body padding has been set.

demo/protected/views/layouts/main.php

 	),
 )); ?>
 
+
+<div class="subnav subnav-fixed">
+
+	<?php $this->widget('bootstrap.widgets.BootMenu', array(
+		'type'=>'pills',
+		//'scrollspy'=>array('offset'=>50),
+		'items'=>array(
+			array('label'=>'BootAlert', 'url'=>'#bootAlert'),
+			array('label'=>'BootCrumb', 'url'=>'#bootCrumb'),
+			array('label'=>'BootNavbar', 'url'=>'#bootNavbar'),
+			array('label'=>'BootMenu', 'url'=>'#bootMenu'),
+			array('label'=>'BootTabbed', 'url'=>'#bootTabbed'),
+			array('label'=>'BootDetailView', 'url'=>'#bootDetailView'),
+			array('label'=>'BootGridView', 'url'=>'#bootGridView'),
+			array('label'=>'BootThumbs', 'url'=>'#bootThumbs'),
+			array('label'=>'BootTooltip', 'url'=>'#bootTooltip'),
+			array('label'=>'BootPopover', 'url'=>'#bootPopover'),
+			array('label'=>'BootModal', 'url'=>'#bootModal'),
+			array('label'=>'BootActiveForm', 'url'=>'#bootActiveForm'),
+		),
+	)); ?>
+
+</div>
+
 <div class="container">
 
 	<div class="hero-unit">

demo/protected/views/site/index.php

 
 	</section>
 
-</div>
-
-<aside id="subnav" class="well" style="padding: 8px 0;">
-
-	<?php $this->widget('bootstrap.widgets.BootMenu', array(
-		'type'=>'list',
-		//'scrollspy'=>array('offset'=>50),
-		'items'=>array(
-			array('label'=>'WIDGETS', 'itemOptions'=>array('class'=>'nav-header')),
-			array('label'=>'BootAlert', 'url'=>'#bootAlert'),
-			array('label'=>'BootCrumb', 'url'=>'#bootCrumb'),
-			array('label'=>'BootNavbar', 'url'=>'#bootNavbar'),
-			array('label'=>'BootMenu', 'url'=>'#bootMenu'),
-			array('label'=>'BootTabbed', 'url'=>'#bootTabbed'),
-			array('label'=>'BootDetailView', 'url'=>'#bootDetailView'),
-			array('label'=>'BootGridView', 'url'=>'#bootGridView'),
-			array('label'=>'BootThumbs', 'url'=>'#bootThumbs'),
-			array('label'=>'BootTooltip', 'url'=>'#bootTooltip'),
-			array('label'=>'BootPopover', 'url'=>'#bootPopover'),
-			array('label'=>'BootModal', 'url'=>'#bootModal'),
-			array('label'=>'BootActiveForm', 'url'=>'#bootActiveForm'),
-		),
-	)); ?>
-
-</aside>
+</div>

widgets/BootActiveForm.php

 		parent::init();
 	}
 
-/**
+	/**
 	 * Renders a checkbox input row.
 	 * @param CModel $model the data model
 	 * @param string $attribute the attribute