Skip to content
This repository was archived by the owner on May 13, 2019. It is now read-only.

Commit d1d815d

Browse files
committed
src: adjust generation of web pages for nodejs.org
Adjust the generateion of the summary web page for the coverage data to fit the nodejs.org look and feel.
1 parent d41c55d commit d1d815d

File tree

1 file changed

+71
-25
lines changed

1 file changed

+71
-25
lines changed

coverage/generate-index-html.py

Lines changed: 71 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,67 @@
1010
<!DOCTYPE html>
1111
<html>
1212
<head>
13+
<meta charset="utf-8">
14+
<title>Node.js Code Coverage</title>
15+
16+
<link rel="dns-prefetch" href="http://fonts.googleapis.com">
17+
<link rel="dns-prefetch" href="http://fonts.gstatic.com">
18+
19+
<meta name="author" content="Node.js Foundation">
20+
<meta name="robots" content="index, follow">
1321
<meta name="viewport" content="width=device-width, initial-scale=1.0">
14-
<title>Node.js Core Coverage</title>
15-
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
16-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
17-
<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.yellow-indigo.min.css" />
18-
<style media="screen" type="text/css">
19-
.table-container {
20-
display: flex;
21-
justify-content: center;
22-
margin-top: 50px;
23-
}
22+
23+
<link rel="apple-touch-icon" href="https://nodejs.org/static/apple-touch-icon.png">
24+
<link rel="icon" sizes="32x32" type="image/png" href="https://nodejs.org/static/favicon.png">
25+
26+
<link rel="stylesheet" href="https://nodejs.org/en/styles.css" media="all">
27+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600">
28+
<style>
29+
#logo { margin-bottom: 1rem; }
30+
#graphs {
31+
overflow: hidden;
32+
clear: both;
33+
list-style-type: none;
34+
margin: 0;
35+
padding: 0;
36+
}
37+
#graphs li {
38+
float: left;
39+
border: 1px solid #999;
40+
margin-left: 1%;
41+
margin-bottom: 1rem;
42+
padding: 0.25rem;
43+
max-width: 48%;
44+
}
45+
#graphs li:nth-child(odd) {
46+
clear: both;
47+
margin-left: 0;
48+
}
49+
#graphs img {
50+
max-width: 100%;
51+
}
52+
@media (max-width:850px) {
53+
#graphs li {
54+
float: none;
55+
margin-left: 0;
56+
max-width: 100%;
57+
}
58+
}
2459
</style>
2560
</head>
2661
<body>
27-
28-
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
29-
<header class="mdl-layout__header">
30-
<div class="mdl-layout__header-row">
31-
<!-- Title -->
32-
<span class="mdl-layout-title">Node.js Core Coverage</span>
33-
<!-- Add spacer, to align navigation to the right -->
34-
<div class="mdl-layout-spacer"></div>
35-
<!-- Navigation. We hide it in small screens. -->
36-
<nav class="mdl-navigation mdl-layout--large-screen-only">
37-
<a class="mdl-navigation__link" href="https://github.com/nodejs/node">Node.js Core</a>
38-
<a class="mdl-navigation__link" href="https://github.com/addaleax/node-core-coverage">Project</a>
39-
</nav>
40-
</div>
62+
<header>
63+
<div class="container" id="logo">
64+
<img src="https://nodejs.org/static/images/logos/nodejs-new-white-pantone.png" alt="node.js">
65+
</div>
4166
</header>
67+
68+
69+
<div id="main">
70+
<div class="container">
71+
72+
<h1>Node.js Code Coverage</h1>
73+
4274
<div class="mdl-layout__drawer">
4375
<nav class="mdl-navigation">
4476
<a class="mdl-navigation__link" href="https://github.com/nodejs/node">Node.js Core</a>
@@ -72,7 +104,21 @@
72104
</tbody>
73105
</table>
74106
</div>
75-
</main>
107+
</div>
108+
</div>
76109
<script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script>
110+
<footer class="no-margin-top">
111+
112+
<div class="linuxfoundation-footer">
113+
<div class="container">
114+
<a class="linuxfoundation-logo" href="http://collabprojects.linuxfoundation.org">Linux Foundation Collaborative Projects</a>
115+
116+
<p>© 2016 Node.js Foundation. All Rights Reserved. Portions of this site originally © 2016 Joyent. </p>
117+
<p>Node.js is a trademark of Joyent, Inc. and is used with its permission. Please review the <a href="https://nodejs.org/static/documents/trademark-policy.pdf">Trademark Guidelines of the Node.js Foundation</a>.</p>
118+
<p>Linux Foundation is a registered trademark of The Linux Foundation.</p>
119+
<p>Linux is a registered <a href="http://www.linuxfoundation.org/programs/legal/trademark" title="Linux Mark Institute">trademark</a> of Linus Torvalds.</p>
120+
</div>
121+
</div>
122+
</footer>
77123
</body>
78124
</html>''')

0 commit comments

Comments
 (0)