Commit 1ee5ce05 authored by kushalpandya's avatar kushalpandya

Make trial banner dismissiable using BS alert

parent 77ee0171
......@@ -318,25 +318,17 @@ header {
}
}
.gitlab-ee-trial-banner {
padding: $gl-padding;
.gitlab-ee-trial-banner.alert {
text-align: center;
p {
margin: 0;
display: inline-block;
a {
font-weight: bold;
}
}
.close-trial-banner {
float: right;
margin-top: 2px;
p a {
color: $gl-link-color;
text-decoration: none;
font-weight: bold;
&:hover {
cursor: pointer;
color: $gl-link-hover-color;
text-decoration: underline;
}
}
}
......
- if license_message.present?
.gitlab-ee-trial-banner
%p= license_message
%button.btn.btn-default.close.close-trial-banner.js-close-trial-banner{ type: 'button', 'aria-label' => 'Dismiss banner' }
.alert.alert-dismissible.gitlab-ee-trial-banner.js-gitlab-ee-trial-banner{ role: 'alert' }
%button.close{ type: 'button', 'data-dismiss' => 'alert', 'aria-label' => 'Dismiss banner' }
= icon('times', 'aria-hidden' => 'true')
%header.navbar.navbar-gitlab{ class: "#{nav_header_class} #{ 'has-trial-banner' if trial_license_message.present?}" }
%p
= license_message
:javascript
$('.js-gitlab-ee-trial-banner').on('close.bs.alert', function() { $('.js-navbar-gitlab').removeClass('has-trial-banner'); });
%header.navbar.navbar-gitlab.js-navbar-gitlab{ class: "#{nav_header_class} #{ 'has-trial-banner' if trial_license_message.present?}" }
.navbar-border
%a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content
.container-fluid
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment