Skip to content
Browse files

Merge branch 'master' of github.com:nearinfinity/node-covershot

  • Loading branch information...
2 parents 39aa261 + aa154e9 commit 27e7cf436477a24be00aa6d7346ce2ff4d6b26bf @joeferner joeferner committed May 17, 2012
View
35 lib/format/html/css/covershot.css
@@ -25,12 +25,25 @@ h1 {
}
h3 {
- line-height: 30px;
+ /*line-height: 30px;*/
font-size: 15px;
- padding: 0;
margin: 0;
word-wrap: normal;
text-overflow: ellipsis;
+ padding: 6px 6px;
+}
+
+aside#homeButton {
+ position: fixed;
+ left: 5px;
+ top: 5px;
+ z-index: 100;
+}
+
+aside#homeButton img {
+ -webkit-border-radius: 25px;
+ -moz-border-radius: 25px;
+ border-radius: 25px;
}
div#bodyWrapper {
@@ -41,15 +54,20 @@ div#bodyWrapper {
header {
width: 1200px;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 45px;
- padding-top: 40px;
+ margin: 45px auto;
+ padding-bottom: 45px;
+}
+
+aside#hotspotsLinkContainer {
+ margin: 0;
+ padding: 0;
+ float: right;
}
ul.summary {
margin: 0px auto;
- padding: 0px 0px 20px 0px;
+ padding: 0px;
+ float: left;
list-style-type: none;
}
@@ -66,7 +84,6 @@ ul.summary li h3 {
-moz-border-radius: 3px;
border-radius: 3px;
background-color: rgba(0, 0, 0, 0.042);
- padding: 0px 6px;
/* -webkit-transition:all 0.25s ease;
-moz-transition:all 0.25s ease;
-o-transition:all 0.25s ease;
@@ -78,6 +95,7 @@ ul.summary li h3 {
background-color: rgba(0, 0, 0, 0.12);
}*/
+
span.coverageData {
font-size: 18px;
}
@@ -148,6 +166,7 @@ table th:last-child, table td:last-child {
}
section#bod {
+ clear: both;
width: 1200px;
margin: auto;
position: relative;
View
39 lib/format/html/index.ejs
@@ -13,23 +13,28 @@
<div id="bodyWrapper">
<header>
<h1>Covershot - Summary</h1>
- <ul class="summary">
- <li>
- <h3><span class="coverageData"><%= files.length %></span> files</h3>
- </li>
- <li>
- <h3><span class="coverageData"><%= hits %></span> hits</h3>
- </li>
- <li>
- <h3><span class="coverageData"><%= misses %></span> misses</h3>
- </li>
- <li>
- <h3><span class="coverageData"><%= sloc %></span> SLoC</h3>
- </li>
- <li>
- <h3><span class="coverageData"><%= coverage.toFixed(0) %>%</span> coverage</h3>
- </li>
- </ul>
+
+ <ul class="summary">
+ <li>
+ <h3><span class="coverageData"><%= files.length %></span> files</h3>
+ </li>
+ <li>
+ <h3><span class="coverageData"><%= hits %></span> hits</h3>
+ </li>
+ <li>
+ <h3><span class="coverageData"><%= misses %></span> misses</h3>
+ </li>
+ <li>
+ <h3><span class="coverageData"><%= sloc %></span> SLoC</h3>
+ </li>
+ <li>
+ <h3><span class="coverageData"><%= coverage.toFixed(1) %>%</span> coverage</h3>
+ </li>
+ </ul>
+ <aside id="hotspotsLinkContainer">
+ <h3><a href="hotspots.html">Hotspots</a></h3>
+ </aside>
+
</header>
<section id="bod">
<section id="mainContent">
View
3 lib/format/html/index.js
@@ -28,6 +28,7 @@ function writeSource(outputDir, data, callback) {
data.pathToCSS = path.resolve(path.join(outputDir, 'css'));
data.pathToScripts = path.resolve(path.join(outputDir, 'scripts'));
+ data.pathToRoot = path.resolve(outputDir);
data.green = getColoredLines(data, function (c) {return c >= 1; });
data.red = getColoredLines(data, function (c) {return c === 0; });
data.generated = new Date().toString();
@@ -87,7 +88,7 @@ function copyResources(outputDir) {
}
exports.report = function (coverageMap, outputDir, callback) {
- var outputDir = outputDir || 'coverage';
+ var outputDir = outputDir || 'covershot';
coverageMap.generated = new Date().toString();
coverageMap.files = sortFiles(coverageMap.files);
View
BIN lib/format/html/resources/pancakes.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
49 lib/format/html/src.ejs
@@ -14,31 +14,36 @@
<link href="<%= pathToCSS %>/shThemeDefault.css" rel="stylesheet" type="text/css" />
</head>
<body>
+ <aside id="homeButton">
+ <a href="<%= pathToRoot %>/index.html"> <img src="<%= pathToRoot %>/resources/pancakes.jpg" alt="home" width="45" height="45"> </a>
+ </aside>
<div id="bodyWrapper">
<header>
<h1><%= filename %></h1>
- <ul class="summary">
- <li>
- <h3><span class="coverageData"><%= hits %></span> hits</h3>
- </li>
- <li>
- <h3><span class="coverageData"><%= misses %></span> misses</h3>
- </li>
- <li>
- <h3><span class="coverageData"><%= sloc %></span> SLoC</h3>
- </li>
- <li>
- <h3><span class="coverageData"><%= coverage.toFixed(0) %>%</span> coverage</h3>
- </li>
- <% if (jsmeter) { %>
- <li>
- <h3><span class="coverageData<%= (jsmeter.complexity > 10) ? ' red' : '' %>"><%= jsmeter.complexity %></span> complexity</h3>
- </li>
- <li>
- <h3><span class="coverageData<%= (jsmeter.mi < 40) ? ' red' : '' %>"><%= jsmeter.mi %></span> MI</h3>
- </li>
- <% } %>
- </ul>
+
+ <ul class="summary">
+ <li>
+ <h3><span class="coverageData"><%= hits %></span> hits</h3>
+ </li>
+ <li>
+ <h3><span class="coverageData"><%= misses %></span> misses</h3>
+ </li>
+ <li>
+ <h3><span class="coverageData"><%= sloc %></span> SLoC</h3>
+ </li>
+ <li>
+ <h3><span class="coverageData"><%= coverage.toFixed(0) %>%</span> coverage</h3>
+ </li>
+ <% if (jsmeter) { %>
+ <li>
+ <h3><span class="coverageData<%= (jsmeter.complexity > 10) ? ' red' : '' %>"><%= jsmeter.complexity %></span> complexity</h3>
+ </li>
+ <li>
+ <h3><span class="coverageData<%= (jsmeter.mi < 40) ? ' red' : '' %>"><%= jsmeter.mi %></span> MI</h3>
+ </li>
+ <% } %>
+ </ul>
+
</header>
<section id="bod">
<section id="mainContent">

0 comments on commit 27e7cf4

Please sign in to comment.
Something went wrong with that request. Please try again.