Merge pull request #1810 from hashicorp/jt-enterprise-bnr-fix

Enerprise bnr caused header to display incorrectly on subpages
This commit is contained in:
James Phillips 2016-03-08 15:02:57 -08:00
commit f6c9113437
3 changed files with 34 additions and 12 deletions

View File

@ -6,6 +6,38 @@ $enterprise-bnr-font-weight: 300;
$enterprise-bnr-consul-color: #B52A55; $enterprise-bnr-consul-color: #B52A55;
$enterprise-color-dark-white: #A9B1B5; $enterprise-color-dark-white: #A9B1B5;
body{
// when _announcment-bnr.erb (ie. Consul Enterprise Announcment) is being used in layout we need to push down content to accomodate
// add this class to body
&.-displaying-bnr{
#header{
> .container{
padding-top: 8px;
-webkit-transform: translateY(32px);
-ms-transform: translateY(32px);
transform: translateY(32px);
}
}
#jumbotron {
.container{
.jumbo-logo-wrap{
margin-top: 160px;
}
}
}
&.page-sub{
#header{
> .container{
padding-bottom: 32px;
}
}
}
}
}
#announcement-bnr { #announcement-bnr {
height: 40px; height: 40px;
flex-shrink: 0; flex-shrink: 0;

View File

@ -19,16 +19,6 @@ body.page-sub{
} }
#header { #header {
// when _announcment-bnr.erb (ie. Consul Enterprise Announcment) is being used in layout we need to push down content to accomodate
// add this class
&.-displaying-bnr{
> .container{
-webkit-transform: translateY(32px);
-ms-transform: translateY(32px);
transform: translateY(32px);
}
}
.navbar-brand { .navbar-brand {
.logo{ .logo{
width: $project-logo-width; width: $project-logo-width;

View File

@ -24,8 +24,8 @@
<%= yield_content :head %> <%= yield_content :head %>
</head> </head>
<body class="page-<%= current_page.data.page_title ? "#{current_page.data.page_title} layout-#{current_page.data.layout} page-sub" : "home layout-#{current_page.data.layout}" %>"> <body class="page-<%= current_page.data.page_title ? "#{current_page.data.page_title} layout-#{current_page.data.layout} page-sub" : "home layout-#{current_page.data.layout}" %> -displaying-bnr">
<div id="header" class="-displaying-bnr navigation <%= current_page.data.page_title == "home" ? "" : "navbar-static-top" %>"> <div id="header" class="navigation <%= current_page.data.page_title == "home" ? "" : "navbar-static-top" %>">
<%= partial "layouts/announcement-bnr" %> <%= partial "layouts/announcement-bnr" %>
<div class="container"> <div class="container">
<div class="row"> <div class="row">