Procházet zdrojové kódy

New header navigation

@soyjavi před 14 roky
rodič
revize
ef92435342

+ 28 - 12
examples/test/index.html

@@ -37,16 +37,21 @@
 </head>
 
 <body class="app">
+
+
     <section id="test-1" class="pop">
-        <header data-title="Test-1" class="extended">
+        <header class="extended">
+            <nav class="onleft">
+                <a href="#kitchen-sink-scroll" class="active" data-target="aside" data-icon="home"></a>
+            </nav>
             <div class="onleft">
-                <a href="#kitchen-sink-scroll" class="button default onleft" data-target="aside" data-icon="items"></a>
-                <a href="#kitchen-sink-scroll" class="button onleft" data-target="aside" data-icon="items">Prueba</a>
-                <a href="#kitchen-sink-scroll" class="button onleft" data-target="aside">Prueba</a>
+                <span class="title with-subtitle">Javi Jiménez</span>
+                <span class="subtitle ">@souhavi</span>
             </div>
             <nav class="onright">
-                <a href="#" class="active" data-icon="star"></a>
-                <a href="#profiles" class="active"  data-target="aside" data-icon="plus">&nbsp;Add</a>
+                <a href="#profiles" class="active" data-target="aside" data-icon="plus"></a>
+
+                <a href="#" class="active" data-icon="mail" style="background: rgba(0, 255, 0, 0.4);"data-label="ENVIAR"></a>
             </nav>
         </header>
 
@@ -126,9 +131,9 @@
 
         <article id="nav-2" class="list indented">
             <div>
-                <a href="#test-2" data-target="section" class="button big">Test 2</a>
-                <a href="#test-2"  class="button big red ">Test 2</a>
-                <a href="#test-2" class="button big facebook">Test 2</a>
+                <a href="#test-2" data-target="section" class="button big" data-icon="check">Test 2</a>
+                <a href="#test-2"  class="button big red " data-icon="check">Test 2</a>
+                <a href="#test-2" class="button big green" data-icon="check">Test 2</a>
             </div>
         </article>
 
@@ -137,10 +142,21 @@
         <article id="nav-4"></article>
     </section>
 
+
+
+
     <section id="test-2" class="pop">
-        <header data-title="Test-2" data-back="home"></header>
-        <article>
-        </article>
+        <header data-title="Auto title centered">
+            <nav class="onleft">
+                <a href="#back" data-target="section" class="current" data-icon="left"></a>
+            </nav>
+
+            <nav class="onright plain">
+                <a href="#" class="" data-icon="items" data-label="Text"></a>
+                <a href="#" class="" data-icon="remove"></a>
+            </nav>
+        </header>
+        <article></article>
     </section>
 
     <!-- Third parties dependencies -->

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/stylesheets/css/Lungo.base.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/stylesheets/css/Lungo.layout.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/stylesheets/css/Lungo.layout.nav.css


+ 20 - 7
src/stylesheets/css/Lungo.theme.default.css

@@ -16,8 +16,9 @@
 }
 /* @group <header> & <footer> & <article> */
 header {
-  border-top-left-radius: 5px;
-  border-top-right-radius: 5px;
+  /*border-top-left-radius: 5px;
+	border-top-right-radius: 5px;*/
+
   border-bottom: 1px solid #1a2838;
   background: #2c8bca -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2c8bca), color-stop(100%, #154f93));
   box-shadow: inset 0 1px 0 #64b9e2, inset 0 -1px 0 #2566a4;
@@ -47,12 +48,24 @@ article .title {
 }
 /* @end */
 /* @group <nav> */
-nav a {
-  color: rgba(255, 255, 255, 0.5);
-}
-nav a.current,
-nav a.active {
+header nav a {
   color: #ffffff;
+  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
+}
+header nav:not(.plain) a {
+  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.2), inset -1px 0 0 rgba(0, 0, 0, 0.2);
+}
+header nav:not(.plain) a:active {
+  box-shadow: inset 1px 0 1px rgba(0, 0, 0, 0.1), inset -1px 0 0 rgba(0, 0, 0, 0.1), inset 0 0 42px rgba(0, 0, 0, 0.5);
+}
+header nav:not(.plain).onright a {
+  box-shadow: -1px 0 0 rgba(255, 255, 255, 0.2), inset 1px 0 0 rgba(0, 0, 0, 0.2);
+}
+header nav:not(.plain).onright a:active {
+  box-shadow: inset 1px 0 1px rgba(0, 0, 0, 0.1), inset -1px 0 0 rgba(0, 0, 0, 0.1), inset 0 0 42px rgba(0, 0, 0, 0.5);
+}
+header nav.plain a:active {
+  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
 }
 .toolbar a {
   color: #cdd9e3;

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
src/stylesheets/css/Lungo.widgets.button.css


+ 0 - 1
src/stylesheets/less/Lungo.base.less

@@ -83,7 +83,6 @@ video {
 }
 
 a {
-	color: #fff;
 	text-decoration: none;	
 	-webkit-tap-highlight-color: rgba(0,0,0,0);
 }

+ 7 - 24
src/stylesheets/less/Lungo.layout.less

@@ -83,14 +83,14 @@ header, footer  {
 
 header  {
 	top: 0px;
-	& .onleft { margin-left: 4px !important;}
-	& .onright {margin-right: 4px !important;}
+	/*& .onleft { margin-left: 4px !important;}
+	& .onright {margin-right: 4px !important;}*/
 }
 
 footer  { bottom: 0px; }
 
 header .title, footer .title  {
-	margin: 0 4px;	
+	//margin: 0 4px;	
 	z-index: -1;
 	font-size: 15px;
 	font-weight: bold;
@@ -103,11 +103,10 @@ header .title, footer .title  {
 		text-align: center;
 		display: inline-block;
 	}
-}
-
-.with-subtitle {
-	line-height: 20px;
-	padding-top: 4px;
+	&.with-subtitle {
+		line-height: 20px;
+		padding-top: 4px;
+	}
 }
 
 .subtitle {
@@ -115,20 +114,4 @@ header .title, footer .title  {
 	font-size: 11px;
 	line-height: 11px;
 }
-
-/*.title > .subtitle {
-	//line-height: 21px;
-	font-weight: normal;
-	font-size: 12px;
-	height: 12px;
-	line-height: 12px;
-}*/
-
-section header a.button, section footer a.button  {
-	margin: 5px 1px 0px;
-	/*
-	&:first-of-type { margin-left: 4px; }	
-	&:last-child { margin-right: 4px; }
-	*/
-}
 /* @end */

+ 8 - 13
src/stylesheets/less/Lungo.layout.nav.less

@@ -10,16 +10,13 @@
 @import "constants.less";
 @import "mixins.less";
 
-@header_footer_height: 40px;
-	@header_extended_height: 74px;
-
-/* @group <nav> */
 nav {
-	height: inherit;
+	height: auto;
 	text-align: center;
 
 	& a {
 		padding: 0 6px;
+		min-width: 28px;
 		z-index: 1000;
 		float: left;
 
@@ -38,11 +35,11 @@ nav {
 
 		& abbr {
     		position: relative;
-    		margin-left: 2px;
-			display: none;
+			display: inline;
+			font-weight: bold;
 		}
-
-		&.current abbr, &.active abbr { display: inline; }
+		
+		.icon ~ abbr { margin-left: 4px; }
 	}
 
 	& .bubble {
@@ -65,8 +62,7 @@ nav {
 		padding: 0;
 		height:  36px;
 	}
-
-
+	
 	&.with-labels {
 		height: @with-labels-height;
 
@@ -115,5 +111,4 @@ nav {
     z-index: 2;
 
     & a { padding: 0px; font-weight: bold;}
-}
-/* @end */
+}

+ 23 - 5
src/stylesheets/less/Lungo.theme.default.less

@@ -36,8 +36,8 @@
 
 /* @group <header> & <footer> & <article> */
 header {
-	border-top-left-radius: 5px;
-	border-top-right-radius: 5px;
+	/*border-top-left-radius: 5px;
+	border-top-right-radius: 5px;*/
 	border-bottom: 1px solid #1a2838;
 	
 	background: @background-main;
@@ -77,9 +77,27 @@ article {
 /* @end */
 
 /* @group <nav> */
-nav a {
-	color: rgba(255,255,255,0.5);
-	&.current, &.active {  color: @white; }
+@nav-a-active: inset 1px 0 1px rgba(0,0,0,0.1), inset -1px 0 0 rgba(0,0,0,0.1), inset 0 0 42px rgba(0,0,0,0.5);
+header nav {
+	
+	& a {
+		color: @white;
+		text-shadow: 0 1px 0 rgba(0,0,0,0.3);
+	}
+	
+	&:not(.plain) {
+		& a {
+			box-shadow: 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.2);
+			&:active { box-shadow: @nav-a-active; }
+		}
+			
+		&.onright a {
+			box-shadow: -1px 0 0 rgba(255,255,255,0.2), inset 1px 0 0 rgba(0,0,0,0.2);
+			&:active { box-shadow: @nav-a-active }
+		}
+	}
+		
+	&.plain a:active { text-shadow: 0 0 4px rgba(255,255,255,0.5); }
 }
 
 .toolbar a {

+ 10 - 15
src/stylesheets/less/Lungo.widgets.button.less

@@ -12,18 +12,19 @@
 
 a.button {
 	display: inline-block;
-	height: 32px;
-	//min-width: 32px;
-	padding: 0 9px 0 8px;
+	height: 40px;
+	padding: 0 8px;
 	color: #fff !important;
-	outline: none;
 
 	background: #5a5a5a;
-
-	.user-select(none);
-	line-height: 31px;
+	
+	font-size: 16px;
 	text-align: center;
 	text-decoration: none;
+	line-height: 42px;
+	
+	outline: none;
+	.user-select(none);
 
 	&:active, &.active {
 		background: #4b4b4b;
@@ -49,21 +50,15 @@ a.button {
 
 	&.big {
 		width: 100%;
-		height: 40px;
 		padding: 0px;
 		margin-bottom: 4px;
 
-		font-size: 16px;
-		line-height: 42px;
 		& .icon {
-			margin-right: 4px;
+			margin: 8px -18px 0 12px;
+			float: left;
 			font-size: 24px;
 			height: 18px;
 			width: 18px;
 		}
-
-		& img {
-			/* TODO */
-		}
 	}
 }