# 在标题链接中显示 StatusPage 状态

**URL:** <https://meta.discourse.org/t/display-statuspage-status-on-as-a-header-link/110108>\
**Category:** UX\
**Created:** [2019 年2 月 26 日 10:43 UTC](https://meta.discourse.org/t/display-statuspage-status-on-as-a-header-link/110108 "2019-02-26T10:43:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![Kyle\_Risi](https://avatars.discourse-cdn.com/v4/letter/k/b5ac83/32.png) [@Kyle\_Risi](https://meta.discourse.org/u/Kyle_Risi)\
发布日期： [2019 年2 月 26 日 10:43 UTC](https://meta.discourse.org/t/display-statuspage-status-on-as-a-header-link/110108/1 "2019-02-26T10:43:09Z")

</div>

Hi Team,

I have a script which pulls our systems status from our [statuspage.io](http://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.

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/1/91e3f382504ddfee3e14866134843e445d879a4f.png)

I am really struggeling to work out how to display this before my header icons rather than above my header, something like this

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/6/d602c5c9bca1d88d95fabce606444de74c100353.png)

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;
}

```

---

_[View the full topic](https://meta.discourse.org/t/display-statuspage-status-on-as-a-header-link/110108)._
