improved styling
authorJean-Philippe Orsini <jeanfi@gmail.com>
Tue, 13 Sep 2011 21:41:40 +0000 (21:41 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Tue, 13 Sep 2011 21:41:40 +0000 (21:41 +0000)
www/monitor.html
www/psensor.js
www/style.css

index 54c8acb..04d5303 100644 (file)
@@ -32,7 +32,7 @@ href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
 
     <div id="menu">
       <ul id="menu-list">
-       <li><em><a href="monitor.html">All</a><em></li>
+       <li><em><a href="monitor.html">All</a></em></li>
       </ul>
     </div>
       
@@ -43,7 +43,7 @@ href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
       
       <h2>CPU</h2>
       
-      <table id='cpu' border='0' cellspacing='0' cellpadding='0'>
+      <table id='cpu'>
        <thead>
          <tr>
            <th>Current usage</th>
@@ -57,7 +57,7 @@ href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
       
       <h2>Memory</h2>
       
-      <table border='0' cellspacing='0' cellpadding='0'>
+      <table>
        <thead>
          <tr>
            <th></th>
@@ -76,7 +76,7 @@ href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
       
       <h2>Network</h2>
       
-      <table id='net' border='0' cellspacing='0' cellpadding='0'>
+      <table id='net'>
        <thead>
          <tr>
            <th>Interface</th>
@@ -90,7 +90,7 @@ href="http://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin">
       
       <h2>Sensors</h2>
       
-      <table id='sensors' border='0' cellspacing='0' cellpadding='0'>
+      <table id='sensors'>
        <thead>
          <tr>
            <th>Name</th>
index c59a268..d3372d0 100644 (file)
@@ -173,9 +173,7 @@ function update_summary_sensors() {
     $.getJSON("/api/1.0/sensors", function(data) {
        $("#sensors tbody").html("");
 
-        $.each(data, function(i, item) {
-           
-
+        $.each(data, function(i, item) {           
             name = item["name"];
             type = item["type"];
             value_str = value_to_str(item["last_measure"]["value"], type);
index 652696e..b1bc42b 100644 (file)
@@ -20,14 +20,25 @@ a:hover {
 }
 
 h1 {
+    font-size: 140%;
+    font-style: normal;
+    font-weight: bold;
     text-transform: uppercase;
     margin: 0 0 1em 0;
     padding: 0 0 0 0;
 }
 
-#footer {
+
+h2 {
+    font-size: 110%;
     font-style: normal;
-    font-weight: normal;
+    font-weight: bold;
+    text-transform: uppercase;
+    margin: 2em 0em 1em 0em;
+    padding: 0 0 0 0;
+}
+
+#footer {
     padding-top: 2em;
     color: #666;
     clear: both;
@@ -41,33 +52,33 @@ p {
 }
 
 table {
-       text-align: left;
-       padding-left: 8px;
-       padding-right: 8px;
-       min-width: 50%;
+    text-align: left;
+    padding: 0 0 0 0;
+    min-width: 50%;
+    border-spacing: 0;
+    border: 0;
 }
 
 thead {
     background-color: #000;
     color: #fff;
-    padding-top: 4px;
-    padding-bottom: 4px;
+    padding: 0 0 0 0;    
 }
 
 tbody {
-    padding-top: 4px;
-    padding-bottom: 4px;
-}
-
-th, td {
-    padding: 4px 4px 4px 4px;
+    padding: 0 0 0 0;
 }
 
 th {
+    padding: 0.25em 0.5em 0.25em 0.5em;
     font-style: normal;
     font-weight: normal;
 }
 
+td {
+    padding: 0.25em 0.25em 0em 0.25em;
+}
+
 .chart {
     color: #000;
     font-style: normal;
@@ -105,5 +116,17 @@ em {
 
 #uptime {
     font-weight: normal;
-    font-style: normal;
-}
\ No newline at end of file
+}
+
+#menu-list em {
+    text-transform: uppercase;
+}
+
+#menu ul li {
+    padding-bottom: 1em;
+}
+
+#menu-list ul li {
+    padding: 0 0 0 1em;
+}
+