docs-v2/assets/styles/layouts/_top-nav.scss

225 lines
4.6 KiB
SCSS

.topnav {
display: flex;
padding: .75rem .75rem .65rem;
justify-content: space-between;
position: relative;
box-sizing: border-box;
z-index: 1;
.influx-home {
font-family: 'icomoon';
font-size: 1.9rem;
color: $topnav-link;
text-decoration: none;
vertical-align: middle;
&:hover {
color: $topnav-link-hover;
}
.icon-influx-logotype {
margin-left: .15rem;
}
}
.divider {
height: 100%; border-left: 1px solid rgba($topnav-link, .5);
margin: 0 1rem 0 .65rem;
}
.docs-home {
display: inline-block;
vertical-align: text-top;
font-style: italic;
font-weight: $medium;
font-size: 1.1rem;
color: $topnav-link;
text-decoration: none;
&:hover {
color: $topnav-link-hover;
}
}
.topnav-left {
z-index: 1;
}
.topnav-right {
display: flex;
position: absolute;
right: .75rem;
top: .75rem;
}
.selector-dropdowns {
display: flex;
z-index: 100;
padding-right: .25rem;
}
.dropdown {
display: inline-block;
position: relative;
align-self: flex-start;
margin-left: .25rem;
color: $g20-white;
height: 2rem;
@include gradient($default-dropdown-gradient);
background-attachment: local !important;
font-weight: $medium;
border-radius: $radius;
overflow: hidden;
cursor: pointer;
.selected {
padding: 0 1.75rem 0 .75rem;
line-height: 0;
}
&:after {
content: "\e918";
font-family: 'icomoon';
position: absolute;
top: .45rem;
right: .4rem;
transition: all .3s;
}
&.open {
height: auto;
max-height: calc(100vh - 2rem);
overflow-y: scroll;
&:after {
transform: rotate(180deg);
}
}
ul.item-list {
padding: 0;
margin: 0;
list-style: none;
display: flex;
flex-direction: column-reverse;
&.products{
li {
&:before {
display: inline-block;
font-size: .8rem;
color: $g2-kevlar;
font-style: italic;
font-weight: bold;
opacity: .65;
mix-blend-mode: multiply;
}
&:last-child:before {
content: "Products";
margin: .3rem .75rem .15rem;
}
&.flux:before {
content: "Languages";
margin: .75rem .75rem .15rem;
}
}
}
}
a {
display: block;
text-decoration: none;
color: $g20-white;
padding: .4rem 1.5rem .4rem .75rem;
background: rgba($g20-white, 0);
&:hover { background: rgba($g20-white, .2) }
&.active { background: rgba($g20-white, .2) }
&:last-child {
border-radius: 0 0 $radius $radius;
position: relative;
}
&.legacy {
position: relative;
&:after {
content: "\e911";
font-family: "icomoon";
position: absolute;
opacity: .4;
margin-left: .25rem;
}
}
}
}
.buttons {
display: flex;
margin-left: .5rem;
}
.theme-switcher, #search-btn, .url-trigger {
display: inline-block;
padding: 0;
font-size: 1.8rem;
line-height: 0;
color: rgba($topnav-link, .5);
background: none;
height: 30px;
width: 30px;
border: none;
transition: color .2s, opacity .2s;
appearance: none;
overflow: visible;
&:focus {
outline: none;
}
&:hover {
color: rgba($topnav-link, 1);
cursor: pointer;
}
&#theme-switch-dark { display: $theme-switch-dark; }
&#theme-switch-light { display: $theme-switch-light; }
}
.url-trigger {
font-size: 1.1rem;
vertical-align: top;
z-index: 1;
}
.search-btn {
margin-top: .15rem;
width: 0;
opacity: 0;
}
}
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// MEDIA QUERIES ////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
@include media(medium){
.docs-home {
.long { display: none; }
.short:after { content: "s" }
}
}
@include media(small) {
.icon-influx-logotype { display: none; }
.topnav { min-height: 5.75rem; }
.topnav-right {
flex-direction: column-reverse;
align-items: flex-end;
width: calc(100% - 1.5rem);
}
.search-btn { display: none; }
.selector-dropdowns {
width: 100%;
margin-top: .6rem;
.dropdown {
flex-grow: 1;
height: 2.24rem;
.selected { padding: .12rem 1.75rem .12rem .75rem; }
&:after { top: .57rem; }
}
}
}