Przeglądaj źródła

BETA for article.indented

@soyjavi 14 lat temu
rodzic
commit
a63e20413e

+ 43 - 10
examples/test_src/index.html

@@ -33,15 +33,48 @@
 </head>
 
 <body class="app">
-    <section id="login" class="splash">
-		<article>
-			<h1>Lungo<span class="semi-opacity">js</span></h1>
-			<div class="form">
-				<input type="text" placeholder="Type your user"/>
-				<input type="password" placeholder="Type your password"/>
-				<a href="#demo" data-target="section" class="button big blue" data-icon="play">Go to demo!</a>
-			</div>
-			<div class="copyright">Copyright TapQuo Inc, 2011</div>
+    <section id="test-spaced">
+        <header data-title="test rounded"></header>
+		<article class="list indented">
+		    <scroll id="prueba">
+		        <div>
+		    <ul>
+	            <li><a href="#demo_header_footer" data-target="section" class="arrow" data-icon="wifi">
+    				<strong>Header + Footer + Articles</strong><small>paodapod</small></a></li>
+			
+    			<li><a href="#demo_toolbar" data-target="section" class="arrow" data-icon="download">
+    				<strong>Toolbar</strong><small>Toolbar</small></a></li>
+    			<li><a href="#demo_list" data-target="section" class="arrow" id="load_list" data-icon="note">
+                    <div class="bubble highlight">3 types</div>
+    				<strong>Lists</strong>
+    				<small>paodapod</small></a></li>
+    			<li class="toolbar contrasted">
+                    <nav>
+                        <a href="#list_sample" data-target="article" class="current" data-icon="note"></a>
+        				<a href="#list_grouped_sample" data-target="article" data-icon="folder"></a>
+        				<a href="#list_info_sample" data-target="article" data-icon="cloudup"></a>
+        				<a href="#x" data-target="article" data-icon="cloudup"></a>
+                    </nav>
+                </li>
+    	    </ul>
+    	        
+    	    <ul>
+    			<li><a href="#demo_events" data-target="section" class="arrow" data-icon="user">
+    					<strong>Events handler</strong><small>paodapod</small></a></li>
+    			<li><a href="#demo_scroll" data-target="section" class="arrow" id="load_scroll_mocks" data-icon="points">
+    					<strong>Scroll</strong><small>paodapod</strong></small></a></li>
+    			<li><a href="#demo_buttons" data-target="section" class="arrow" data-icon="plus">
+    					<strong>Buttons</strong><small>paodapod</small></a></li>
+    			<li><a href="#demo_forms" data-target="section" class="arrow" data-icon="write">
+                    <strong>Forms</strong><small>paodapod</small></a></li>
+    			<li class="anchor" data-icon="key">Tapquo Sugars</li>
+    			
+    			<li><a href="#demo_sugars" data-target="section" data-icon="box">
+    				<strong>Sugars</strong><small>paodapod</small></a></li>
+				
+			</ul>
+			    </div>
+			</scroll>
 		</article>
 	</section>
 
@@ -198,7 +231,7 @@
 		<footer data-title="COUNT:*"></footer>
 		
 		<article id="list_sample" class="list"></article>
-		<article id="list_grouped_sample" class="list"></article>
+		<article id="list_grouped_sample" class="list indented"></article>
 		<article id="list_info_sample" class="list">
 		    <ul>
 		         <li class="info">

+ 270 - 35
src/stylesheets/css/Lungo.layout.css

@@ -1,35 +1,270 @@
-body{height:100%;}
-section{position:absolute;position:fixed;width:100%;height:inherit;z-index:0;-webkit-backface-visibility:hidden;-webkit-transform:translate3d(100%, 0, 0);-moz-transform:translate3d(100%, 0, 0);-ms-transform:translate3d(100%, 0, 0);-o-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);-webkit-transition:-webkit-transform 0.3s ease-in-out;}
-section:first-child{z-index:1;-webkit-transform:translate3d(0%, 0, 0);-moz-transform:translate3d(0%, 0, 0);-ms-transform:translate3d(0%, 0, 0);-o-transform:translate3d(0%, 0, 0);transform:translate3d(0%, 0, 0);}
-section.hide{z-index:0;-webkit-transform:translate3d(-100%, 0, 0);-moz-transform:translate3d(-100%, 0, 0);-ms-transform:translate3d(-100%, 0, 0);-o-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);}
-section.show{z-index:1;-webkit-transform:translate3d(0%, 0, 0);-moz-transform:translate3d(0%, 0, 0);-ms-transform:translate3d(0%, 0, 0);-o-transform:translate3d(0%, 0, 0);transform:translate3d(0%, 0, 0);}
-section.static.hide{-webkit-transform:translate3d(0%, 0, 0);-moz-transform:translate3d(0%, 0, 0);-ms-transform:translate3d(0%, 0, 0);-o-transform:translate3d(0%, 0, 0);transform:translate3d(0%, 0, 0);}
-section.popup{-webkit-transform:translate3d(0, 100%, 0);-moz-transform:translate3d(0, 100%, 0);-ms-transform:translate3d(0, 100%, 0);-o-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);}
-section.popup.show{-webkit-transform:translate3d(0, 0%, 0);-moz-transform:translate3d(0, 0%, 0);-ms-transform:translate3d(0, 0%, 0);-o-transform:translate3d(0, 0%, 0);transform:translate3d(0, 0%, 0);}
-section.popup.hide{-webkit-transform:translate3d(0, -100%, 0);-moz-transform:translate3d(0, -100%, 0);-ms-transform:translate3d(0, -100%, 0);-o-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);}
-header,footer{position:absolute;left:0px;width:100%;height:40px;display:block;z-index:2;line-height:40px;}
-header{top:0px;}
-footer{bottom:0px;}
-header .title,footer .title{float:left;margin:0 8px;font-size:1.3em;}
-header .title{position:absolute;left:0px;width:100%;margin:0px auto;text-align:center;z-index:-1;}
-section header a.button,section footer a.button{margin:4px 3px auto;}
-section header a.button.icon,section footer a.button.icon{width:17px;font-size:1.5em;font-weight:normal;}
-nav{height:inherit;text-align:center;font-weight:normal;}
-nav a{display:inline-block;padding:0 6px;height:inherit;float:left;font-size:2.0em;}
-nav a abbr{position:relative;bottom:3px;margin-left:2px;display:none;font-size:0.5em;font-weight:bold;}
-nav a.current abbr{display:inline;}
-nav a.current{-webkit-transition:all 0.3s ease-in-out;-moz-transition:all 0.3s ease-in-out;-ms-transition:all 0.3s ease-in-out;-o-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;}
-aside{position:absolute;top:0px;bottom:0px;height:auto;width:0px;}
-aside.show{width:256px;}
-header~aside{padding-top:40px;}
-footer~aside{padding-bottom:40px;}
-aside~article{-webkit-transition:left 0.3s ease-in-out;left:0px;}
-aside a{display:block;width:244px;height:40px;padding:0 6px;font-size:1.1em;font-weight:bold;line-height:40px;}
-aside a .icon{width:28px;height:28px;float:left;margin:8px 6px 0 0;font-size:1.9em;line-height:1.0em;text-align:center;}
-@media handheld, only screen and (min-width: 768px){[data-target="aside"]{display:none !important;} aside{width:256px;} aside~article{left:256px;}}article{position:absolute;width:100%;height:auto;top:0px;bottom:0px;display:block;z-index:0;opacity:0;}
-header~article{top:40px;}
-footer~article{bottom:40px;}
-article.current{z-index:1;opacity:1;}
-.toolbar{height:48px;line-height:44px;display:block;}
-.toolbar a{float:left;padding:0;font-size:2.0em;}
-article.aside{left:256px !important;}
+/**
+ * Stylesheet
+ *
+ * @namespace LUNGO
+ * @class Layout
+ *
+ * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
+ */
+/* @group <section> */
+body {
+  height: 100%;
+}
+section {
+  position: absolute;
+  position: fixed;
+  width: 100%;
+  height: inherit;
+  z-index: 0;
+  -webkit-backface-visibility: hidden;
+  -webkit-transform: translate3d(100%, 0, 0);
+  -moz-transform: translate3d(100%, 0, 0);
+  -ms-transform: translate3d(100%, 0, 0);
+  -o-transform: translate3d(100%, 0, 0);
+  transform: translate3d(100%, 0, 0);
+  -webkit-transition: -webkit-transform 0.3s ease-in-out;
+}
+section:first-child {
+  z-index: 1;
+  -webkit-transform: translate3d(0%, 0, 0);
+  -moz-transform: translate3d(0%, 0, 0);
+  -ms-transform: translate3d(0%, 0, 0);
+  -o-transform: translate3d(0%, 0, 0);
+  transform: translate3d(0%, 0, 0);
+}
+section.hide {
+  z-index: 0;
+  -webkit-transform: translate3d(-100%, 0, 0);
+  -moz-transform: translate3d(-100%, 0, 0);
+  -ms-transform: translate3d(-100%, 0, 0);
+  -o-transform: translate3d(-100%, 0, 0);
+  transform: translate3d(-100%, 0, 0);
+}
+section.show {
+  z-index: 1;
+  -webkit-transform: translate3d(0%, 0, 0);
+  -moz-transform: translate3d(0%, 0, 0);
+  -ms-transform: translate3d(0%, 0, 0);
+  -o-transform: translate3d(0%, 0, 0);
+  transform: translate3d(0%, 0, 0);
+}
+section.static.hide {
+  -webkit-transform: translate3d(0%, 0, 0);
+  -moz-transform: translate3d(0%, 0, 0);
+  -ms-transform: translate3d(0%, 0, 0);
+  -o-transform: translate3d(0%, 0, 0);
+  transform: translate3d(0%, 0, 0);
+}
+section.popup {
+  -webkit-transform: translate3d(0, 100%, 0);
+  -moz-transform: translate3d(0, 100%, 0);
+  -ms-transform: translate3d(0, 100%, 0);
+  -o-transform: translate3d(0, 100%, 0);
+  transform: translate3d(0, 100%, 0);
+}
+section.popup.show {
+  -webkit-transform: translate3d(0, 0%, 0);
+  -moz-transform: translate3d(0, 0%, 0);
+  -ms-transform: translate3d(0, 0%, 0);
+  -o-transform: translate3d(0, 0%, 0);
+  transform: translate3d(0, 0%, 0);
+}
+section.popup.hide {
+  -webkit-transform: translate3d(0, -100%, 0);
+  -moz-transform: translate3d(0, -100%, 0);
+  -ms-transform: translate3d(0, -100%, 0);
+  -o-transform: translate3d(0, -100%, 0);
+  transform: translate3d(0, -100%, 0);
+}
+/* @end */
+/* @group <header> & <footer> */
+header, footer {
+  position: absolute;
+  left: 0px;
+  width: 100%;
+  height: 40px;
+  display: block;
+  z-index: 2;
+  line-height: 40px;
+}
+header {
+  top: 0px;
+}
+footer {
+  bottom: 0px;
+}
+header .title, footer .title {
+  float: left;
+  margin: 0 8px;
+  font-size: 1.3em;
+}
+header .title {
+  position: absolute;
+  left: 0px;
+  width: 100%;
+  margin: 0px auto;
+  text-align: center;
+  z-index: -1;
+}
+section header a.button, section footer a.button {
+  margin: 4px 3px auto;
+}
+section header a.button.icon, section footer a.button.icon {
+  width: 17px;
+  font-size: 1.5em;
+  font-weight: normal;
+}
+/* @end */
+/* @group <nav> */
+nav {
+  height: inherit;
+  text-align: center;
+  font-weight: normal;
+}
+nav a {
+  display: inline-block;
+  padding: 0 6px;
+  height: inherit;
+  float: left;
+  font-size: 2.0em;
+}
+nav a abbr {
+  position: relative;
+  bottom: 3px;
+  margin-left: 2px;
+  display: none;
+  font-size: 0.5em;
+  font-weight: bold;
+}
+nav a.current abbr {
+  display: inline;
+}
+nav a.current {
+  -webkit-transition: all 0.3s ease-in-out;
+  -moz-transition: all 0.3s ease-in-out;
+  -ms-transition: all 0.3s ease-in-out;
+  -o-transition: all 0.3s ease-in-out;
+  transition: all 0.3s ease-in-out;
+}
+/* @end */
+/* @group <aside> */
+aside {
+  position: absolute;
+  top: 0px;
+  bottom: 0px;
+  height: auto;
+  width: 0px;
+}
+aside.show {
+  width: 256px;
+}
+header ~ aside {
+  padding-top: 40px;
+}
+footer ~ aside {
+  padding-bottom: 40px;
+}
+aside ~ article {
+  -webkit-transition: left 0.3s ease-in-out;
+  left: 0px;
+}
+aside a {
+  display: block;
+  width: 244px;
+  height: 40px;
+  padding: 0 6px;
+  font-size: 1.1em;
+  font-weight: bold;
+  line-height: 40px;
+}
+aside a .icon {
+  width: 28px;
+  height: 28px;
+  float: left;
+  margin: 8px 6px 0 0;
+  font-size: 1.9em;
+  line-height: 1.0em;
+  text-align: center;
+}
+@media handheld, only screen and (min-width: 768px) {
+  [data-target="aside"] {
+    display: none !important;
+  }
+  aside {
+    width: 256px;
+  }
+  aside ~ article {
+    left: 256px;
+  }
+}
+/* @end */
+/* @group <article> */
+article {
+  position: absolute;
+  width: 100%;
+  height: auto;
+  top: 0px;
+  bottom: 0px;
+  display: block;
+  z-index: 0;
+  opacity: 0;
+}
+header ~ article {
+  top: 40px;
+}
+footer ~ article {
+  bottom: 40px;
+}
+article.current {
+  z-index: 1;
+  opacity: 1;
+}
+article.aside {
+  left: 256px !important;
+}
+article.indented {
+  background-color: #e2e2e2;
+}
+.indented ul, .indented form {
+  margin: 10px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding;
+  background-clip: padding-box;
+  border: 1px solid #c5c5c5;
+  box-shadow: 0px 0px 8px #ccc;
+}
+.indented li:first-child {
+  border-top-left-radius: 4px;
+  border-top-right-radius: 4px;
+}
+.indented li:last-child {
+  border-bottom-left-radius: 4px;
+  border-bottom-right-radius: 4px;
+}
+.list .contrasted {
+  background-color: #f4f4f4 !important;
+  box-shadow: inset 0px 1px 0px #fff;
+}
+.list .toolbar a {
+  box-shadow: 1px 0px 0px #d9d9d9 ;
+}
+.list .toolbar a:last-child {
+  box-shadow: none;
+}
+.list .toolbar a.current {
+  color: #419ad9;
+}
+/* @end */
+.toolbar {
+  height: 48px;
+  line-height: 44px;
+  display: block;
+}
+.toolbar a {
+  float: left;
+  padding: 0;
+  font-size: 2.0em;
+}

