Browse Source

markup tweak 2

postman0 9 years ago
parent
commit
2cd264b031
2 changed files with 13 additions and 4 deletions
  1. 8 1
      static/css/default.css
  2. 5 3
      tpl/stat.tpl

+ 8 - 1
static/css/default.css

@@ -6,14 +6,21 @@ html, body {
     font-family: 'Roboto', sans-serif;
 }
 
+.container {
+	width: 100%;
+}
+
 .col {
 	float: left;
 }
 
-.col-userlist {
+#col-userlist {
 	width: 20%;
 }
 
+#chart-container {
+}
+
 .clearfix {
 	clear: both;
 }

+ 5 - 3
tpl/stat.tpl

@@ -9,10 +9,10 @@
 		<script src="http://code.highcharts.com/highcharts.js"></script>
 	</head>
 	<body>
+		<a href="/">логи</a>
+		<div class="clearfix"></div>
 		<div class="container">
-			<a href="/">логи</a>
-			<div class="clearfix"></div>
-			<div class="col col-userlist">
+			<div class="col" id="col-userlist">
 				<h1>стата</h1>
 				<p><em>всего</em>: {{.Total}}</p>
 				{{range .Stat}}<em>{{.User}}</em>: {{printf "%.2f" .Count}}%<br/>{{else}}ничего ._.{{end}}
@@ -29,6 +29,8 @@
 				y: parseFloat({{printf "%.2f" .Count}})
 				});
 		{{end}}
+		var item = document.querySelector("#chart-container");
+		item.style.height = document.querySelector("#col-userlist").clientHeight + "px";
 		var chart = new Highcharts.Chart({
 			chart: {
 				renderTo: 'chart-container',