-
Notifications
You must be signed in to change notification settings - Fork 9
/
stats.html
114 lines (107 loc) · 5 KB
/
stats.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Visiting all the Vermeers.">
<meta name="author" content="Jessica Lord, @jllord">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@jllord">
<meta name="twitter:title" content="Vermeers">
<meta name="twitter:description" content="I want to see all the Vermeers. I made a site.">
<meta name="twitter:image" content="https://cloud.githubusercontent.com/assets/1305617/17646710/3971d1dc-618a-11e6-924a-6af763fb26c3.png">
<title>Vermeer Goals—Stats</title>
<link rel="icon" type="image/png" href="favicon.png">
<link href="https://fonts.googleapis.com/css?family=Merriweather:400,400i,900|Source+Sans+Pro:400,700" rel="stylesheet">
<link rel="stylesheet" href="assets/style.css">
<script src="assets/stats.json"></script>
<script src="assets/js/sheetsee.js"></script>
</head>
<body>
<header>
<div class="wrapper">
<h1><a href="index.html">Vermeer Goals—Stats</a></h1>
<nav>
<ul class="no-style">
<li><a href="about.html">About</a></li>
<li><a href="visits.html">Visits</a></li>
<li><a href="delft.html">Delft</a></li>
<li><a href=""><b>Stats</b></a></li>
</ul>
</nav>
</div>
</header>
<main>
<div class="wrapper" id="about">
<div class="some">
<h2>Stats</h2>
</div>
<div class="most">
<div id="stats" class="divider-line"></div>
<small><b>*</b> Two paintings are not in permanent collections. One was <a href="https://en.wikipedia.org/wiki/Isabella_Stewart_Gardner_Museum_theft" target="_blank">stolen from the Isabella Stewart Gardner Museum</a> and one is in a private collection, sometimes in exhbitions (how I saw it).</small>
<br><br>
<small><b>Note:</b> Because some of the paintings travel to other museums for exhibitions, I may see some outside of the countries and museum permanent collections to which they belong.</small>
</div>
</div>
</main>
<footer>
<div class="wrapper">
<nav>
<h4 class="float-left inline-block"><a href="index.html">Vermeer Goals</a></h4>
<ul class="no-style">
<li><a href="about.html">About</a></li>
<li><a href="visits.html">Visits</a></li>
<li><a href="delft.html">Delft</a></li>
<li><a href="stats.html">Stats</a></li>
</ul>
</nav>
</div>
</footer>
<script id="stats_template" type="text/html">
<h1 class="leading-number">{{ stats.seenLength }}</h1>
<h2>All Vermeers Visited</h2>
<div id="painting-boxes"></div>
<br>
<p>{{stats.seenFormatted}}</p>
<h4 class="lighter-body">{{ stats.remainingPublicLength }} Remaining</h4>
<p><span class="lighter-body">{{ stats.remainingFormatted }}</span></p>
<h4 class="even-lighter-body">{{ stats.notPublicLength }} Not Public*</h4>
<p><span class="even-lighter-body">{{ stats.notPublicFormatted }}</span></p>
<h3 class="secondary-number">{{ stats.visitedCountriesLength }}</h3>
<!-- TODO a map! -->
<h2>Countries Visited</h2>
<p>{{ stats.visitedCountriesFormatted }}</p>
<h3 class="secondary-number">{{ stats.visitedMuseumsLength }}</h3>
<h2>Museums Visited</h2>
<p>{{ stats.visitedMuseumsFormatted }}</p>
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
stats.seenFormatted = stats.seen.join(', ')
stats.notPublicFormatted = stats.notPublic.join(', ')
stats.remainingFormatted = stats.remainingPublic.join(', ')
stats.visitedCountriesFormatted = stats.visitedCountries.join(', ')
stats.remainingCountriesFormatted = stats.remainingCountries.join(', ')
stats.visitedMuseumsFormatted = stats.visitedMuseums.join(', ')
stats.remainingMuseumsFormatted = stats.remainingMuseums.join(', ')
var html = Sheetsee.ich.stats_template({ stats })
document.getElementById('stats').innerHTML = html
function generatePaintingBoxes (stats) {
var string = ''
stats.seen.forEach(function (painting) {
return string += '<div class="painting-box seen-box" title="Seen: ' + painting + '"></div>'
})
stats.remainingPublic.forEach(function (painting) {
return string += '<div class="painting-box" title="Not yet seen: ' + painting + '"></div>'
})
stats.notPublic.forEach(function (painting) {
return string += '<div class="painting-box cant-see-box" title="Not public: ' + painting + '"></div>'
})
return string
}
document.getElementById('painting-boxes').innerHTML = generatePaintingBoxes(stats)
})
</script>
</body>
</html>