-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(orange navbar): supra bar (#795)
* Supra bar standard — WEB-GLH-SUB-001 * Supra bar with language options — WEB-GLH-SUB-002 * Supra bar with actions — WEB-GLH-SUB-003
- Loading branch information
Kévin Le Diouron
authored
Dec 1, 2021
1 parent
3fbe7c1
commit 4b4666c
Showing
13 changed files
with
255 additions
and
6 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
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 |
---|---|---|
|
@@ -46,6 +46,7 @@ | |
"favicons", | ||
"fieldsets", | ||
"flexbox", | ||
"française", | ||
"fullscreen", | ||
"fusv", | ||
"getbootstrap", | ||
|
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,63 @@ | ||
// Contents | ||
// | ||
// Supra bar | ||
|
||
|
||
// Supra bar | ||
// | ||
// Brand exclusive thin navbar that can be used with orange navbar | ||
.supra { | ||
display: none; | ||
padding-top: 0; | ||
padding-bottom: 0; | ||
border-bottom: $navbar-orange-supra-border-bottom-width solid $gray-700; | ||
|
||
.container { | ||
padding-right: $navbar-orange-supra-padding-x; | ||
padding-left: $navbar-orange-supra-padding-x; | ||
} | ||
|
||
@include media-breakpoint-up(md) { | ||
display: flex; | ||
} | ||
|
||
.navbar-nav .nav-link { | ||
padding: $navbar-orange-supra-link-padding-top $navbar-orange-supra-link-padding-x $navbar-orange-supra-link-padding-bottom; | ||
font-size: $font-size-sm; | ||
line-height: $line-height-sm; | ||
|
||
&.active::before { | ||
right: $navbar-orange-supra-link-padding-x; | ||
bottom: -$navbar-orange-supra-border-bottom-width; | ||
left: $navbar-orange-supra-link-padding-x; | ||
} | ||
|
||
&.nav-icon { | ||
padding: $navbar-orange-supra-icon-padding-top $navbar-orange-supra-icon-padding-x $navbar-orange-supra-icon-padding-bottom; | ||
|
||
svg, | ||
img { | ||
width: $navbar-orange-supra-icon-size; | ||
height: $navbar-orange-supra-icon-size; | ||
} | ||
} | ||
|
||
.badge { | ||
@extend .position-absolute; | ||
@extend .top-0; | ||
@extend .bg-info; | ||
@extend .text-white; | ||
@extend .translate-middle; | ||
@extend .rounded-pill; | ||
padding: $navbar-orange-supra-badge-padding-y $navbar-orange-supra-badge-padding-x; | ||
margin-top: $navbar-orange-supra-badge-margin-top; | ||
font-size: $font-size-base; | ||
} | ||
} | ||
|
||
.nav-item:last-of-type { | ||
.nav-icon { | ||
padding-right: $navbar-orange-supra-link-padding-x; | ||
} | ||
} | ||
} |
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,79 @@ | ||
--- | ||
layout: docs | ||
title: Orange Navbar | ||
description: Documentation and examples for Boosted's exclusive Brand responsive navbars. | ||
group: components | ||
toc: true | ||
--- | ||
|
||
## How it works | ||
|
||
Orange navbar is based on the [navbar]({{<docsref "/components/navbar">}}) component. It adds some display management and introduces the supra bar component. | ||
You may refer to its documentation in order to properly create and use navbars. | ||
|
||
## Example | ||
|
||
### Supra bar | ||
|
||
A simple navigation can be added on top of Orange navbar, it is called supra bar. Simply add the `.supra` class in your navbar declaration. | ||
|
||
{{< callout warning >}} | ||
This navbar is visible only on desktop view. | ||
{{< /callout >}} | ||
|
||
{{< example >}} | ||
{{< orange-supra >}} | ||
<ul class="navbar-nav ml-auto"> | ||
<li class="nav-item"><a class="nav-link active" href="#" aria-label="English version">EN</a></li> | ||
<li class="nav-item"><a class="nav-link" href="#" aria-label="Version française" lang="fr" hreflang="fr">FR</a></li> | ||
<li class="nav-item"><a class="nav-link" href="#" aria-label="Version en español" lang="es" hreflang="es">ES</a></li> | ||
</ul> | ||
{{< /orange-supra >}} | ||
{{< /example >}} | ||
|
||
You can also use icons as navigation items as followed: | ||
|
||
{{< example >}} | ||
{{< orange-supra >}} | ||
<ul class="navbar-nav ml-auto"> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link nav-icon"> | ||
<svg fill="currentColor" aria-hidden="true" focusable="false" class="overflow-visible"> | ||
<use xlink:href="/docs/5.1/assets/img/boosted-sprite.svg#search"/> | ||
</svg> | ||
<span class="visually-hidden">Search</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link nav-icon"> | ||
<svg fill="currentColor" aria-hidden="true" focusable="false" class="overflow-visible"> | ||
<use xlink:href="/docs/5.1/assets/img/boosted-sprite.svg#buy"/> | ||
</svg> | ||
<span class="visually-hidden">Basket</span> | ||
<span class="position-relative"> | ||
<span class="badge"> | ||
1 | ||
<span class="visually-hidden">shopping basket items</span> | ||
</span> | ||
</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link nav-icon"> | ||
<img src="/docs/5.1/assets/img/navbar-contact.png" role="img" alt="User" loading="lazy" aria-hidden="true"> | ||
<span class="visually-hidden">My account</span> | ||
</a> | ||
</li> | ||
</ul> | ||
{{< /orange-supra >}} | ||
{{< /example >}} | ||
|
||
You can have a complete overview of how to use supra bars in the dedicated [Design Guidelines page]({{<docsref "/guidelines/global-headers">}}) | ||
|
||
## Sass | ||
|
||
### Variables | ||
|
||
For more details, please have a look at the exhaustive list of available variables: | ||
|
||
{{< scss-docs name="orange-navbar-variables" file="scss/_variables.scss" >}} |
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,15 @@ | ||
{{- /* | ||
Usage: `orange-supra` | ||
*/ -}} | ||
|
||
{{- $input := .Inner -}} | ||
|
||
<nav class="navbar navbar-dark navbar-expand bg-dark supra"> | ||
<div class="container"> | ||
<ul class="navbar-nav"> | ||
<li class="nav-item"><a href="#" class="nav-link active" aria-current="page">Personal</a></li> | ||
<li class="nav-item"><a href="#" class="nav-link">Business</a></li> | ||
</ul> | ||
{{- $input -}} | ||
</div> | ||
</nav> |
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.