Skip to content

Commit

Permalink
💄 Add UI for degraded
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 23, 2020
1 parent 29ceb73 commit 376bdf9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/components/ActiveIncidents.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
article {
background-color: #ffdce3;
}
article.degraded {
background-color: #ffdfad;
}
article.good {
background-color: #dcffeb;
color: #003300;
Expand All @@ -60,7 +63,7 @@
{:else if incidents.length}
<h2>{config.i18n.activeIncidents}</h2>
{#each incidents as incident}
<article class="down link">
<article class="down link {incident.title.includes('degraded') ? 'degraded' : ''}">
<div class="f">
<div>
<h4>{incident.title.replace('🛑', '').replace('⚠️', '').trim()}</h4>
Expand Down
2 changes: 1 addition & 1 deletion src/components/History.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{#if incident.showHeading}
<h3>{new Date(incident.created_at).toLocaleDateString()}</h3>
{/if}
<article class="down link">
<article class="down link {incident.title.includes('degraded') ? 'degraded' : ''}">
<div class="f">
<div>
<h4>{incident.title.replace('🛑', '').replace('⚠️', '').trim()}</h4>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Incidents.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
{#if incident.showHeading}
<h3>{new Date(incident.created_at).toLocaleDateString()}</h3>
{/if}
<article class="down link">
<article class="down link {incident.title.includes('degraded') ? 'degraded' : ''}">
<div class="f">
<div>
<h4>{incident.title.replace('🛑', '').replace('⚠️', '').trim()}</h4>
Expand Down
10 changes: 8 additions & 2 deletions static/global.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
body {
margin: 0;
font-family: Roboto, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-family: Roboto, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Cantarell,
Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
line-height: 1.5;
padding-bottom: 2.5rem;
color: #333;
Expand Down Expand Up @@ -79,6 +79,9 @@ h4 {
article.down {
border-left: 0.2rem solid #e74c3c;
}
article.degraded {
border-left: 0.2rem solid #f39c12 !important;
}
article.up {
border-left: 0.2rem solid #2ecc71;
}
Expand All @@ -102,6 +105,9 @@ section + h2 {
.tag.down {
background-color: #c0392b;
}
.tag.degraded {
background-color: #f39c12 !important;
}
.tag {
display: inline-block;
color: #fff;
Expand Down

0 comments on commit 376bdf9

Please sign in to comment.