change layout
authorJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 12 Sep 2011 22:24:10 +0000 (22:24 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 12 Sep 2011 22:24:10 +0000 (22:24 +0000)
www/details.html
www/psensor.js
www/style.css

index d028246..c4734ef 100644 (file)
@@ -31,17 +31,20 @@ href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
     </script>
   </head>
   <body>
-    <div id="menu">
-      <ul id="menu-list">
-      </ul>
-    </div>
-
-    <h1></h1>
-
-    <div class="chart" id="chart"></div>
-
-    <div id="footer">
-      Generated by <a href='http://wpitchoune.net/psensor'>psensor-server</a>
-    </div>
+      <div id="menu">
+       <ul id="menu-list">
+       </ul>
+      </div>
+      
+      <div id="main">
+       <h1></h1>
+       
+       <div class="chart" id="chart"></div>
+       
+      </div>
+      
+      <div id="footer">
+       Generated by <a href='http://wpitchoune.net/psensor'>psensor-server</a>
+      </div>
   </body>
 </html>
index e77fc01..275af64 100644 (file)
@@ -148,7 +148,7 @@ function update_menu() {
     var name, link, url, str;
 
     $.getJSON("/api/1.0/sensors", function(data) {
-       str = "<li class='menu-item'>Sensors\n<ul class='sub-menu'>";
+       str = "<li>Sensors\n<ul>";
 
        $.each(data, function(i, item) {
             name = item["name"];
@@ -162,7 +162,4 @@ function update_menu() {
        $("#menu-list").append(str);
     });
 
-    $("#menu-list").click(function() {
-       $("ul.sub-menu").slideToggle('medium');
-    });
 }
\ No newline at end of file
index bff8f56..7cf7161 100644 (file)
@@ -4,6 +4,11 @@ body {
     font-size: 100%;
     color: #000;
     background-color: #fff;
+    margin: 0 0 0 0;
+}
+
+body div {
+    background-color: #fff;
 }
 
 a {
@@ -18,6 +23,8 @@ a:hover {
 
 h1 {
     text-transform: uppercase;
+    margin: 0 0 1em 0;
+    padding: 0 0 0 0;
 }
 
 #footer {
@@ -62,24 +69,26 @@ th, td {
     color: #000;
 }
 
-#menu-list {
+ul {
     list-style: none;
     padding: 0 0 0 0;
     margin: 0 0 0 0;
- }
+}
 
-#menu {
-    background: #000;
-    color: #fff;
-    padding-top: 1em;
-    padding-bottom: 1em;
+ul li ul li {
     padding-left: 1em;
 }
 
-.sub-menu {
+#menu {
+    float: left;
+    width: 20%;
     padding: 0 0 0 0;
     margin: 0 0 0 0;
-    list-style: none;
-    display: none;
-    color: #fff;
+}
+
+#main {
+    float: right;
+    width: 80%;
+    padding: 0 0 0 0;
+    margin: 0 0em 0 0;
 }
\ No newline at end of file