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> <body>
<div class="gangsta-wrap"> <div class="gangsta-wrap">
<div class="header"> <div class="header">
<span class="title"><a href="/">{{ $title }}</a></span> <div>
<img src="{{ $logo }}" alt="logo" class="logo"/> <img src="{{ $logo }}" alt="logo" class="logo"/>
<span class="title"><a href="/">{{ $title }}</a></span>
</div>
<div class="right-links"> <div class="right-links">
{{ with $resources }} {{ with $resources }}
<a href="{{ . }}" class="button resources-link">Resources</a> <a href="{{ . }}" class="button resources-link">Resources</a>

View File

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

View File

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