grafana/public/sass/layout/_page.scss

209 lines
3.8 KiB
SCSS
Raw Normal View History

2016-02-15 08:27:41 -06:00
.grafana-app {
display: flex;
align-items: stretch;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
2016-02-15 08:27:41 -06:00
}
.main-view {
position: relative;
flex-grow: 1;
2017-08-17 14:32:23 -05:00
background: $page-gradient;
2016-02-15 08:27:41 -06:00
}
.page-container {
@extend .container;
padding: $spacer $spacer $spacer $spacer*3;
}
2017-08-14 09:06:20 -05:00
.scroll-canvas {
position: absolute;
width: 100%;
2017-08-15 02:46:38 -05:00
overflow: auto;
2017-08-16 04:28:52 -05:00
height: 100%;
&--dashboard {
2017-08-16 04:28:52 -05:00
height: calc(100% - 54px);
}
2017-08-14 09:06:20 -05:00
}
.page-body {
@include media-breakpoint-up(md) {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
}
.page-content-with-sidebar {
width: calc(100% - #{$page-sidebar-width + $page-sidebar-margin}); // sidebar width + margin
}
.page-sidebar {
@include media-breakpoint-up(md) {
width: $page-sidebar-width;
margin-left: $page-sidebar-margin;
}
}
2016-02-15 08:27:41 -06:00
.page-header {
2017-08-15 13:24:16 -05:00
padding: 2rem 0 0 0;
2017-08-14 11:11:35 -05:00
margin-bottom: 2rem;
@include brand-bottom-border();
@include clearfix();
2016-02-15 08:27:41 -06:00
h1 {
2017-08-14 09:06:20 -05:00
font-size: $font-size-h2;
flex-grow: 1;
display: inline-block;
2017-08-15 16:17:34 -05:00
margin-bottom: 1rem;
img {
width: 30px;
height: 30px;
border-radius: 50%;
margin-right: 0.5rem;
position: relative;
top: -3px;
}
}
2017-08-15 10:52:52 -05:00
a, button {
float: right;
margin-left: $spacer;
2017-08-20 14:16:40 -05:00
// better align icons
.fa {
position: relative;
top: 1px;
}
2017-08-15 10:52:52 -05:00
}
2017-08-14 09:06:20 -05:00
}
2017-08-20 14:16:40 -05:00
.page-heading {
font-size: 1.25rem;
margin-top: 0;
2016-02-18 12:47:00 -06:00
margin-bottom: $spacer * 0.7;
}
2016-02-15 08:27:41 -06:00
.admin-page {
max-width: 800px;
margin-left: 10px;
h2 {
margin-left: 15px;
margin-bottom: 0px;
2016-02-16 02:42:46 -06:00
font-size: $font-size-lg;
color: $text-color;
2016-02-15 08:27:41 -06:00
i {
padding-right: 6px;
}
}
}
.page-sidebar {
color: $text-color-weak;
h4 {
font-size: $font-size-base;
font-weight: $font-weight-semi-bold;
}
h5 {
font-size: $font-size-base;
font-weight: $font-weight-semi-bold;
}
}
.page-sidebar-section {
margin-bottom: $spacer*2;
}
2017-08-14 09:06:20 -05:00
2017-11-23 14:48:25 -06:00
.page-breadcrumbs {
2017-08-14 09:06:20 -05:00
display: flex;
2017-11-24 09:18:56 -06:00
padding: 10px 25px;
line-height: 0.5;
2017-08-14 09:06:20 -05:00
}
2017-11-23 14:48:25 -06:00
.breadcrumb {
display: inline-block;
box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.35);
overflow: hidden;
border-radius: 5px;
counter-reset: flag;
}
.breadcrumb-item {
text-decoration: none;
outline: none;
display: block;
float: left;
font-size: 12px;
2017-11-29 06:21:42 -06:00
line-height: 30px;
2017-11-23 14:48:25 -06:00
padding: 0 7px 0 37px;
@include gradientBar($btn-inverse-bg, $btn-inverse-bg-hl, $btn-inverse-text-color);
position: relative;
box-shadow: $card-shadow;
2017-08-14 11:11:35 -05:00
2017-10-18 02:48:37 -05:00
&:first-child {
2017-11-29 06:21:42 -06:00
padding-left: 10px;
2017-11-23 14:48:25 -06:00
border-radius: 5px 0 0 5px; /*to match with the parent's radius*/
2017-11-29 06:21:42 -06:00
font-size: 18px;
2017-11-23 14:48:25 -06:00
}
&:first-child:before {
left: 14px;
}
&:last-child {
border-radius: 0 5px 5px 0; /*this was to prevent glitches on hover*/
padding-right: 20px;
}
&.active,
&:hover {
background: #333;
background: linear-gradient(#333, #000);
}
&.active:after,
&:hover:after {
background: #333;
background: linear-gradient(135deg, #333, #000);
2017-10-18 02:48:37 -05:00
}
2017-11-23 14:48:25 -06:00
&:after {
2017-10-18 02:48:37 -05:00
content: '';
position: absolute;
2017-11-23 14:48:25 -06:00
top: 0;
2017-11-29 06:21:42 -06:00
right: -14px; // half of square's length
2017-11-23 14:48:25 -06:00
// same dimension as the line-height of .breadcrumb-item
2017-11-29 06:21:42 -06:00
width: 30px;
height: 30px;
2017-11-23 14:48:25 -06:00
transform: scale(0.707) rotate(45deg);
// we need to prevent the arrows from getting buried under the next link
2017-10-18 02:48:37 -05:00
z-index: 1;
2017-08-14 12:47:40 -05:00
2017-11-23 14:48:25 -06:00
// background same as links but the gradient will be rotated to compensate with the transform applied
background: linear-gradient(135deg, $btn-inverse-bg, $btn-inverse-bg-hl);
2017-08-14 12:47:40 -05:00
2017-11-23 14:48:25 -06:00
// stylish arrow design using box shadow
box-shadow: 2px -2px 0 2px rgb(35, 31, 31), 3px -3px 0 2px rgba(255, 255, 255, 0.1);
2017-08-14 12:47:40 -05:00
2017-11-23 14:48:25 -06:00
// 5px - for rounded arrows and
// 50px - to prevent hover glitches on the border created using shadows*/
border-radius: 0 5px 0 50px;
}
2017-08-14 12:47:40 -05:00
2017-11-23 14:48:25 -06:00
// we dont need an arrow after the last link
&:last-child:after {
content: none;
2017-08-14 11:11:35 -05:00
}
}
2017-11-23 14:48:25 -06:00