+ 10 - 8
src/stylesheets/css/Lungo.theme.default.css

@@ -27,7 +27,7 @@ header {
 }
 footer {
   background: #2c2c2d -webkit-gradient(linear, left top, left bottom, color-stop(0.25, #2c2c2d), color-stop(1, #1c1d1d));
-  -webkit-box-shadow: inset 0px 1px rgba(0, 0, 0, 0.5), 0px -1px 2px rgba(0, 0, 0, 0.4);
+  -webkit-box-shadow: inset 0px 1px rgba(0, 0, 0, 0.5);
 }
 .title {
   color: #fff;
@@ -70,26 +70,27 @@ aside a .icon {
 /* @end */
 /* @group .list */
 .list {
-  background: #c5c5c5;
+  background: #e2e2e2;
+  color: #787878;
 }
 .list li:not(.info) {
   background: #fff;
-  border-bottom: 1px inset #c3c4c6;
+  border-bottom: 1px inset #e6e6e6;
   color: #333;
 }
+.list li:last-child {
+  border-bottom: none;
+}
 .list li.toolbar {
   border-bottom-color: rgba(0, 0, 0, 0.2);
 }
 .list li:not(.toolbar) a {
-  color: #333;
+  color: #787878;
   text-shadow: #fff 0px 1px 1px;
   -webkit-tap-highlight-color: #242525;
 }
 .list strong {
-  color: #2343be;
-}
-.list small {
-  opacity: 0.75;
+  color: #333;
 }
 .list .bubble {
   border: 1px solid rgba(0, 0, 0, 0.15);
@@ -99,6 +100,7 @@ aside a .icon {
   -webkit-background-clip: padding-box;
   -moz-background-clip: padding;
   background-clip: padding-box;
+  background: #ccc;
   color: #fff;
   text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
 }

+ 44 - 5
src/stylesheets/less/Lungo.layout.less

@@ -223,6 +223,50 @@ article {
 		z-index: 1;
 		opacity: 1;
 	}
+	
+	article.aside {
+	    left: 256px !important;
+	}
+	
+	article.indented {
+		background-color: #e2e2e2;
+	}
+		.indented ul, .indented form {
+			margin: 10px;
+			.border-radius(4px);
+			border: 1px solid #c5c5c5;
+			box-shadow: 0px 0px 8px #ccc;
+		}
+		
+		.indented li:first-child {
+			border-top-left-radius: 4px;
+			border-top-right-radius: 4px;
+		}
+		
+		.indented li:last-child {
+			border-bottom-left-radius: 4px;
+			border-bottom-right-radius: 4px;
+		}
+		
+		.list .contrasted {
+			background-color: #f4f4f4 !important;
+			box-shadow: inset 0px 1px 0px #fff;
+		}
+		
+		.list .toolbar a {
+			box-shadow: 1px 0px 0px #d9d9d9 ;
+		}
+		
+		.list .toolbar a:last-child {
+			box-shadow: none;
+		}
+		
+		.list .toolbar a.current {
+			color: #419ad9;
+		}
+/* @end */
+
+
 
 .toolbar{
 	height:48px;
@@ -235,8 +279,3 @@ article {
 	padding:0;
 	font-size:2.0em;
 }
-
-article.aside {
-    left: 256px !important;
-}
-/* @end */

+ 12 - 11
src/stylesheets/less/Lungo.theme.default.less

@@ -32,9 +32,7 @@ header {
 footer {
 	background: #2c2c2d -webkit-gradient(linear, left top, left bottom, color-stop(0.25, #2c2c2d), color-stop(1, #1c1d1d));
 	
-	-webkit-box-shadow: 
-		inset 0px 1px rgba(0,0,0,0.5), 
-		0px -1px 2px rgba(0,0,0,0.4);
+	-webkit-box-shadow: inset 0px 1px rgba(0,0,0,0.5);
 }
 
 .title {
@@ -89,36 +87,39 @@ aside a .icon {
 
 /* @group .list */
 .list {
-	background: #c5c5c5;
+	background: #e2e2e2;
+	color: #787878;
 }
 
 .list li:not(.info) {
 	background: #fff;
-	border-bottom: 1px inset #c3c4c6;
+	border-bottom: 1px inset #e6e6e6;
 	color: #333;
 }
+
+.list li:last-child {
+	border-bottom: none;
+}
 	
 .list li.toolbar {
 	border-bottom-color: rgba(0,0,0,0.2);
 }
 
 .list li:not(.toolbar) a { 
-	color: #333;
+	color: #787878;
 	text-shadow: #fff 0px 1px 1px; 
 	-webkit-tap-highlight-color: #242525;
 }
 
 .list strong {
-	color: #2343be;
-}
-	
-.list small {
-	opacity: 0.75;
+	color: #333;
 }
 	
 .list .bubble {
 	border: 1px solid rgba(0,0,0,0.15);
 	.border-radius(2px);
+	background: #ccc;
+	
 	color: #fff; 
 	text-shadow: 0 -1px 0 rgba(0,0,0,.3);
 }