Skip to content

Commit 22f21e1

Browse files
committed
Improved styling for links.
1 parent f7d03fb commit 22f21e1

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function pointOnCircle (radius, angleDegrees) { // Helper function to create a p
1313
window.onload = function () {
1414

1515
var width = window.innerWidth; // Dimensions for our visualization are derived from the size of the browser window.
16-
var height = window.innerHeight - 150; // Allow for heading and links.
16+
var height = window.innerHeight - 200; // Allow for heading and links.
1717

1818
var earthRadius = 6371; // This is the real radius of the earth!
1919
var earthTranslation = "translate(" + (width/2) + ", " + (height/2) + ")"; // Setup a translation to position the earth.

index.html

+17-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,23 @@
99
<script src="app.js"></script>
1010
</head>
1111
<body>
12-
<h1 style="color: white; text-align: center;">A D3 visualization from the book Data Wrangling with JavaScript</h1>
13-
<p style="color: white; text-align: center;"><a href="https://github.com/Data-Wrangling-with-JavaScript/d3-animated-viz" target="_blank">Click here for the code</a></p>
14-
<p style="color: white; text-align: center;"><a href="http://bit.ly/2t2cJu2" target="_blank">Click here for the book</a></p>
12+
<style>
13+
a:link {
14+
color: white;
15+
}
16+
a:visited {
17+
color: orange;
18+
}
19+
a:hover {
20+
color: yellow;
21+
}
22+
a:active {
23+
color: yellow;
24+
}
25+
</style>
26+
<h1 style="color: white; text-align: center;">A D3 visualization</h1>
27+
<h2 style="color: white; text-align: center; ">From the book <a href="http://bit.ly/2t2cJu2" target="_blank">Data Wrangling with JavaScript</a></h1>
28+
<p style="color: white; text-align: center;"><a href="https://github.com/Data-Wrangling-with-JavaScript/d3-animated-viz" target="_blank">Code is available on GitHub</a></p>
1529
<svg class="chart"></svg>
1630
</body>
1731
</html>

0 commit comments

Comments
 (0)