grafana/public/sass/components/_search.scss

298 lines
4.6 KiB
SCSS
Raw Normal View History

.search-backdrop {
position: fixed;
right: 0;
left: 0;
bottom: 0;
top: $navbarHeight;
z-index: $zindex-modal-backdrop;
background-color: $black;
2017-11-29 10:13:50 -06:00
@include opacity(75);
}
2016-02-15 08:27:41 -06:00
.search-container {
left: $side-menu-width;
top: 0;
right: 0;
2017-06-08 06:56:51 -05:00
bottom: 0;
z-index: ($zindex-modal-backdrop + 10);
2017-06-08 06:56:51 -05:00
position: fixed;
2016-02-15 08:27:41 -06:00
}
// Search
.search-field-wrapper {
width: 100%;
display: flex;
2017-11-23 04:37:59 -06:00
background-color: $navbarBackground;
box-shadow: $navbarShadow;
position: relative;
& > input {
max-width: 653px;
//padding: 0.5rem 1.5rem 0.5rem 0;
padding: 1rem 1rem 0.75rem 1rem;
height: 51px;
line-height: 51px;
2016-02-15 08:27:41 -06:00
box-sizing: border-box;
outline: none;
background: $side-menu-bg;
background-color: $navbarButtonBackground;
flex-grow: 10;
2016-02-15 08:27:41 -06:00
}
// .tag-filter {
// .Select-control {
// width: 300px;
// background-color: $navbarBackground;
// }
// }
}
.search-field-spacer {
flex-grow: 1;
}
2017-06-08 06:56:51 -05:00
.search-field-icon {
font-size: $font-size-lg;
2017-06-08 06:56:51 -05:00
padding: 1rem 1rem 0.75rem 1.5rem;
}
.search-dropdown {
display: flex;
2017-11-29 10:13:50 -06:00
flex-direction: row;
2017-11-01 10:59:20 -05:00
height: calc(100% - #{$navbarHeight});
2016-02-15 08:27:41 -06:00
}
2017-11-29 10:13:50 -06:00
.search-dropdown__col_1 {
background: $page-bg;
max-width: 700px;
display: flex;
flex-direction: column;
flex-grow: 1;
}
.search-dropdown__col_2 {
flex-grow: 1;
height: 100%;
padding-top: 16px;
display: flex;
flex-direction: column;
align-items: flex-start;
2017-11-29 10:13:50 -06:00
}
.search-filter-box {
background: $search-filter-box-bg;
border-radius: 2px;
padding: $spacer*1.5;
min-width: 340px;
2017-11-29 10:13:50 -06:00
margin-bottom: $spacer * 1.5;
margin-left: $spacer * 1.5;
}
.search-filter-box__header {
border-bottom: 1px solid $dark-5;
margin-bottom: $spacer * 1.5;
}
2017-12-12 08:13:47 -06:00
.search-filter-box-link {
2017-12-19 09:22:41 -06:00
display: block;
margin-bottom: 16px;
2017-12-12 08:13:47 -06:00
&:last-child {
margin-bottom: 0;
}
2017-12-19 09:22:41 -06:00
i,
img {
font-size: 20px;
2017-12-12 08:13:47 -06:00
margin-right: 5px;
}
}
2016-02-15 08:27:41 -06:00
.search-results-container {
2017-08-15 16:17:34 -05:00
height: 100%;
2016-02-15 08:27:41 -06:00
display: block;
padding: $spacer;
position: relative;
flex-grow: 10;
2017-11-29 06:21:42 -06:00
margin-bottom: 1rem;
2016-02-15 08:27:41 -06:00
.label-tag {
margin-left: 6px;
font-size: 11px;
padding: 2px 6px;
}
2016-02-15 08:27:41 -06:00
.selected {
.search-result-tag {
2017-12-19 09:22:41 -06:00
opacity: 0.7;
2016-02-15 08:27:41 -06:00
color: white;
}
}
2017-11-01 10:59:20 -05:00
}
2016-02-15 08:27:41 -06:00
2017-11-29 06:21:42 -06:00
.search-section {
background: $panel-bg;
border: $panel-border;
2017-12-12 08:13:47 -06:00
padding: 0px 4px 4px 4px;
margin-bottom: 3px;
border-radius: 5px;
2017-11-29 06:21:42 -06:00
}
2017-11-01 10:59:20 -05:00
.search-section__header {
font-size: $font-size-h6;
2017-12-12 08:13:47 -06:00
padding: 7px 4px 3px 0;
2017-11-01 10:59:20 -05:00
color: $text-color-weak;
display: flex;
flex-grow: 1;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
&:hover,
&.selected {
2017-12-12 08:13:47 -06:00
color: $text-color;
2016-02-15 08:27:41 -06:00
}
2017-12-13 08:51:59 -06:00
&:hover {
.search-section__header__link {
opacity: 1;
}
}
2017-06-23 15:00:26 -05:00
}
2016-02-15 08:27:41 -06:00
2017-11-01 10:59:20 -05:00
.search-section__header__icon {
2017-12-12 08:13:47 -06:00
padding: 5px 0px;
width: 43px;
text-align: center;
2017-11-01 10:59:20 -05:00
}
.search-section__header__toggle {
padding: 5px;
}
.search-section__header__text {
flex-grow: 1;
2017-12-12 06:55:32 -06:00
line-height: 24px;
2017-11-01 10:59:20 -05:00
}
2017-12-13 08:51:59 -06:00
.search-section__header__link {
padding: 2px 10px 0;
color: $text-muted;
opacity: 0;
transition: opacity 150ms ease-in-out;
}
2017-11-01 10:59:20 -05:00
.search-item {
@include list-item();
2017-11-01 10:59:20 -05:00
display: flex;
flex-grow: 1;
2017-11-20 09:21:50 -06:00
height: 37px;
2017-06-23 15:00:26 -05:00
white-space: nowrap;
padding: 0px;
2016-02-15 08:27:41 -06:00
2017-12-19 09:22:41 -06:00
&:hover,
&.selected {
background: $list-item-hover-bg;
2016-02-15 08:27:41 -06:00
}
2017-11-01 10:59:20 -05:00
}
2017-11-23 04:37:59 -06:00
2017-11-20 09:21:50 -06:00
.search-item__body {
2017-11-01 10:59:20 -05:00
flex: 1 1 auto;
overflow: hidden;
2017-11-20 09:21:50 -06:00
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 10px;
}
.search-item__body-title {
color: $list-item-link-color;
2017-11-20 09:21:50 -06:00
}
2017-11-01 10:59:20 -05:00
.search-item__icon {
padding: 5px;
flex: 0 0 auto;
font-size: 19px;
2017-11-01 14:26:14 -05:00
padding: 5px 2px 5px 10px;
2017-11-01 10:59:20 -05:00
}
.search-item__tags {
2017-11-29 06:21:42 -06:00
padding: 10px;
2017-06-08 06:56:51 -05:00
}
2017-11-01 10:59:20 -05:00
.search-item__actions {
2017-11-24 09:54:55 -06:00
flex: 0 0 auto;
2017-11-29 06:21:42 -06:00
padding: 0 10px 0 0;
2017-11-24 09:54:55 -06:00
}
.search-item__actions__item {
2017-11-29 06:21:42 -06:00
display: inline-block;
opacity: 0;
width: 0;
transition: all 0.2s ease-in-out;
2017-12-19 09:22:41 -06:00
.fa-star,
.fa-star-o {
2017-11-29 06:21:42 -06:00
color: $orange;
line-height: 37px;
}
2017-11-24 09:54:55 -06:00
}
.search-item:hover {
.search-item__actions__item {
2017-11-29 06:21:42 -06:00
width: 15px;
opacity: 1;
2017-11-24 09:54:55 -06:00
}
2017-06-02 07:19:39 -05:00
}
2017-06-23 15:00:26 -05:00
2017-11-01 10:59:20 -05:00
.search-button-row {
text-align: center;
padding: $spacer*2 $spacer;
2017-11-29 06:21:42 -06:00
background: $panel-bg;
2017-11-01 10:59:20 -05:00
}
2018-01-26 07:46:52 -06:00
@include media-breakpoint-down(md) {
.search-dropdown {
flex-direction: column;
}
.search-dropdown__col_1 {
height: 100%;
}
.search-dropdown__col_2 {
max-width: 700px;
flex-direction: row;
margin: 0;
justify-content: space-between;
height: 260px;
}
.search-filter-box {
margin: 0;
}
}
@include media-breakpoint-down(sm) {
.search-dropdown__col_2 {
flex-direction: column;
2018-01-26 07:57:55 -06:00
height: 80%;
justify-content: flex-start;
2018-01-26 07:46:52 -06:00
}
.search-filter-box {
margin-bottom: 1.5rem;
}
}
@include media-breakpoint-down(xs) {
.search-container {
left: 0;
}
.search-dropdown__col_2 {
display: none;
}
.search-item__tags {
display: none;
}
}