mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +03:00
Side menu styling
This commit is contained in:
parent
917fd7632b
commit
96418ba54d
|
@ -1,7 +1,12 @@
|
|||
$headers-color: #00329F;
|
||||
$method-headers-color: #253137;
|
||||
|
||||
$side-menu-item-color: #384248;
|
||||
$side-menu-bg-color: #FAFAFA;
|
||||
$side-menu-even-bg-color: #F0F0F0;
|
||||
$side-menu-active-bg-color: #E6E6E6;
|
||||
$side-menu-item-hpadding: 20px;
|
||||
$side-menu-item-vpadding: 5px;
|
||||
$side-menu-width: 260px;
|
||||
|
||||
$samples-panel-bg-color: #263238;
|
||||
|
|
|
@ -7,6 +7,10 @@ side-menu {
|
|||
|
||||
api-info, side-menu {
|
||||
display: block;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
api-info {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<h2 class="menu-header"> Api reference </h2>
|
||||
<div *ng-for="var cat of data.menu; #idx = index">
|
||||
<div *ng-for="var cat of data.menu; #idx = index" class="menu-cat">
|
||||
|
||||
<label class="menu-cat-header" (click)="activateAndScroll(idx, -1)" [ng-class]="{active: cat.active}"> {{cat.name}}</label>
|
||||
<ul class="menu-subitems" [ng-class]="{active: cat.active}">
|
||||
|
|
|
@ -1,25 +1,30 @@
|
|||
@import '../../common/styles/variables';
|
||||
|
||||
.menu-header {
|
||||
text-transform: uppercase;
|
||||
color: #1976D3;
|
||||
color: $headers-color;
|
||||
padding: 0 $side-menu-item-hpadding;
|
||||
}
|
||||
|
||||
$side-menu-item-color: #384248;
|
||||
$side-menu-bg: #FAFAFA;
|
||||
$side-menu-even-bg: #F0F0F0;
|
||||
$side-menu-active-bg-color: #E6E6E6;
|
||||
|
||||
.menu-cat-header {
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
color: $side-menu-item-color;
|
||||
text-transform: uppercase;
|
||||
background-color: $side-menu-bg;
|
||||
background-color: $side-menu-bg-color;
|
||||
|
||||
display: block;
|
||||
padding: $side-menu-item-vpadding $side-menu-item-hpadding;
|
||||
}
|
||||
|
||||
.menu-cat:nth-of-type(even) .menu-cat-header {
|
||||
background-color: $side-menu-even-bg-color;
|
||||
}
|
||||
|
||||
.menu-subitems {
|
||||
padding-left: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -30,10 +35,31 @@ $side-menu-active-bg-color: #E6E6E6;
|
|||
|
||||
.menu-subitems li {
|
||||
list-style: none inside none;
|
||||
padding: 5px 0;
|
||||
cursor: pointer;
|
||||
|
||||
padding: $side-menu-item-vpadding 0;
|
||||
padding-left: $side-menu-item-hpadding*2;
|
||||
background-color: $side-menu-bg-color;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.menu-item.active, .menu-subitems li.active {
|
||||
color: #1976D3;
|
||||
.menu-subitems li:nth-of-type(even) {
|
||||
background-color: $side-menu-even-bg-color;
|
||||
}
|
||||
|
||||
// invert item colors for odd categories
|
||||
.menu-cat:nth-of-type(odd) {
|
||||
.menu-subitems li {
|
||||
background-color: $side-menu-even-bg-color;
|
||||
}
|
||||
|
||||
.menu-subitems li:nth-of-type(even) {
|
||||
background-color: $side-menu-bg-color;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-cat-header.active, .menu-subitems li.active {
|
||||
background-color: $side-menu-active-bg-color !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user