-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2539 from exadel-inc/tech/site-banner-upd
refactor(site): update site contribution banner
- Loading branch information
Showing
9 changed files
with
82 additions
and
125 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 |
---|---|---|
@@ -1,88 +1,46 @@ | ||
@import (reference) '../common/variables.less'; | ||
|
||
.banner { | ||
position: relative; | ||
border: 2px solid @primary-green; | ||
border-radius: 1rem; | ||
box-shadow: 0 0 6px @primary-green; | ||
background-color: #fff; | ||
|
||
text-align: center; | ||
font-weight: 500; | ||
color: mix(@primary-green-dark, #fff, 75%); | ||
|
||
padding: 1rem; | ||
@media @sm-xl { | ||
padding: 2rem; | ||
} | ||
|
||
.banner-title { | ||
font-weight: 600; | ||
color: @primary-green-dark; | ||
} | ||
|
||
p:last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
a[href] { | ||
text-decoration-color: @primary-green-dark; | ||
} | ||
|
||
.close { | ||
position: absolute; | ||
top: 0.75rem; | ||
right: 1.1rem; | ||
color: inherit; | ||
} | ||
|
||
&:focus, | ||
&:focus-within { | ||
outline: none; | ||
box-shadow: 0 0 10px @primary-green; | ||
} | ||
} | ||
|
||
esl-d-banner { | ||
display: none; | ||
} | ||
.esl-d-banner { | ||
display: block; | ||
position: fixed; | ||
z-index: 1000; | ||
@animationTime: 0.5s; | ||
|
||
right: 1.5rem; | ||
bottom: 1.5rem; | ||
width: 40rem; | ||
max-width: calc(100% - 3rem); | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: flex-end; | ||
|
||
@media @sm-xl { | ||
right: 2.5rem; | ||
bottom: 2.5rem; | ||
max-width: calc(100% - 5rem); | ||
} | ||
margin-top: 2rem; | ||
margin-bottom: 1.5rem; | ||
|
||
visibility: hidden; | ||
transition: | ||
visibility 1s, | ||
transform 1s, | ||
opacity 1s; | ||
opacity: 0; | ||
transform: translate3d(4rem, 0, 0); | ||
pointer-events: none; | ||
|
||
&:not(.open) .banner { | ||
display: none; | ||
} | ||
transition: | ||
visibility 1s linear, | ||
opacity 0.5s linear; | ||
|
||
&.open { | ||
&[open] { | ||
visibility: visible; | ||
opacity: 1; | ||
transform: translate3d(0, 0, 0); | ||
transition: | ||
visibility 0s, | ||
transform 1s, | ||
opacity 1s; | ||
pointer-events: all; | ||
visibility 0s linear, | ||
opacity 0.5s linear; | ||
} | ||
|
||
.alert { | ||
position: relative; | ||
transition: opacity 0.2s linear; | ||
|
||
&:not(:focus-within):not(:hover) { | ||
opacity: 0.6; | ||
} | ||
|
||
a::after { | ||
content: ''; | ||
position: absolute; | ||
inset: 0; | ||
} | ||
} | ||
|
||
.close-button { | ||
position: relative; | ||
z-index: 1; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -64,6 +64,9 @@ | |
&-white { | ||
color: #fff !important; | ||
} | ||
&-info { | ||
color: @primary-green-dark !important; | ||
} | ||
} | ||
|
||
// Borders | ||
|
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 |
---|---|---|
|
@@ -35,4 +35,10 @@ | |
font-weight: 500; | ||
letter-spacing: 1px; | ||
} | ||
|
||
&.no-margin { | ||
p:last-child { | ||
margin-block-end: 0; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
.footer-compact { | ||
padding: 15px 0; | ||
|
||
&-divider { | ||
margin-top: 0; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
title: "Contribute to ESL documentation" | ||
cookie: contrib-doc-hide | ||
content: | | ||
Found a typo? Have an interesting usage example to share? Want to help improve our documentation? | ||
ⓘ Found a typo? Have an interesting usage example to share? Want to help improve our documentation? | ||
You are very welcome to contribute to ESL. Check out our [documentation contribution guide](/introduction/contribute/#contributing-to-esl-documentation). |
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 |
---|---|---|
@@ -1,15 +1,12 @@ | ||
{% if banner.title and not banner.disabled %} | ||
<esl-d-banner close-on=".close-button" | ||
cookie-name="{{banner.cookie or ''}}" | ||
role="note" | ||
aria-live="polite"> | ||
<div class="banner" tabindex="-1"> | ||
<h5 class="banner-title h4">{{ banner.title }}</h5> | ||
<div class="markdown-container">{% markdown %} {{ banner.content }} {% endmarkdown %}</div> | ||
<esl-d-banner class="footer-banner container" cookie-name="{{banner.cookie or ''}}"> | ||
<div class="alert alert-info esl-animate-slide up"> | ||
<button type="button" class="close close-button" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
|
||
<button type="button" class="close close-button" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
</esl-d-banner> | ||
<h5>{{ banner.title }}</h5> | ||
<div class="markdown-container no-margin small">{% markdown %} {{ banner.content }} {% endmarkdown %}</div> | ||
</div> | ||
</esl-d-banner> | ||
{% endif %} |
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