Skip to content

Commit d5abbe7

Browse files
authored
Inline metrics (#3)
* Styling for inline metrics * Scripting for inline metrics
1 parent 1ed3664 commit d5abbe7

File tree

2 files changed

+75
-4
lines changed

2 files changed

+75
-4
lines changed

custom-css.css

+67-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
/***********************
2-
* Consistent rounding *
3-
***********************/
1+
/**************************
2+
* Consistent rounding/bg *
3+
**************************/
4+
.layout-content.status.status-index .page-status,
45
.layout-content.status.status-index .components-section .components-container.one-column,
56
.layout-content.status.status-index .custom-metrics-container .metrics-container .metric {
6-
background: rgba(0, 0, 0, 0.3);
77
border-radius: 4px;
88
}
99

10+
.availability-time-line-graphic rect {
11+
rx: 4px;
12+
}
13+
14+
.layout-content.status.status-index .components-section .components-container.one-column,
15+
.layout-content.status.status-index .custom-metrics-container .metrics-container .metric {
16+
background: rgba(0, 0, 0, 0.3);
17+
}
18+
1019
/*********
1120
* Pills *
1221
*********/
@@ -193,3 +202,57 @@ body.status .layout-content.status .date.border-color {
193202
.custom-masthead {
194203
text-align: center;
195204
}
205+
206+
/**********
207+
* Status *
208+
**********/
209+
.layout-content.status.status-index .page-status {
210+
border: none;
211+
text-shadow: none;
212+
}
213+
214+
/***********
215+
* Buttons *
216+
***********/
217+
.flat-button,
218+
.layout-content.status .masthead-container .updates-dropdown-container .show-updates-dropdown {
219+
box-shadow: none;
220+
text-shadow: none;
221+
}
222+
223+
/***********
224+
* Metrics *
225+
***********/
226+
.metric .metric-meta {
227+
font-size: 14px;
228+
display: flex;
229+
justify-content: space-between;
230+
margin: .75rem 0 .125rem;
231+
}
232+
233+
.metric .metric-meta .metric-name,
234+
.metric .metric-meta .metric-average {
235+
display: inline-block;
236+
}
237+
238+
.metric .metric-meta .metric-average {
239+
float: right;
240+
}
241+
242+
243+
.metric .highcharts-background {
244+
fill: none;
245+
}
246+
247+
.custom-metrics-container .timeframes-container .timeframe {
248+
font-size: .85rem;
249+
color: #D9643A; /* LINK COLOR */
250+
margin: .25em 0 0 .5em;
251+
}
252+
253+
.custom-metrics-container .timeframes-container #system-metrics {
254+
font-size: .85rem;
255+
font-weight: normal;
256+
color: #B9B9BA;
257+
pointer-events: none;
258+
}

custom-footer.html

+8
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,12 @@
2727

2828
// Fix custom masthead subscribe button
2929
document.getElementById("show-updates-dropdown").className += " flat-button";
30+
31+
// Move metrics to components
32+
var metrics = [].slice.call(document.getElementsByClassName('metrics-container')[0].children);
33+
var components = [].slice.call(document.getElementsByClassName('components-container')[0].children);
34+
for (var i = 0; i < metrics.length; i++) {
35+
components[i].appendChild(metrics[i]);
36+
}
37+
document.getElementsByClassName('components-section')[0].appendChild(document.getElementsByClassName('custom-metrics-container')[0]);
3038
</script>

0 commit comments

Comments
 (0)