-
Notifications
You must be signed in to change notification settings - Fork 23
/
index.html
121 lines (104 loc) · 2.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<html>
<head>
<!-- include polyfills for custom event, Symbol and Custom Elements -->
<script src="//unpkg.com/babel-polyfill@6.26.0/dist/polyfill.js"></script>
<script src="//unpkg.com/custom-event-polyfill@0.3.0/custom-event-polyfill.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/document-register-element/1.8.0/document-register-element.js"></script>
<script src="//unpkg.com/d3@5.15.0/dist/d3.min.js"></script>
<script src="//unpkg.com/d3fc@14.2.3/build/d3fc.js"></script>
<script src="//unpkg.com/d3-svg-annotation@2.5.1/indexRollup.js"></script>
<style>
.annotation-note-bg {
fill-opacity: 0.8;
}
.annotation-note-label,
.annotation-note-title {
fill: black;
font-size: 0.8em;
}
body {
margin: 0;
display: flex;
flex-direction: column;
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
#title {
flex-direction: row;
display: flex;
align-items: center;
}
#title .subtitle {
margin: 5px 0 5px 20px;
}
#title .subtitle h2 {
margin: 5px 0;
}
#title .controls {
margin: 5px 0 5px 20px;
margin-right: 3em;
text-align: right;
flex: 1;
}
#chart-container {
flex: 1;
position: relative;
}
#chart-container > div {
position: absolute;
top: 0; bottom: 0; right: 0; left: 0;
text-align: middle;
vertical-align: middle;
}
#loading {
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(255, 255, 255, 0.7);
}
#loading span {
flex: 1;
text-align: center;
font-size: 5em;
}
#chart d3fc-group {
grid-template-columns: 1em auto 1fr 1em 0;
grid-template-rows: 0 auto 1fr 1em 0;
}
.tick text {
display: none;
}
a,
a:visited,
a:active {
color: rgb(86, 26, 129);
text-decoration: none;
}
a.active,
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div id="title">
<div class="subtitle">
<h2>Hathi Trust Library</h2>
<small>sourcecode available on
<a href="https://github.com/ColinEberhardt/d3fc-webgl-hathi-explorer"
>GitHub</a
></small>
</div>
<div class="controls">
<a href="#" id="language" class="active">Language</a> |
<a id="year" href="#">Year</a>
</div>
</div>
<div id="chart-container">
<div id="chart"></div>
<div id="loading"><span>loading...</span></div>
</div>
<script src="index.js" type="module"></script>
</body>
</html>