No more floats. Flex out! 💪

This commit is contained in:
steveoh 2017-08-30 19:02:11 -06:00
parent 59c9ec9774
commit 9ad492dfbe
3 changed files with 52 additions and 37 deletions

View File

@ -24,8 +24,10 @@
<body>
<div class="gangsta-wrap">
<div class="header">
<span class="title"><a href="/">{{ $title }}</a></span>
<div>
<img src="{{ $logo }}" alt="logo" class="logo"/>
<span class="title"><a href="/">{{ $title }}</a></span>
</div>
<div class="right-links">
{{ with $resources }}
<a href="{{ . }}" class="button resources-link">Resources</a>

View File

@ -1,18 +1,21 @@
{{- $severity := .Params.severity | default "under-maintenance" -}}
{{- $alert := index .Site.Data.severity.alerts $severity -}}
<div class="incident card">
<div class="incident-header">
<p class="incident-title">{{ .Title }}</p>
<div class="pull-right">
<p class="affected-systems">Affected Systems: <span class="incident-status color-{{ $alert }}">{{ delimit .Params.affectedsystems ", " }}</span>
</p>
<p class=incident-date>{{- dateFormat "02 Jan 2006 15:04 MST" .Date -}}</p>
</div>
<div class="flex-out">
<h1 class="incident-title">{{ .Title }}</h1>
<p class="small mute">{{- dateFormat "02 Jan 2006 15:04 MST" .Date -}}</p>
</div>
<div class="incident-description">
{{- .Content -}}
</div>
<p class="incident-status color-{{ $alert }}">
{{- index .Site.Data.severity.descriptions $severity -}}
</p>
<div class="incident-status">
<p class="color-{{ $alert }}">
{{- index .Site.Data.severity.descriptions $severity -}}
</p>
<p class="small">Affected Systems:
<span class="color-{{ $alert }}">
{{- delimit .Params.affectedsystems ", " -}}
</span>
</p>
</div>
</div>

View File

@ -28,6 +28,9 @@ a:active {
margin-bottom: 40px;
padding: 16px 0 24px 0;
border-bottom: 2px solid #F7F7F8;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.logo {
@ -52,18 +55,14 @@ a:active {
text-decoration: none;
}
.right-links {
float: right;
}
@media (max-width: 450px) {
.right-links {
float: left;
margin-top: 24px;
}
.header {
padding-bottom: 68px;
flex-direction: column;
}
}
@ -109,8 +108,8 @@ a:active {
padding: 16px;
border-radius: 10px;
background: #fff;
box-shadow: 0px 4px 8px 0px rgba(0,0,0,.05);
border: 1px solid #fbfbfb;
box-shadow: 0px 4px 8px 0px rgba(0,0,0,.1);
border: 1px solid #eaeaea;
font-size: 16px;
font-weight: 500;
@ -138,33 +137,27 @@ a:active {
height: 16px;
}
.incident h1 {
font-size: 1.5em;
margin-top: 0;
}
.incident {
color: #202020;
}
.incident-title {
float: left;
text-transform: capitalize;
width: 75%;
}
.pull-right {
float: right;
}
.incident-date {
font-size: 14px;
opacity: 0.3;
}
.affected-systems {
font-size: 14px;
opacity: 0.7;
}
@media (max-width: 450px) {
@media (max-width: 725px) {
.incident-date {
width: 100%;
}
.incident-title {
width: 100%;
}
}
.incident-description {
@ -172,10 +165,25 @@ a:active {
font-weight: 400;
}
.separate {
text-align: right;
padding-bottom: 1em;
border-bottom: 2px solid #F7F7F8;
}
.incident-status {
display: flex;
flex-direction: row;
justify-content: space-between;
margin: 24px 0 0 0;
}
.flex-out {
display: flex;
flex-direciton: row;
justify-content: space-between;
}
.system-check-ok {
margin: 80px auto 104px auto;
width: 100%;
@ -198,7 +206,6 @@ a:active {
font-size: 16px;
font-weight: 500;
border-bottom: 2px solid #F7F7F8;
color: #bbb;
}
.see-more {
@ -229,6 +236,11 @@ a:active {
.mute {
opacity: 0.7;
}
.small {
font-size: 14px;
}
.incident-summary {
margin-bottom: 24px;
overflow: hidden;
@ -236,13 +248,11 @@ a:active {
.article-title {
width: 70%;
float: left;
text-transform: capitalize;
}
.article-date {
width: 29%;
float: right;
text-align: right;
font-size: 14px;
}