Commit 1ee5ce05 authored by kushalpandya's avatar kushalpandya

Make trial banner dismissiable using BS alert

parent 77ee0171
...@@ -318,25 +318,17 @@ header { ...@@ -318,25 +318,17 @@ header {
} }
} }
.gitlab-ee-trial-banner { .gitlab-ee-trial-banner.alert {
padding: $gl-padding;
text-align: center; text-align: center;
p { p a {
margin: 0; color: $gl-link-color;
display: inline-block; text-decoration: none;
a {
font-weight: bold; font-weight: bold;
}
}
.close-trial-banner {
float: right;
margin-top: 2px;
&:hover { &:hover {
cursor: pointer; color: $gl-link-hover-color;
text-decoration: underline;
} }
} }
} }
......
- if license_message.present? - if license_message.present?
.gitlab-ee-trial-banner .alert.alert-dismissible.gitlab-ee-trial-banner.js-gitlab-ee-trial-banner{ role: 'alert' }
%p= license_message %button.close{ type: 'button', 'data-dismiss' => 'alert', 'aria-label' => 'Dismiss banner' }
%button.btn.btn-default.close.close-trial-banner.js-close-trial-banner{ type: 'button', 'aria-label' => 'Dismiss banner' }
= icon('times', 'aria-hidden' => 'true') = 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 .navbar-border
%a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content %a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content
.container-fluid .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