forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2ac0c4
commit 57451bc
Showing
18 changed files
with
164 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{# | ||
This Source Code Form is subject to the terms of the Mozilla Public | ||
License, v. 2.0. If a copy of the MPL was not distributed with this | ||
file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
#} | ||
|
||
{# Exclude banners from search result snippets using `data-nosnippet` (issue 8739) #} | ||
<aside class="c-banner hide-from-legacy-ie {% block banner_class %}{% endblock %}" id="{% block banner_id %}{% endblock %}" data-nosnippet="true"> | ||
<button type="button" class="c-banner-close"><span>{{ ftl('ui-close') }}</span></button> | ||
{% block banner_content %}{% endblock%} | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
$font-path: '/media/protocol/fonts'; | ||
$image-path: '/media/protocol/img'; | ||
|
||
@import '~@mozilla-protocol/core/protocol/css/includes/lib'; | ||
|
||
.c-banner { | ||
@include clearfix; | ||
padding: $spacing-lg 0; | ||
position: relative; | ||
z-index: 3; | ||
|
||
// hide by default if JS is available to avoid flicker | ||
// (if visitor previously dismissed) | ||
.js & { | ||
display: none; | ||
} | ||
|
||
// conditional class used to display the banner. | ||
&.c-banner-is-visible { | ||
display: block; | ||
} | ||
} | ||
|
||
.c-banner-title { | ||
@include text-title-lg; | ||
} | ||
|
||
.c-banner-tagline { | ||
@include text-body-xl; | ||
} | ||
|
||
// Close button | ||
.c-banner-close { | ||
@include background-size(20px 20px); | ||
@include bidi(((right, $spacing-sm, auto), (left, auto, $spacing-sm))); | ||
@include image-replaced; | ||
background: transparent url('#{$image-path}/icons/close.svg') center center no-repeat; | ||
border: none; | ||
cursor: pointer; | ||
display: none; | ||
height: 42px; | ||
min-width: 0; | ||
padding: 0; | ||
position: absolute; | ||
top: $spacing-sm; | ||
width: 42px; | ||
z-index: 1; | ||
|
||
&:hover, | ||
&:focus { | ||
@include transition(transform 0.1s ease-in-out); | ||
@include transform(scale(1.1)); | ||
} | ||
|
||
&:focus { | ||
outline: 1px dotted $color-white; | ||
} | ||
|
||
// hide the 'Close' text | ||
span { | ||
@include visually-hidden; | ||
} | ||
|
||
// only display when JS is available | ||
.js & { | ||
display: block; | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters