-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
121 lines (102 loc) · 3.44 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
---
layout: default
---
<noscript>
<style>
.home__avatar__ground {
background: #0d9fd8;
}
.home__air {
display: none;
}
</style>
</noscript>
<section class="home__avatar">
<img class="home__avatar__img"
srcset="/images/avatar/avatar_450w.jpg 450w,
/images/avatar/avatar_300w.jpg 300w,
/images/avatar/avatar_150w.jpg 150w"
sizes="150px"
src="/images/avatar/avatar_150w.jpg"
alt="">
<div class="home__avatar__ground"></div>
<script>
var colors = [
'#f24d8f', // pink
'#0d9fd8', // blue
'#8ad749' // green
];
var colorIndex = Math.floor(Math.random() * colors.length);
var color = colors[colorIndex];
try {
if (localStorage.color === color) {
color = colors[(colorIndex + 1) % colors.length]
}
} catch (e) {
}
document.querySelector('.home__avatar__ground').style.background = color;
try {
localStorage.color = color;
} catch (e) {
}
</script>
</section>
<section>
<h2 class="home__title">{{ site.title }}</h2>
<a href="https://github.com/peferron">GitHub</a> /
<a href="https://www.linkedin.com/in/peferron">LinkedIn</a> /
<a href="mailto:[email protected]">[email protected]</a>
</section>
<section class="home__air">
<h3 class="home__title">Air quality at my home in San Mateo, CA</h3>
<script>
document.domain = 'peferron.com';
function onGrafanaIFrameLoaded(event) {
var iframe = event.target;
var poll = function() {
if (iframe.contentDocument.querySelector('.panel-loading.ng-hide')) {
document.querySelector('.home__air__grafana').classList.add('home__air__grafana--loaded');
} else {
setTimeout(poll, 0);
}
};
poll();
}
</script>
<div class="home__air__grafana">
<div class="home__air__grafana__spinner"></div>
<iframe class="home__air__grafana__iframe" onload="onGrafanaIFrameLoaded(event)"
src="https://air-quality.peferron.com/grafana/dashboard-solo/db/air-quality?orgId=2&from=1560063600000&to=1560150000000&panelId=1&theme=light"></iframe>
<a class="home__air__grafana__link"
href="https://air-quality.peferron.com/grafana/dashboard/db/air-quality?orgId=2&from=1557471600000&to=1560150000000&theme=light"></a>
</div>
<!-- Hack to prevent this caption from dictating the page width. -->
<table class="home__air__caption">
<caption>
<small>
Sent from a Raspberry Pi using Rust, Redis, InfluxDB and Grafana.
<span class="home__air__caption__links">
<a href="/2017/03/23/measuring-air-quality-part-1/">Article</a>
·
<a href="https://github.com/peferron/air-quality">Source code</a>
</span>
<p>
<small>
Update: air quality in San Mateo is consistently good, so I have turned the system off to preserve components for when they are needed the most (e.g. wildfires). Data from March 2017 to June 2019 is still available.
</small>
</p>
</small>
</caption>
</table>
</section>
<section>
<h3 class="home__title">Articles</h3>
<ul class="home__posts__list" role="navigation">
{% for post in site.posts %}
<li CLASS="home__post">
<a href="{{ post.url }}">{{ post.title }}</a><br><small class="date">{% include date.html date=post.date %}</small>
</li>
{% endfor %}
</ul>
<a class="home__posts__rss" href="/feed.xml">Subscribe via RSS</a>
</section>