Hi Team,
I have a script which pulls our systems status from our statuspage.io site and displays this on our discourse site above the header “All Systems Operational”, if the status changes then this is updated automatically to reflect the most up to date status.
I am really struggeling to work out how to display this before my header icons rather than above my header, something like this
If any one can please assist, I would be eternally grateful.
Kyle
Header Code
<script type="text/javascript" src="https://cdn.statuspage.io/se-v2.js"></script>
<script>
var sp = new StatusPage.page({ page: 'h2522dcz6bxy'});
sp.summary({
success: function(data) {
// adds the text description to the dropdown
$('.color-description').text(data.status.description);
// appends the status indicator as a class name so we can use the right color for the status light thing
$('.color-dot').addClass(data.status.indicator);
}
});
</script>
<div id="top-navbar">
<span id="top-navbar-links">
<a href="https://statuspage.eposnowhq.com/" target="_blank"><span class="color-dot"></span> <span class="color-description"></span></a>
</span>
</div>
CSS Styling
$red:#e74c3c;
$orange:#e67e22;
$yellow:#f1c40f;
$green:#2ecc71;
.color-dot {
-moz-border-radius: 30px; /* or 50% */
border-radius: 30px;
display:inline-block;
width:10px;
height:10px;
margin-right:5px;
&.critical {
background-color:$red;
}
&.major {
background-color:$orange;
}
&.minor {
background-color:$yellow;
}
&.none {
background-color:$green;
}
}
.color-description {
text-transform:uppercase;
}