Bladeren bron

Add a header

master
Chris Smith 13 jaren geleden
bovenliggende
commit
bda7cca9ce
2 gewijzigde bestanden met toevoegingen van 14 en 4 verwijderingen
  1. 14
    4
      index.html
  2. BIN
      res/gradient.png

+ 14
- 4
index.html Bestand weergeven

9
   <script src="data.php" type="text/javascript"></script>
9
   <script src="data.php" type="text/javascript"></script>
10
   <script type="text/javascript">
10
   <script type="text/javascript">
11
    var previousPoint = null;
11
    var previousPoint = null;
12
+   var plots = {};
12
    var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
13
    var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
13
 
14
 
14
    function showTooltip(x, y, contents) {
15
    function showTooltip(x, y, contents) {
86
 
87
 
87
     seriesData.sort(function(a, b) { return b.data - a.data; });
88
     seriesData.sort(function(a, b) { return b.data - a.data; });
88
 
89
 
89
-    $.plot($('#expense'), seriesData, {
90
+    plots.expense = $.plot($('#expense'), seriesData, {
90
       series: { pie: { show: true, innerRadius: 0.5, highlight: { opacity: 0.5 } } },
91
       series: { pie: { show: true, innerRadius: 0.5, highlight: { opacity: 0.5 } } },
91
       grid: { clickable: true }
92
       grid: { clickable: true }
92
     });
93
     });
110
      transData[1].data.push([timestamp, sum[1]]);
111
      transData[1].data.push([timestamp, sum[1]]);
111
     }); 
112
     }); 
112
 
113
 
113
-    $.plot($('#history'), transData, {
114
+    plots.history = $.plot($('#history'), transData, {
114
       xaxis: { mode: 'time', timeformat: '%y/%m'},
115
       xaxis: { mode: 'time', timeformat: '%y/%m'},
115
       series: {
116
       series: {
116
         lines: { show: true },
117
         lines: { show: true },
163
   </script>
164
   </script>
164
   <style type="text/css">
165
   <style type="text/css">
165
    .categoryIgnored td { color: gray; }
166
    .categoryIgnored td { color: gray; }
166
-   .left { width: 45%; float: left; }
167
-   .right { margin-left: 50%; }
167
+   .left { width: 45%; padding: 20px; float: left; }
168
+   .right { margin-left: 50%; padding: 20px; }
169
+   body { margin: 0; font-family: sans-serif; }
170
+   #header { background: url('res/gradient.png') repeat-x; height: 100px; margin: 0 0 10px 0; overflow: hidden; z-index: 0; }
171
+   #header h1 { color: white; margin: 0; font-size: 60px; position: absolute; top: 42px; left: 20px; z-index: 2; }
172
+   #headershadow { font-size: 60px; position: absolute; top: 42px; left: 25px; font-weight: bold; z-index: 1; }
168
    h2 { margin-top: 0; }
173
    h2 { margin-top: 0; }
169
   </style>
174
   </style>
170
  </head>
175
  </head>
171
  <body>
176
  <body>
177
+  <div id="header">
178
+   <h1>Money Analyser</h1>
179
+  </div>
180
+  <span id="headershadow">Money Analyser</span>
181
+
172
   <div class="left">
182
   <div class="left">
173
    <h2>Transaction History</h2>
183
    <h2>Transaction History</h2>
174
    <div id="history" style="width: 600px; height: 300px;"></div>
184
    <div id="history" style="width: 600px; height: 300px;"></div>

BIN
res/gradient.png Bestand weergeven


Laden…
Annuleren
Opslaan