diff --git a/client/app/assets/less/inc/alert.less b/client/app/assets/less/inc/alert.less index a61b2dde81..b7f0badab9 100755 --- a/client/app/assets/less/inc/alert.less +++ b/client/app/assets/less/inc/alert.less @@ -1,6 +1,5 @@ .alert { - padding-left: 30px; - padding-right: 30px; + padding: 15px; span { cursor: pointer; diff --git a/client/app/assets/less/inc/base.less b/client/app/assets/less/inc/base.less index b189802eb5..d5f05424ef 100755 --- a/client/app/assets/less/inc/base.less +++ b/client/app/assets/less/inc/base.less @@ -19,11 +19,15 @@ html, body { } body { - padding-top: @header-height; + padding-top: 0; + background: #F6F8F9; + font-family: @redash-font; position: relative; + &.headless { - padding-top: 0; - .nav.app-header { + padding-top: 10px; + + .nav.app-header, .navbar { display: none; } } @@ -47,20 +51,20 @@ strong { position: relative; padding-top: 30px; padding-bottom: 30px; - + @media (min-width: (@screen-sm-min + 1)) { padding-right: 15px; padding-left: 15px; } - + @media (min-width: (@screen-lg-min + 80px)) { margin-left: @sidebar-left-width; } - + @media (min-width: @screen-sm-min) and (max-width: (@screen-md-max + 80px)) { margin-left: @sidebar-left-mid-width; } - + @media (max-width: (@screen-sm-min)) { margin-left: 0; } @@ -72,10 +76,34 @@ strong { } } +// Fixed width layout for specific pages +@media (min-width: 768px) { + settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container { + .container { + width: 750px; + } + } +} + +@media (min-width: 992px) { + settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container { + .container { + width: 970px; + } + } +} + +@media (min-width: 1200px) { + settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container { + .container { + width: 1170px; + } + } +} + .scrollbox { overflow: auto; position: relative; - } .clickable { @@ -95,3 +123,150 @@ strong { resize: both !important; transition: height 0s, width 0s !important; } + +// Ace Editor +.ace_editor { + border: 1px solid fade(@redash-gray, 15%) !important; +} + +.ace-tm { + .ace_gutter { + background: #fff !important; + } + + .ace_gutter-active-line { + background-color: fade(@redash-gray, 20%) !important; + } + + .ace_marker-layer .ace_active-line { + background: fade(@redash-gray, 9%) !important; + } +} + +.bg-ace { + background-color: fade(@redash-gray, 12%) !important; +} + +// resizeable +.rg-top span, .rg-bottom span { + height: 3px; + border-color: #b1c1ce; // TODO: variable +} + +.rg-bottom { + bottom: 15px; + + span { + margin: 1.5px 0 0 -10px; + } +} + +// Plotly +text.slicetext { + text-shadow: 1px 1px 5px #333; +} + +// markdown +.markdown strong { + font-weight: bold; +} + +.markdown img { + max-width: 100%; +} + +.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { + background-color: fade(@redash-gray, 15%); + color: #111; +} + +.profile__image--navbar { + border-radius: 100%; + margin-right: 3px; + margin-top: -2px; +} + +.profile__image--settings { + border-radius: 100%; +} + +.profile__image_thumb { + border-radius: 100%; + margin-right: 3px; + margin-top: -2px; + width: 20px; + height: 20px; +} + + +// Error state +.error-state { + display: flex; + flex-direction: column; + justify-content: flex-start; + text-align: center; + margin-top: 25vh; + padding: 35px; + font-size: 14px; + line-height: 21px; + + .error-state__icon { + .zmdi { + font-size: 64px; + color: @redash-gray; + } + } + + @media (max-width: 767px) { + margin-top: 10vh; + } +} + +// page +.page-header--new .btn-favourite, .page-header--new .btn-archive { + font-size: 19px; + } + + .page-title { + display: flex; + align-items: center; + + h3 { + margin-right: 5px !important; + } + + .label { + margin-top: 3px; + display: inline-block; + } + + favorites-control { + margin-right: 5px; + } + + @media (max-width: 767px) { + display: block; + + favorites-control { + float: left; + } + + h3 { + width: 100%; + margin-bottom: 5px !important; + display: block !important; + } + } + } + + .page-header-wrapper, .page-header--new { + h3 { + margin: 0.2em 0; + line-height: 1.3; + font-weight: 500; + } + } + + .select-option-divider { + margin: 10px 0 !important; + } \ No newline at end of file diff --git a/client/app/assets/less/inc/bootstrap-overrides.less b/client/app/assets/less/inc/bootstrap-overrides.less index 1702d631cb..643a7e67df 100755 --- a/client/app/assets/less/inc/bootstrap-overrides.less +++ b/client/app/assets/less/inc/bootstrap-overrides.less @@ -31,7 +31,7 @@ .collapsing, .collapse.in { - padding: 5px 10px; + padding: 0; transition: all 0.35s ease; } diff --git a/client/app/assets/less/inc/button.less b/client/app/assets/less/inc/button.less index 324dd7bae8..d6661f9775 100755 --- a/client/app/assets/less/inc/button.less +++ b/client/app/assets/less/inc/button.less @@ -122,3 +122,21 @@ top: 1px; position: relative; } + + +.btn-default { + background-color: fade(@redash-gray, 15%); +} + +.btn-transparent { + background-color: transparent !important; +} + +.btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { + background-color: fade(@redash-gray, 25%); +} + +.btn-default:active:hover, .btn-default.active:hover, .open > .dropdown-toggle.btn-default:hover, .btn-default:active:focus, .btn-default.active:focus, .open > .dropdown-toggle.btn-default:focus, .btn-default:active.focus, .btn-default.active.focus, .open > .dropdown-toggle.btn-default.focus { + color: #333; + background-color: fade(@redash-gray, 45%); +} \ No newline at end of file diff --git a/client/app/assets/less/inc/form.less b/client/app/assets/less/inc/form.less index 61602aa549..6508ebafe8 100755 --- a/client/app/assets/less/inc/form.less +++ b/client/app/assets/less/inc/form.less @@ -55,14 +55,17 @@ textarea.v-resizable { .transition-duration(300ms); resize: none; box-shadow: 0 0 0 40px rgba(0, 0, 0, 0) !important; - border-radius: 0; + border-radius: @redash-input-radius; &:focus { - box-shadow: 0 0 1px -2px rgba(121,194,255,0.5) !important; + box-shadow: none !important; + border-color: @blue; + } + &:hover { + border-color: @blue; } } - /* -------------------------------------------------------- Custom Checkbox + Radio -----------------------------------------------------------*/ diff --git a/client/app/assets/less/inc/generics.less b/client/app/assets/less/inc/generics.less index 0ad99bd54e..0555e90643 100755 --- a/client/app/assets/less/inc/generics.less +++ b/client/app/assets/less/inc/generics.less @@ -153,4 +153,10 @@ /* -------------------------------------------------------- Border Radius -----------------------------------------------------------*/ -.brd-2 { border-radius: 2px; } \ No newline at end of file +.brd-2 { border-radius: 2px; } + + +/* -------------------------------------------------------- + Alignment +-----------------------------------------------------------*/ +.va-top { vertical-align: top; } \ No newline at end of file diff --git a/client/app/assets/less/inc/label.less b/client/app/assets/less/inc/label.less index e3f8831b49..dee027841c 100755 --- a/client/app/assets/less/inc/label.less +++ b/client/app/assets/less/inc/label.less @@ -1,14 +1,37 @@ .label { + border-radius: 2px; + padding: 3px 6px 4px; + font-weight: 500; + font-size: 11px; +} + +.badge { border-radius: 1px; - padding: 4px 5px 3px; } -h1, h2, h3, h4, h5, h6 { - .label { - border-radius: 2px; - } +.label-default { + background: fade(@redash-gray, 85%); } -.badge { - border-radius: 1px; +.label-tag-unpublished { + background: fade(@redash-gray, 85%); +} + +.label-tag-archived { + .label-warning(); +} + +.label-tag { + background: fade(@redash-gray, 10%); + color: fade(@redash-gray, 75%); +} + +.label-tag-unpublished, +.label-tag-archived, +.label-tag { + margin-right: 3px; + display: inline; + margin-top: 2px; + max-width: 24ch; + .text-overflow(); } \ No newline at end of file diff --git a/client/app/assets/less/inc/list-group.less b/client/app/assets/less/inc/list-group.less index 85635c7ee3..ce32187ed6 100755 --- a/client/app/assets/less/inc/list-group.less +++ b/client/app/assets/less/inc/list-group.less @@ -31,6 +31,17 @@ tags-list { line-height: 1.3; } +.tags-list { + .badge-light { + background: fade(@redash-gray, 10%); + color: fade(@redash-gray, 75%); + } + + a:hover { + cursor: pointer; + } +} + .max-character { .text-overflow(); } @@ -45,6 +56,11 @@ tags-list { line-height: 100%; margin-top: 2px; } + + &.active, &.active:hover, &.active:focus { + background-color: #fff; + box-shadow: inset 3px 0px 0px @brand-primary; + } } .list-group-item-heading { @@ -76,3 +92,18 @@ tags-list { height: 38px; border-radius: 2px; } + +.ui-select-choices-row.disabled > span { + background-color: inherit !important; +} + +.list-group-item.inactive, +.ui-select-choices-row.disabled { + background-color: #eee !important; + border-color: transparent; + opacity: 0.5; + box-shadow: none; + color: #333; + pointer-events: none; + cursor: not-allowed; +} \ No newline at end of file diff --git a/client/app/assets/less/inc/navbar.less b/client/app/assets/less/inc/navbar.less index c65b309b66..3b912e8dea 100755 --- a/client/app/assets/less/inc/navbar.less +++ b/client/app/assets/less/inc/navbar.less @@ -30,3 +30,266 @@ a.navbar-brand img { left: -9px; bottom: -11px; } + +.caret--nav { + border-top: none; +} + +.caret--nav:after { + content: ""; + position: absolute; + right: 5px; + top: 9px; + width: 13px; + height: 13px; + display: block; + background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='11px' height='6px' viewBox='0 0 11 6' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: Sketch 42 %2836781%29 - http://www.bohemiancoding.com/sketch --%3E%3Ctitle%3EShape%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3C/defs%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M5.296,4.288 L9.382,0.2 C9.66086822,-0.0716916976 10.1065187,-0.068122925 10.381,0.208 C10.661,0.488 10.661,0.932 10.388,1.206 L5.792,5.803 C5.6602899,5.93388911 5.48167943,6.00662966 5.296,6.005 C5.10997499,6.00689786 4.93095449,5.93413702 4.799,5.803 L0.204,1.207 C0.072163111,1.07394937 -0.00121750401,0.893846387 9.62313189e-05,0.706545264 C0.00140996665,0.519244142 0.0773097323,0.340188219 0.211,0.209 C0.485365732,-0.0664648737 0.930253538,-0.0700311086 1.209,0.201 L5.296,4.288 L5.296,4.288 Z' id='Shape' fill='%23000000'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); + background-size: 100% 100%; + transition: transform .2s cubic-bezier(.75,0,.25,1); +} + +.navbar .caret--nav:after { + top: 19px; +} + +.dropdown--profile .caret--nav:after { + right: 8px; +} + +.btn--create { + padding-right: 20px; + + .caret--nav:after { + top: 10px; + right: 10px; + background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='11px' height='6px' viewBox='0 0 11 6' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: Sketch 42 %2836781%29 - http://www.bohemiancoding.com/sketch --%3E%3Ctitle%3EShape%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3C/defs%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M5.29592111,4.28945339 L9.38192111,0.201453387 C9.66078932,-0.0702383105 10.1064398,-0.0666695379 10.3809211,0.209453387 C10.6609211,0.489453387 10.6609211,0.933453387 10.3879211,1.20745339 L5.79192111,5.80445339 C5.66021101,5.9353425 5.48160054,6.00808305 5.29592111,6.00645339 C5.1098961,6.00835125 4.9308756,5.9355904 4.79892111,5.80445339 L0.203921109,1.20845339 C0.0720842204,1.07540275 -0.00129639464,0.895299774 1.73406884e-05,0.707998651 C0.00133107602,0.520697529 0.0772308417,0.341641606 0.210921109,0.210453387 C0.485286842,-0.0650114866 0.930174648,-0.0685777215 1.20892111,0.202453387 L5.29592111,4.28945339 L5.29592111,4.28945339 Z' id='Shape' fill='%23FCFCFC'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); + } +} + +.dropdown.open .caret--nav:after { + transform: rotate(180deg); +} + +.navbar { + box-shadow: fade(@redash-gray, 15%) 0px 4px 9px -3px; + + .navbar-collapse { + padding-left: 0; + } + + a.dropdown--profile { + padding-top: 10px; + padding-bottom: 10px; + line-height: 2.35; + } + + .navbar-inverse { + background-color: @redash-gray; + border: none; + } +} + +.navbar-btn { + margin-top: 10px; + margin-bottom: 9px; +} + +.navbar-brand { + position: absolute; + left: 50%; + margin-left: -25px !important; // center + display: block; + zoom: 0.9; +} + +.menu-search { + margin-top: 2px; +} + +.dropdown-menu--profile { + li { + width: 200px; + } +} + +.navbar .collapse.in { + background: #fff; + position: relative; + z-index: 999; + padding: 0 10px 0 10px; +} +.navbar { + min-height: initial; + height: 50px; + border: 1px solid #fff; + border-top: none; + border-radius: 0; + background: #fff; + margin-bottom: 10px; + + .btn-group.open .dropdown-toggle { + -webkit-box-shadow: none; + box-shadow: none; + } + + .btn-group .btn:active { + box-shadow: none; + } +} + +.navbar-link-ANGULAR_REMOVE_ME { + line-height: 18px; + padding: 10px 15px; + display: block; + + @media (min-width: 768px) { + padding-top: 16px; + padding-bottom: 16px; + } +} + +.navbar-link-ANGULAR_REMOVE_ME, +.navbar-default .navbar-nav > li > a { + color: #000; + font-weight: 500; + + &:active, &:hover, &:focus { + color: #000; + } +} + +.navbar-default .btn__new button { + font-weight: 500; +} + +.btn__new { + margin-left: 15px; +} + +.navbar-default .navbar-nav > li > a:hover { + //background-color: fade(@redash-gray, 10%); + //text-decoration: underline; + //border-radius: 0; +} + +.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { + background-color: fade(@redash-gray, 15%); + color: #111; +} + + +// Responsive fixes +@media (max-width: 767px) { + .navbar-brand { + left: 2%; + margin-left: 0 !important; + } + + //Fix navbar collapse + .navbar .collapse.in { + border: none; + + .dropdown-menu--profile { + li { + width: auto; + } + } + + .dropdown--profile { + .caret--nav:after { + right: initial !important; + } + } + + .dropdown--profile__username { + display: inline-block; + } + + .nav__main li a { + padding: 10px 15px; + display: block; + text-align: left; + float: none !important; + } + + .navbar-form { + margin-bottom: 0; + margin-top: 0; + } + + .navbar-right { + margin-bottom: 0; + } + } +} + +@media (min-width: 768px) { + @media (max-width: 880px) { + .navbar-link-ANGULAR_REMOVE_ME, + .navbar-default .navbar-nav > li > a, + .navbar-form { + padding-left: 10px !important; + padding-right: 10px !important; + } + + a.navbar-brand { + margin-left: -15px !important; + } + } + + @media (max-width: 810px) { + .menu-search { + width: 175px; + } + + a.navbar-brand { + margin-left: 13px !important; + } + } +} + +@media (max-width: 1084px) { + .dropdown--profile__username { + display: none; + } +} + + + + +// Cross-browser fixes + +// Firefox +@-moz-document url-prefix() { + .caret--nav::after { + height: 7px; + } + + .navbar .caret--nav::after { + top: 22px; + } + + .navbar .btn--create .caret--nav::after { + top: 12px; + } +} + +// IE10+ +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .caret--nav::after { + height: 7px; + } + + .navbar .caret--nav::after { + top: 22px; + } + + .navbar .btn--create .caret--nav::after { + top: 12px; + } +} + + +.navbar li a .btn-favourite .fa, .navbar li a .btn-archive .fa { + font-size: 100%; +} \ No newline at end of file diff --git a/client/app/assets/less/inc/pagination.less b/client/app/assets/less/inc/pagination.less deleted file mode 100755 index 05511e5d1b..0000000000 --- a/client/app/assets/less/inc/pagination.less +++ /dev/null @@ -1,54 +0,0 @@ -.pagination { - border-radius: 0; - - & > li { - margin: 0 2px; - display: inline-block; - vertical-align: top; - - & > a, - & > span { - border-radius: 50% !important; - padding: 0; - width: 40px; - height: 40px; - line-height: 38px; - text-align: center; - font-size: 14px; - z-index: 1; - position: relative; - - & > .zmdi { - font-size: 22px; - line-height: 39px; - } - } - - &.disabled { - .opacity(0.5); - } - } -} - - -/* -------------------------------------------------------- - Listview Pagination ------------------------------------------------------------*/ -.lv-pagination { - width: 100%; - text-align: center; - padding: 40px 0; - border-top: 1px solid #F0F0F0; - margin-top: 0; - margin-bottom: 0; -} - - -/* -------------------------------------------------------- - Pager ------------------------------------------------------------*/ -.pager li > a, .pager li > span { - padding: 5px 10px 6px; - color: @pagination-color; -} - diff --git a/client/app/assets/less/inc/popover.less b/client/app/assets/less/inc/popover.less index ed0c6da63e..5fcad7089b 100755 --- a/client/app/assets/less/inc/popover.less +++ b/client/app/assets/less/inc/popover.less @@ -1,5 +1,5 @@ .popover { - box-shadow: 0 2px 30px rgba(0, 0, 0, 0.2); + box-shadow: fade(@redash-gray, 25%) 0px 0px 15px 0px; } .popover-title { diff --git a/client/app/assets/less/inc/tab.less b/client/app/assets/less/inc/tab.less index 6ef14fceda..e31179f9b4 100755 --- a/client/app/assets/less/inc/tab.less +++ b/client/app/assets/less/inc/tab.less @@ -132,9 +132,15 @@ } .tab-nav { + margin-bottom: 0px; + > li.rd-tab-btn { float: right; padding-right: 10px; padding-top: 10px; } + + > li > a { + text-transform: capitalize; + } } diff --git a/client/app/assets/less/inc/table.less b/client/app/assets/less/inc/table.less index 18e2343ab4..7a43a6f9e6 100755 --- a/client/app/assets/less/inc/table.less +++ b/client/app/assets/less/inc/table.less @@ -1,26 +1,26 @@ .table { margin-bottom: 0; - + th.sortable-column { - cursor: pointer; + cursor: pointer; } - + &:not(.table-striped) > thead > tr > th { background-color: #FAFAFA; } - + [class*="bg-"] { & > tr > th { color: #fff; border-bottom: 0; background: transparent !important; } - + & + tbody > tr:first-child > td { border-top: 0; } } - + & > thead > tr > th { vertical-align: middle; font-weight: 500; @@ -29,24 +29,24 @@ text-transform: uppercase; padding: 15px 10px; } - + & > thead > tr, & > tbody > tr, & > tfoot > tr { - + & > th, & > td { - + &:first-child { padding-left: 30px; } - + &:last-child { padding-right: 30px; } - + } } - + tbody > tr:last-child > td { padding-bottom: 20px; } @@ -54,21 +54,21 @@ .table-bordered { border: 0; - + & > tbody > tr { & > td, & > th { border-bottom: 0; border-left: 0; - + &:last-child { border-right: 0; } } } - + & > thead > tr > th { border-left: 0; - + &:last-child { border-right: 0; } @@ -86,14 +86,64 @@ } .tile .table { - + & > thead:not([class*="bg-"]) > tr > th { border-top: 1px solid @table-border-color; - + } } .table-hover > tbody > tr:hover { - background-color: #f4f4f4; + background-color: #f4f4f4; +} + +.table-data { + tbody > tr > td { + padding-top: 5px !important; + } + + .btn-favourite, .btn-archive { + font-size: 15px; + } +} + +.table-main-title { + font-weight: 500; + line-height: 1.7 !important; +} + +.btn-favourite { + color: #d4d4d4; + transition: all .25s ease-in-out; + + &:hover, &:focus { + color: @yellow-darker; + cursor: pointer; + } + + .fa-star { + color: @yellow-darker; + } +} + +.btn-archive { + color: #d4d4d4; + transition: all .25s ease-in-out; + + &:hover, &:focus { + color: @gray-light; + } + + .fa-archive { + color: @gray-light; + } +} + +.table > thead > tr > th { + text-transform: none; } +.table-data .label-tag { + display: inline-block; + max-width: 135px; + } \ No newline at end of file diff --git a/client/app/assets/less/inc/tile.less b/client/app/assets/less/inc/tile.less index 932a9cce5e..d0a3617cee 100755 --- a/client/app/assets/less/inc/tile.less +++ b/client/app/assets/less/inc/tile.less @@ -2,7 +2,8 @@ background-color: #fff; margin-bottom: @grid-gutter-width; position: relative; - box-shadow: @tile-shadow; + border-radius: 3px; + box-shadow: fade(@redash-gray, 15%) 0px 4px 9px -3px; &[class*="bg-"] { color: #fff; @@ -12,6 +13,10 @@ margin-bottom: @grid-gutter-width/2; } } +.tiled { + border-radius: 3px; + box-shadow: fade(@redash-gray, 15%) 0px 4px 9px -3px; +} .t-header { .th-title { @@ -74,6 +79,15 @@ } } +.t-header:not(.th-alt) { + padding: 15px; + + ul { + margin-bottom: 0; + line-height: 2.2; + } + } + .tb-padding { padding: 20px 23px 30px; } diff --git a/client/app/assets/less/inc/variables.less b/client/app/assets/less/inc/variables.less index 3bd9a746dd..0b8468b30f 100755 --- a/client/app/assets/less/inc/variables.less +++ b/client/app/assets/less/inc/variables.less @@ -23,6 +23,8 @@ @logo-height: @header-height; @boxed-width: 1170px; @body-bg: #edecec; +@spacing: 15px; +@redash-radius: 3px; /* -------------------------------------------------------- @@ -39,6 +41,7 @@ -----------------------------------------------------------*/ @font-icon: 'Material-Design-Iconic-Font'; @font-family-sans-serif: 'Roboto', sans-serif; +@redash-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; @font-size-base: 13px; @@ -59,6 +62,7 @@ @input-border: #e8e8e8; @input-border-radius: 0; @input-border-radius-large: 0px; +@redash-input-radius: 2px; @input-height-large: 40px; @input-height-base: 35px; @input-height-small: 30px; @@ -94,6 +98,11 @@ @gray-light: #828282; @ace: #f8f8f8; +@redash-gray: rgba(102, 136, 153, 1); +@redash-orange: rgba(255, 120, 100, 1); +@redash-black: rgba(0, 0, 0, 1); +@redash-yellow: rgba(252, 252, 161, 0.75); + /** Form States **/ @state-success-text: @green; @state-info-text: @blue; @@ -192,7 +201,6 @@ @pagination-hover-color: #333; @pagination-hover-bg: #d7d7d7; @pagination-hover-border: @pagination-border; -@pager-border-radius: 5px; /* -------------------------------------------------------- diff --git a/client/app/assets/less/main.less b/client/app/assets/less/main.less index 4b7ef25beb..f0c92409fa 100644 --- a/client/app/assets/less/main.less +++ b/client/app/assets/less/main.less @@ -32,7 +32,6 @@ @import 'inc/progress-bar'; @import 'inc/widgets'; @import 'inc/table'; -@import 'inc/pagination'; @import 'inc/alert'; @import 'inc/media'; @import 'inc/modal'; @@ -71,11 +70,11 @@ @import 'inc/vendor-overrides/ui-select'; /** REDASH STYLING **/ -@import 'redash/redash-newstyle'; @import 'redash/redash-table'; @import 'redash/query'; @import 'redash/tags-control'; @import 'redash/css-logo'; +@import 'redash/loading-indicator'; diff --git a/client/app/assets/less/redash/loading-indicator.less b/client/app/assets/less/redash/loading-indicator.less new file mode 100644 index 0000000000..ded814aecf --- /dev/null +++ b/client/app/assets/less/redash/loading-indicator.less @@ -0,0 +1,51 @@ +.loading-indicator { + position: fixed; + top: 50%; + left: 50%; + margin: -50px 0 0 -50px; // center + width: 100px; + height: 100px; + transition-duration: 150ms; + transition-timing-function: linear; + transition-property: opacity, transform; + + #css-logo { + animation: hover 2s infinite; + } + + #shadow { + width: 33px; + height: 12px; + border-radius: 50%; + background-color: black; + opacity: 0.25; + display: block; + position: absolute; + left: 34px; + top: 115px; + animation: shadow 2s infinite; + } + + @keyframes hover { + 50% { + transform: translateY(-5px); + } + } + @keyframes shadow { + 50% { + transform: scaleX(0.9); + opacity: 0.2; + } + } +} + +// hide indicator when app-view has content +app-view:not(:empty) ~ .loading-indicator { + opacity: 0; + transform: scale(0.9); + pointer-events: none; + + * { + animation: none !important; + } +} \ No newline at end of file diff --git a/client/app/assets/less/redash/query.less b/client/app/assets/less/redash/query.less index 5ef3b93699..72f2b7cf5a 100644 --- a/client/app/assets/less/redash/query.less +++ b/client/app/assets/less/redash/query.less @@ -92,7 +92,7 @@ edit-in-place p.editable:hover { } .filter-container { - margin-bottom: 10px; + margin-bottom: 5px; } .ace_editor.ace_autocomplete .ace_completion-highlight { @@ -220,6 +220,13 @@ edit-in-place p.editable:hover { flex-flow: column; } +.embed-heading { + h3 { + line-height: 1.75; + margin: 0; + } +} + .widget-wrapper { .body-container { .filters-wrapper { @@ -676,8 +683,17 @@ nav .rg-bottom { .filter-container { padding-right: 0; } +} - .btn-edit-visualisation { +// Responsive fixes +@media (max-width: 767px) { + .query-page-wrapper { + h3 { + font-size: 18px; + } + favorites-control { + margin-top: -3px; + } } } diff --git a/client/app/assets/less/redash/redash-newstyle.less b/client/app/assets/less/redash/redash-newstyle.less deleted file mode 100644 index f82457a9d4..0000000000 --- a/client/app/assets/less/redash/redash-newstyle.less +++ /dev/null @@ -1,1098 +0,0 @@ -@import (reference, less) '~bootstrap/less/labels.less'; - -// Variables -@redash-gray: rgba(102, 136, 153, 1); -@redash-orange: rgba(255, 120, 100, 1); -@redash-black: rgba(0, 0, 0, 1); -@redash-yellow: rgba(252, 252, 161, 0.75); -@redash-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; - -@spacing: 15px; - -//Default spacing (between tiles) -@redash-space: 10px; - -@redash-radius: 3px; -@redash-input-radius: 2px; - -// General -body { - padding-top: 0; - background: #F6F8F9; - font-family: @redash-font; - - &.headless { - padding-top: 10px; - - .navbar { - display: none !important; - } - } -} - -.word-wrap-break { - word-wrap: break-word; -} - -.clearboth { - clear: both; -} - -.callout { - padding: 20px; - border: 1px solid #eee; - border-left-width: 5px; - border-radius: 3px; -} - -.callout-warning { - border-left-color: #aa6708; -} - -.callout-info { - border-left-color: #1b809e; -} - -// Fixed width layout for specific pages -@media (min-width: 768px) { - settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container { - .container { - width: 750px; - } - } -} - -@media (min-width: 992px) { - settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container { - .container { - width: 970px; - } - } -} - -@media (min-width: 1200px) { - settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container { - .container { - width: 1170px; - } - } -} - -.creation-container { - h5 { - color: #a7a7a7; - } - - h3 { - margin: 0px; - margin-bottom: 15px; - } -} - -.add-widget-container { - background: #fff; - border-radius: @redash-radius; - padding: 15px; - position: fixed; - left: 15px; - bottom: 20px; - width: calc(~'100% - 30px'); - z-index: 99; - box-shadow: fade(@redash-gray, 50%) 0px 7px 29px -3px; - display: flex; - justify-content: space-between; - - h2 { - margin: 0; - font-size: 14px; - line-height: 2.1; - font-weight: 400; - - .zmdi { - margin: 0; - margin-right: 5px; - font-size: 24px; - position: absolute; - bottom: 18px; - } - - span { - padding-left: 30px; - } - } - - .btn { - align-self: center; - } -} - -body { - .ace-tm .ace_gutter { - background: #fff; - } - - .ace_editor { - border: 1px solid fade(@redash-gray, 15%); - } - - .ace-tm .ace_gutter-active-line { - background-color: fade(@redash-gray, 20%); - } - - .ace-tm .ace_marker-layer .ace_active-line { - background: fade(@redash-gray, 9%); - } -} - -.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { - background-color: #fff; - box-shadow: inset 3px 0px 0px @brand-primary; -} - -.table-data { - tbody > tr > td { - padding-top: 5px !important; - } - - .btn-favourite, .btn-archive { - font-size: 15px; - } -} - -.table-main-title { - font-weight: 500; - line-height: 1.7 !important; - a { - //font-size: 15px; - } -} - -.btn-favourite, .btn-archive { - color: #d4d4d4; - transition: all .25s ease-in-out; - - &:hover, &:focus { - color: @yellow-darker; - cursor: pointer; - } - - .fa-star { - color: @yellow-darker; - } -} - -.btn-archive { - color: #d4d4d4; - transition: all .25s ease-in-out; - - &:hover, &:focus { - color: @gray-light; - } - - .fa-archive { - color: @gray-light; - } -} - -.page-header--new .btn-favourite, .page-header--new .btn-archive { - font-size: 19px; -} - -.page-title { - display: flex; - align-items: center; - - h3 { - margin-right: 5px !important; - } - - .label { - margin-top: 3px; - display: inline-block; - } - - favorites-control { - margin-right: 5px; - } - - @media (max-width: 767px) { - display: block; - - favorites-control { - float: left; - } - - h3 { - width: 100%; - margin-bottom: 5px !important; - display: block !important; - } - } -} - -.navbar li a .btn-favourite .fa, .navbar li a .btn-archive .fa { - font-size: 100%; -} - -.float-right { - float: right; -} - -.visual-card-list { - margin: -5px 0 0 -5px; // compensate for .visual-card spacing -} - -.visual-card { - background: #FFFFFF; - border: 1px solid fade(@redash-gray, 15%); - border-radius: 3px; - margin: 5px; - width: 212px; - padding: 15px 5px; - cursor: pointer; - box-shadow: none; - transition: transform 0.12s ease-out; - transition-duration: 0.3s; - transition-property: box-shadow; - - display: flex; - align-items: center; - - &:hover { - box-shadow: rgba(102, 136, 153, 0.15) 0px 4px 9px -3px; - } - - img { - width: 64px !important; - height: 64px !important; - margin-right: 5px; - } - - h3 { - font-size: 13px; - color: #323232; - margin: 0 !important; - text-overflow: ellipsis; - overflow: hidden; - } -} - -@media (max-width: 1200px) { - .visual-card { - width: 217px; - } -} - -@media (max-width: 755px) { - .visual-card { - width: 47%; - } -} - -@media (max-width: 515px) { - .visual-card { - width: 47%; - - img { - width: 48px; - height: 48px; - } - } -} - -@media (max-width: 408px) { - .visual-card { - width: 100%; - padding: 5px; - - img { - width: 48px; - height: 48px; - } - } -} - - -.t-header:not(.th-alt) { - padding: 15px; - - ul { - margin-bottom: 0; - line-height: 2.2; - } -} - -.page-header-wrapper, .page-header--new { - h3 { - margin: 0.2em 0; - line-height: 1.3; - font-weight: 500; - } -} - -.alert { - padding: 15px; -} - -.dynamic-table__pagination { - margin-top: 10px; -} - -.rg-top span, .rg-bottom span { - height: 3px; - border-color: #b1c1ce; // TODO: variable -} - -.rg-bottom { - bottom: 15px; - - span { - margin: 1.5px 0 0 -10px; - } -} - -.popover { - box-shadow: fade(@redash-gray, 25%) 0px 0px 15px 0px; -} - -.tile__bottom-control a { - color: fade(@redash-black, 65%); - - &:hover { - color: fade(@redash-black, 95%); - } -} - -.pagination { - .disabled a { - background-color: fade(@redash-gray, 14%); - } - - li { - a { - background-color: fade(@redash-gray, 15%); - - &:hover { - background-color: fade(@redash-gray, 25%); - } - } - } -} - -.btn-default { - background-color: fade(@redash-gray, 15%); -} - -.btn-transparent { - background-color: transparent !important; -} - -.btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { - background-color: fade(@redash-gray, 25%); -} - -.btn-default:active:hover, .btn-default.active:hover, .open > .dropdown-toggle.btn-default:hover, .btn-default:active:focus, .btn-default.active:focus, .open > .dropdown-toggle.btn-default:focus, .btn-default:active.focus, .btn-default.active.focus, .open > .dropdown-toggle.btn-default.focus { - color: #333; - background-color: fade(@redash-gray, 45%); -} - -.label { - border-radius: 2px; - padding: 3px 6px 4px; - font-weight: 500; - font-size: 11px; -} - -.label-default { - background: fade(@redash-gray, 85%); -} - -.label-tag-unpublished { - background: fade(@redash-gray, 85%); -} - -.label-tag-archived { - .label-warning(); -} - -.label-tag { - background: fade(@redash-gray, 10%); - color: fade(@redash-gray, 75%); -} - -.label-tag-unpublished, -.label-tag-archived, -.label-tag { - margin-right: 3px; - display: inline; - margin-top: 2px; - max-width: 24ch; - .text-overflow(); -} - -.tab-nav > li > a { - text-transform: capitalize; -} - -.table > thead > tr > th { - text-transform: none; -} - -.dashboard-header { - position: -webkit-sticky; // required for Safari - position: sticky; - background: #f6f7f9; - z-index: 99; - width: 100%; - top: 0; -} - -.dashboard__control { - margin: 8px 0; -} - -.editing-mode { - a.query-link { - pointer-events: none; - cursor: move; - } - - .th-title { - cursor: move; - } - - .refresh-indicator { - transition-duration: 0s; - - rd-timer { - display: none; - } - - .refresh-indicator-mini(); - } -} - -.dashboard-header { - position: -webkit-sticky; // required for Safari - position: sticky; - background: #f6f7f9; - z-index: 99; - width: 100%; - top: 0; -} - -.widget-wrapper { - .parameter-container { - margin: 0 15px; - } -} - -.bg-ace { - background-color: fade(@redash-gray, 12%) !important; -} - -.refresh-indicator { - font-size: 18px; - color: #86a1af; - transition: all 100ms linear; - transition-delay: 150ms; // waits for widget-menu to fade out before moving back over it - transform: translateX(22px); - position: absolute; - right: 29px; - top: 8px; - display: flex; - flex-direction: row-reverse; - - .refresh-icon { - position: relative; - - &:before { - content: ""; - position: absolute; - top: 0px; - right: 0; - width: 24px; - height: 24px; - background-color: #e8ecf0; - border-radius: 50%; - transition: opacity 100ms linear; - transition-delay: 150ms; - } - - i { - height: 24px; - width: 24px; - display: flex; - justify-content: center; - align-items: center; - } - } - - rd-timer { - font-size: 13px; - display: inline-block; - font-variant-numeric: tabular-nums; - opacity: 0; - transform: translateX(-6px); - transition: all 100ms linear; - transition-delay: 150ms; - color: #bbbbbb; - background-color: rgba(255,255,255,.9); - padding-left: 2px; - padding-right: 1px; - margin-right: -4px; - margin-top: 2px; - } - - .widget-visualization[data-refreshing="false"] & { - display: none; - } -} - -.refresh-indicator-mini() { - font-size: 13px; - transition-delay: 0s; - color: #bbbbbb; - transform: translateY(-4px); - - .refresh-icon:before { - transition-delay: 0s; - opacity: 0; - } - - rd-timer { - transition-delay: 0s; - opacity: 1; - transform: translateX(0); - } -} - -.refresh-button { - margin-left: -6px; -} - -.tiled { - border-radius: 3px; - box-shadow: fade(@redash-gray, 15%) 0px 4px 9px -3px; -} - -.tile { - border-radius: 3px; - box-shadow: fade(@redash-gray, 15%) 0px 4px 9px -3px; - - .widget-menu-regular, .btn__refresh { - opacity: 0 !important; - transition: opacity 0.35s ease-in-out; - } - - .t-header { - .th-title { - padding-right: 23px; // no overlap on RefreshIndicator - - a { - color: fade(@redash-black, 80%); - font-size: 15px; - font-weight: 500; - } - } - - .query--description { - font-size: 14px; - line-height: 1.5; - font-style: italic; - - p { - margin-bottom: 0; - } - } - } - - .t-header.widget { - padding: 15px; - } - - &:hover { - .widget-menu-regular, .btn__refresh { - opacity: 1 !important; - transition: opacity 0.35s ease-in-out; - } - - .refresh-indicator { - .refresh-indicator-mini(); - } - } - - .tile__bottom-control { - padding: 10px 15px; - line-height: 2; - } -} - -.embed-heading { - h3 { - line-height: 1.75; - margin: 0; - } -} - -.filter-container { - margin-bottom: 5px; -} - -// Navigation -.caret--nav { - border-top: none; -} - -.caret--nav:after { - content: ""; - position: absolute; - right: 5px; - top: 9px; - width: 13px; - height: 13px; - display: block; - background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='11px' height='6px' viewBox='0 0 11 6' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: Sketch 42 %2836781%29 - http://www.bohemiancoding.com/sketch --%3E%3Ctitle%3EShape%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3C/defs%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M5.296,4.288 L9.382,0.2 C9.66086822,-0.0716916976 10.1065187,-0.068122925 10.381,0.208 C10.661,0.488 10.661,0.932 10.388,1.206 L5.792,5.803 C5.6602899,5.93388911 5.48167943,6.00662966 5.296,6.005 C5.10997499,6.00689786 4.93095449,5.93413702 4.799,5.803 L0.204,1.207 C0.072163111,1.07394937 -0.00121750401,0.893846387 9.62313189e-05,0.706545264 C0.00140996665,0.519244142 0.0773097323,0.340188219 0.211,0.209 C0.485365732,-0.0664648737 0.930253538,-0.0700311086 1.209,0.201 L5.296,4.288 L5.296,4.288 Z' id='Shape' fill='%23000000'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); - background-size: 100% 100%; - transition: transform .2s cubic-bezier(.75,0,.25,1); -} - -.navbar .caret--nav:after { - top: 19px; -} - -.dropdown--profile .caret--nav:after { - right: 8px; -} - -.btn--create { - padding-right: 20px; - - .caret--nav:after { - top: 10px; - right: 10px; - background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='11px' height='6px' viewBox='0 0 11 6' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: Sketch 42 %2836781%29 - http://www.bohemiancoding.com/sketch --%3E%3Ctitle%3EShape%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3C/defs%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M5.29592111,4.28945339 L9.38192111,0.201453387 C9.66078932,-0.0702383105 10.1064398,-0.0666695379 10.3809211,0.209453387 C10.6609211,0.489453387 10.6609211,0.933453387 10.3879211,1.20745339 L5.79192111,5.80445339 C5.66021101,5.9353425 5.48160054,6.00808305 5.29592111,6.00645339 C5.1098961,6.00835125 4.9308756,5.9355904 4.79892111,5.80445339 L0.203921109,1.20845339 C0.0720842204,1.07540275 -0.00129639464,0.895299774 1.73406884e-05,0.707998651 C0.00133107602,0.520697529 0.0772308417,0.341641606 0.210921109,0.210453387 C0.485286842,-0.0650114866 0.930174648,-0.0685777215 1.20892111,0.202453387 L5.29592111,4.28945339 L5.29592111,4.28945339 Z' id='Shape' fill='%23FCFCFC'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); - } -} - -.dropdown.open .caret--nav:after { - transform: rotate(180deg); -} - -.collapsing, .collapse.in { - padding: 0; -} - -.navbar { - min-height: initial; - height: 50px; - border: 1px solid #fff; - border-top: none; - border-radius: 0; - background: #fff; - margin-bottom: 10px; - - .btn-group.open .dropdown-toggle { - -webkit-box-shadow: none; - box-shadow: none; - } - - .btn-group .btn:active { - box-shadow: none; - } -} - -.navbar-link-ANGULAR_REMOVE_ME { - line-height: 18px; - padding: 10px 15px; - display: block; - - @media (min-width: 768px) { - padding-top: 16px; - padding-bottom: 16px; - } -} - -.navbar-link-ANGULAR_REMOVE_ME, -.navbar-default .navbar-nav > li > a { - color: #000; - font-weight: 500; - - &:active, &:hover, &:focus { - color: #000; - } -} - -.navbar-default .btn__new button { - font-weight: 500; -} - -.navbar-default .navbar-nav > li > a:hover { - //background-color: fade(@redash-gray, 10%); - //text-decoration: underline; - //border-radius: 0; -} - -.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { - background-color: fade(@redash-gray, 15%); - color: #111; -} - -.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { - background-color: fade(@redash-gray, 15%); - color: #111; -} - -.tab-nav { - margin-bottom: 0px; -} - -.profile__image--navbar { - border-radius: 100%; - margin-right: 3px; - margin-top: -2px; -} - -.profile__image--settings { - border-radius: 100%; -} - -.profile__image_thumb { - border-radius: 100%; - margin-right: 3px; - margin-top: -2px; - width: 20px; - height: 20px; -} - -.user_list__user--invitation-pending { - color: fade(@alert-danger-bg, 75%); - font-weight: 500; -} - -.btn__new { - margin-left: 15px; -} - -.navbar-btn { - margin-top: 10px; - margin-bottom: 9px; -} - -.navbar-brand { - position: absolute; - left: 50%; - margin-left: -25px !important; // center - display: block; - zoom: 0.9; -} - -.va-top { - vertical-align: top; -} - -.navbar { - box-shadow: fade(@redash-gray, 15%) 0px 4px 9px -3px; - - .navbar-collapse { - padding-left: 0; - } - - a.dropdown--profile { - padding-top: 10px; - padding-bottom: 10px; - line-height: 2.35; - } - - .navbar-inverse { - background-color: @redash-gray; - border: none; - } -} - -.menu-search { - margin-top: 2px; -} - -.tags-list { - .badge-light { - background: fade(@redash-gray, 10%); - color: fade(@redash-gray, 75%); - } - - a:hover { - cursor: pointer; - } -} - -.dropdown-menu--profile { - li { - width: 200px; - } -} - -.navbar .collapse.in { - background: #fff; - position: relative; - z-index: 999; - padding: 0 10px 0 10px; -} - -// Pagination -.pagination > li > a, .pagination > li > span { - border-radius: 3px !important; - width: 33px; - height: 33px; - line-height: 31px; -} - -// Error state -.error-state { - display: flex; - flex-direction: column; - justify-content: flex-start; - text-align: center; - margin-top: 25vh; - padding: 35px; - font-size: 14px; - line-height: 21px; - - .error-state__icon { - .zmdi { - font-size: 64px; - color: @redash-gray; - } - } - - @media (max-width: 767px) { - margin-top: 10vh; - } -} - -// Forms -.form-control { - border-radius: @redash-input-radius; - - &:focus { - box-shadow: none !important; - border-color: @blue; - } - - &:hover { - border-color: @blue; - } -} - -// Plotly -text.slicetext { - text-shadow: 1px 1px 5px #333; -} - - -// Responsive fixes -@media (max-width: 767px) { - .text-center-xs { - text-align: center !important; - } - - .query-page-wrapper { - h3 { - font-size: 18px; - } - - favorites-control { - margin-top: -3px; - } - } - - .navbar-brand { - left: 2%; - margin-left: 0 !important; - } - - //Fix navbar collapse - .navbar .collapse.in { - border: none; - - .dropdown-menu--profile { - li { - width: auto; - } - } - - .dropdown--profile { - .caret--nav:after { - right: initial !important; - } - } - - .dropdown--profile__username { - display: inline-block; - } - - .nav__main li a { - padding: 10px 15px; - display: block; - text-align: left; - float: none !important; - } - - .navbar-form { - margin-bottom: 0; - margin-top: 0; - } - - .navbar-right { - margin-bottom: 0; - } - } -} - -@media (min-width: 768px) { - @media (max-width: 880px) { - .navbar-link-ANGULAR_REMOVE_ME, - .navbar-default .navbar-nav > li > a, - .navbar-form { - padding-left: 10px !important; - padding-right: 10px !important; - } - - a.navbar-brand { - margin-left: -15px !important; - } - } - - @media (max-width: 810px) { - .menu-search { - width: 175px; - } - - a.navbar-brand { - margin-left: 13px !important; - } - } -} - -@media (max-width: 1084px) { - .dropdown--profile__username { - display: none; - } -} - - - -// Cross-browser fixes - -// Firefox -@-moz-document url-prefix() { - .caret--nav::after { - height: 7px; - } - - .navbar .caret--nav::after { - top: 22px; - } - - .navbar .btn--create .caret--nav::after { - top: 12px; - } -} - -// IE10+ -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { - .caret--nav::after { - height: 7px; - } - - .navbar .caret--nav::after { - top: 22px; - } - - .navbar .btn--create .caret--nav::after { - top: 12px; - } -} - -.ui-select-choices-row.disabled > span { - background-color: inherit !important; -} - -.list-group-item.inactive, -.ui-select-choices-row.disabled { - background-color: #eee !important; - border-color: transparent; - opacity: 0.5; - box-shadow: none; - color: #333; - pointer-events: none; - cursor: not-allowed; -} - -.select-option-divider { - margin: 10px 0 !important; -} - -.table-data .label-tag { - display: inline-block; - max-width: 135px; -} - -.markdown strong { - font-weight: bold; -} - -.markdown img { - max-width: 100%; -} - -.loading-indicator { - position: fixed; - top: 50%; - left: 50%; - margin: -50px 0 0 -50px; // center - width: 100px; - height: 100px; - transition-duration: 150ms; - transition-timing-function: linear; - transition-property: opacity, transform; - - #css-logo { - animation: hover 2s infinite; - } - - #shadow { - width: 33px; - height: 12px; - border-radius: 50%; - background-color: black; - opacity: 0.25; - display: block; - position: absolute; - left: 34px; - top: 115px; - animation: shadow 2s infinite; - } - - @keyframes hover { - 50% { - transform: translateY(-5px); - } - } - @keyframes shadow { - 50% { - transform: scaleX(0.9); - opacity: 0.2; - } - } -} - -// hide indicator when app-view has content -app-view:not(:empty) ~ .loading-indicator { - opacity: 0; - transform: scale(0.9); - pointer-events: none; - - * { - animation: none !important; - } -} \ No newline at end of file diff --git a/client/app/assets/less/server.less b/client/app/assets/less/server.less index 83c63db677..d275273f0e 100644 --- a/client/app/assets/less/server.less +++ b/client/app/assets/less/server.less @@ -19,8 +19,6 @@ @import 'inc/ie-warning'; @import 'inc/flex'; -@import 'redash/redash-newstyle'; - html, body { height: 100%; margin: 0; diff --git a/client/app/components/cards-list/CardsList.jsx b/client/app/components/cards-list/CardsList.jsx index 21df7c3e22..94ce09e229 100644 --- a/client/app/components/cards-list/CardsList.jsx +++ b/client/app/components/cards-list/CardsList.jsx @@ -4,6 +4,8 @@ import PropTypes from 'prop-types'; import React from 'react'; import EmptyState from '@/components/items-list/components/EmptyState'; +import './CardsList.less'; + const { Search } = Input; export default class CardsList extends React.Component { diff --git a/client/app/components/cards-list/CardsList.less b/client/app/components/cards-list/CardsList.less new file mode 100644 index 0000000000..ef9fbb1abb --- /dev/null +++ b/client/app/components/cards-list/CardsList.less @@ -0,0 +1,76 @@ + +@import '../../assets/less/inc/variables'; + +.visual-card-list { + margin: -5px 0 0 -5px; // compensate for .visual-card spacing +} + +.visual-card { + background: #FFFFFF; + border: 1px solid fade(@redash-gray, 15%); + border-radius: 3px; + margin: 5px; + width: 212px; + padding: 15px 5px; + cursor: pointer; + box-shadow: none; + transition: transform 0.12s ease-out; + transition-duration: 0.3s; + transition-property: box-shadow; + + display: flex; + align-items: center; + + &:hover { + box-shadow: rgba(102, 136, 153, 0.15) 0px 4px 9px -3px; + } + + img { + width: 64px !important; + height: 64px !important; + margin-right: 5px; + } + + h3 { + font-size: 13px; + color: #323232; + margin: 0 !important; + text-overflow: ellipsis; + overflow: hidden; + } +} + +@media (max-width: 1200px) { + .visual-card { + width: 217px; + } +} + +@media (max-width: 755px) { + .visual-card { + width: 47%; + } +} + +@media (max-width: 515px) { + .visual-card { + width: 47%; + + img { + width: 48px; + height: 48px; + } + } +} + +@media (max-width: 408px) { + .visual-card { + width: 100%; + padding: 5px; + + img { + width: 48px; + height: 48px; + } + } +} \ No newline at end of file diff --git a/client/app/components/dashboards/widget.less b/client/app/components/dashboards/widget.less index 0d356d7d12..9bff185bb2 100644 --- a/client/app/components/dashboards/widget.less +++ b/client/app/components/dashboards/widget.less @@ -1,3 +1,5 @@ +@import '../../assets/less/inc/variables'; + .tile .t-header .th-title a.query-link { color: rgba(0, 0, 0, 0.5); } @@ -10,12 +12,12 @@ visualization-name { font-size: 15px; font-weight: 500; color: rgba(0, 0, 0, 0.8); - + &:after { content: "−"; margin-left: 5px; } - + &:empty:after { content: none; } @@ -26,23 +28,27 @@ visualization-name { } .widget-wrapper { + .parameter-container { + margin: 0 15px; + } + .body-container { display: flex; flex-direction: column; align-items: stretch; - + .body-row { flex: 0 1 auto; } - + .body-row-auto { flex: 1 1 auto; } } - + .spinner-container { position: relative; - + .spinner { display: flex; align-items: center; @@ -55,31 +61,31 @@ visualization-name { height: 100%; } } - + .dropdown-header { padding: 0; - + .actions { position: static; } } - + .t-header.widget { .dropdown { margin-top: -15px; margin-right: -15px; - + .actions { position: static; } } } - + .scrollbox:empty { padding: 0 !important; font-size: 1px !important; } - + .widget-text { :first-child { margin-top: 0; @@ -90,27 +96,192 @@ visualization-name { } } +.editing-mode { + .widget-menu-regular { + display: none; + } + .widget-menu-remove { + display: block; + } + + a.query-link { + pointer-events: none; + cursor: move; + } + + .th-title { + cursor: move; + } + + .refresh-indicator { + transition-duration: 0s; + + rd-timer { + display: none; + } + + .refresh-indicator-mini(); + } +} + +.refresh-indicator { + font-size: 18px; + color: #86a1af; + transition: all 100ms linear; + transition-delay: 150ms; // waits for widget-menu to fade out before moving back over it + transform: translateX(22px); + position: absolute; + right: 29px; + top: 8px; + display: flex; + flex-direction: row-reverse; + + .refresh-icon { + position: relative; + + &:before { + content: ""; + position: absolute; + top: 0px; + right: 0; + width: 24px; + height: 24px; + background-color: #e8ecf0; + border-radius: 50%; + transition: opacity 100ms linear; + transition-delay: 150ms; + } + + i { + height: 24px; + width: 24px; + display: flex; + justify-content: center; + align-items: center; + } + } + + rd-timer { + font-size: 13px; + display: inline-block; + font-variant-numeric: tabular-nums; + opacity: 0; + transform: translateX(-6px); + transition: all 100ms linear; + transition-delay: 150ms; + color: #bbbbbb; + background-color: rgba(255,255,255,.9); + padding-left: 2px; + padding-right: 1px; + margin-right: -4px; + margin-top: 2px; + } + + .widget-visualization[data-refreshing="false"] & { + display: none; + } +} + +.refresh-indicator-mini() { + font-size: 13px; + transition-delay: 0s; + color: #bbbbbb; + transform: translateY(-4px); + + .refresh-icon:before { + transition-delay: 0s; + opacity: 0; + } + + rd-timer { + transition-delay: 0s; + opacity: 1; + transform: translateX(0); + } +} + +.refresh-button { + margin-left: -6px; +} + +.tile { + .widget-menu-regular, .btn__refresh { + opacity: 0 !important; + transition: opacity 0.35s ease-in-out; + } + + .t-header { + .th-title { + padding-right: 23px; // no overlap on RefreshIndicator + + a { + color: fade(@redash-black, 80%); + font-size: 15px; + font-weight: 500; + } + } + + .query--description { + font-size: 14px; + line-height: 1.5; + font-style: italic; + + p { + margin-bottom: 0; + } + } + } + + .t-header.widget { + padding: 15px; + } + + &:hover { + .widget-menu-regular, .btn__refresh { + opacity: 1 !important; + transition: opacity 0.35s ease-in-out; + } + + .refresh-indicator { + .refresh-indicator-mini(); + } + } + + .tile__bottom-control { + padding: 10px 15px; + line-height: 2; + + a { + color: fade(@redash-black, 65%); + + &:hover { + color: fade(@redash-black, 95%); + } + } + } +} + // react-grid-layout overrides .react-grid-item { - + // placeholder color &.react-grid-placeholder { border-radius: 3px; background-color: #E0E6EB; opacity: 0.5; } - + // resize placeholder behind widget, the lib's default is above 🤷‍♂️ &.resizing { z-index: 3; } - + // auto-height animation &.cssTransforms:not(.resizing) { transition-property: transform, height; // added ", height" } - + // resize handle size & > .react-resizable-handle::after { width: 11px; diff --git a/client/app/pages/dashboards/dashboard.less b/client/app/pages/dashboards/dashboard.less index 92a3d9e986..a644de4ba8 100644 --- a/client/app/pages/dashboards/dashboard.less +++ b/client/app/pages/dashboards/dashboard.less @@ -1,3 +1,5 @@ +@import '../../assets/less/inc/variables'; + .dashboard-wrapper { flex-grow: 1; margin-bottom: 85px; @@ -51,13 +53,6 @@ background-size: calc((100vw - 15px) / 6) 5px; background-position: -7px 1px; } - - .widget-menu-regular { - display: none; - } - .widget-menu-remove { - display: block; - } } .dashboard-widget-wrapper:not(.widget-auto-height-enabled) { @@ -126,6 +121,15 @@ margin: 3px 5px 0 0; } +.dashboard-header { + position: -webkit-sticky; // required for Safari + position: sticky; + background: #f6f7f9; + z-index: 99; + width: 100%; + top: 0; +} + .dashboard-header, .page-header--query { .tags-control a { opacity: 0; @@ -140,6 +144,8 @@ } .dashboard__control { + margin: 8px 0; + .save-status { vertical-align: middle; margin-right: 7px; @@ -234,3 +240,40 @@ dashboard-grid { display: flex; flex-direction: column; } + +.add-widget-container { + background: #fff; + border-radius: @redash-radius; + padding: 15px; + position: fixed; + left: 15px; + bottom: 20px; + width: calc(~'100% - 30px'); + z-index: 99; + box-shadow: fade(@redash-gray, 50%) 0px 7px 29px -3px; + display: flex; + justify-content: space-between; + + h2 { + margin: 0; + font-size: 14px; + line-height: 2.1; + font-weight: 400; + + .zmdi { + margin: 0; + margin-right: 5px; + font-size: 24px; + position: absolute; + bottom: 18px; + } + + span { + padding-left: 30px; + } + } + + .btn { + align-self: center; + } +}