gitinspector/html/html.header
Adam Waldenberg 10179d12ed Added filtering of minor authors to the tables in the HTML output.
In practice, this means that the tables are initially collapsed and hide
all authors with a workload below one percent. The user can expand a
table in order to show all authors found during statistical analysis.
2013-05-08 16:53:20 +02:00

151 lines
3.8 KiB
Plaintext

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Generated by gitinspector {0}</title>
<script type="application/javascript">{1}</script>
<script type="application/javascript">{2}</script>
<script type="application/javascript">{3}</script>
<script type="application/javascript">
$(document).ready(function() {{
var row = 0;
var MINOR_AUTHOR_PERCENTAGE = 1.00;
var colorRows = function() {{
$(this).removeClass("odd");
if (row++ % 2 == 1) {{
$(this).addClass("odd");
}}
if(this == $(this).parent().find("tr:visible").get(-1)) {{
row = 0;
}}
}}
$("table.git tbody tr td:last-child").filter(function() {{
return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE;
}}).parent().hide();
$("table.git tbody tr:visible").each(colorRows);
$("table.git tfoot tr td:first-child").filter(function() {{
return $(this).parent().parent().parent().find("tbody tr:hidden").length > 0;
}}).each(function() {{
this.innerHTML = "Show minor authors &or;";
}}).hover(function() {{
$(this).addClass("hover");
}}, function() {{
$(this).removeClass("hover");
}}).toggle(function() {{
this.innerHTML = "Hide minor authors &and;";
$(this).parent().parent().parent().find("tbody tr").show().each(colorRows);
}}, function() {{
this.innerHTML = "Show minor authors &or;";
$(this).parent().parent().parent().find("tbody tr td:last-child").filter(function() {{
return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE;
}}).parent().hide();
$("table.git tbody tr:visible").each(colorRows);
}});
}});
</script>
<style type="text/css">
body {{
background: -webkit-linear-gradient(left, #8f8a9a, #dad2d7, #8f8a9a);
background: -moz-linear-gradient(left, #8f8a9a, #dad2d7, #8f8a9a);
}}
html, body {{
margin: 0;
height: 100%;
font-family: "Arial";
}}
body > div {{
margin: 0 auto;
width: 50em;
}}
div.box {{
border: 4px solid #ddd;
background-color: #eee;
margin: 0.75em;
padding: 5px;
font-size: small;
border-radius: 15px;
-moz-border-radius: 15px;
box-shadow: 1px 1px 3px #666;
-moz-box-shadow: 1px 1px 3px #666;
}}
div.logo p {{
margin-top: 18px;
}}
div.logo img {{
float: left;
padding: 2px 10px 2px 2px;
}}
body > div {{
display: block-inline;
}}
body > div > div > div {{
position: relative;
width: 100%;
}}
table.git {{
font-size: small;
width: 60%;
padding-right: 5px;
}}
table.full {{
width: 100%;
}}
table.git th, table.git tfoot tr td {{
padding: 0.3em;
background-color: #ddcece;
border-radius: 8px 8px 0px 0px;
-moz-border-radius: 8px 8px 0px 0px;
}}
table.git tfoot tr td {{
border-radius: 0px 0px 8px 8px;
-moz-border-radius: 0px 0px 8px 8px;
border: 1px solid #eee;
text-align: center;
}}
table.git tfoot tr td.hover {{
background-color: #eddede;
border: 1px solid #bbb;
cursor: hand;
}}
table.git td {{
padding: 0.4em;
height: 1em;
}}
table.git td div.insert {{
background-color: #7a7;
}}
table.git td div.remove {{
background-color: #c66;
}}
table.git td div.insert, table.git td div.remove {{
height: 100%;
float: left;
}}
table.git tr.odd {{
background-color: #dbdbdb;
}}
div.chart {{
position: absolute;
top: 5px;
bottom: 5px;
right: 0px;
width: 40%;
font-size: x-small;
max-height: 240px;
}}
p.error {{
color: #700;
}}
</style>
</head>
<body>
<div><div class="box logo">
<img src="data:image/png;base64,{4}" />
<p>The output has been generated by <a href="http://gitinspector.googlecode.com">gitinspector</a>;
the statistical analysis tool for git repositories.<p>
</div></div>