Commit ba1fbe07 by Torkel Ödegaard

ux: alternative row design

parent 4819e504
...@@ -4,25 +4,29 @@ import _ from 'lodash'; ...@@ -4,25 +4,29 @@ import _ from 'lodash';
export class DashboardRowCtrl { export class DashboardRowCtrl {
static template = ` static template = `
<a class="dashboard-row__title pointer" ng-click="ctrl.toggle()"> <div class="dashboard-row__center">
<span class="dashboard-row__chevron"> <div class="dashboard-row__actions-left">
<i class="fa fa-chevron-down" ng-hide="ctrl.panel.collapse"></i> <i class="fa fa-chevron-down" ng-hide="ctrl.panel.collapse"></i>
<i class="fa fa-chevron-right" ng-show="ctrl.panel.collapse"></i> <i class="fa fa-chevron-right" ng-show="ctrl.panel.collapse"></i>
</span> </div>
<a class="dashboard-row__title pointer" ng-click="ctrl.toggle()">
<span class="dashboard-row__title-text"> <span class="dashboard-row__title-text">
{{ctrl.panel.title | interpolateTemplateVars:this}} {{ctrl.panel.title | interpolateTemplateVars:this}}
</span> </span>
</a> </a>
<div class="dashboard-row__actions-right">
<a class="pointer" ng-click="ctrl.openSettings()"><span class="fa fa-cog"></i></a>
</div>
</div>
<div class="dashboard-row__panel_count"> <div class="dashboard-row__panel_count">
({{ctrl.panel.hiddenPanels.length}} hidden panels) ({{ctrl.panel.hiddenPanels.length}} hidden panels)
</div> </div>
<div class="dashboard-row__actions">
<a class="pointer" ng-click="ctrl.openSettings()"><span class="fa fa-cog"></i></a>
</div>
<div class="dashboard-row__drag grid-drag-handle"> <div class="dashboard-row__drag grid-drag-handle">
</div> </div>
`; `;
dashboard: any; dashboard: any;
panel: any; panel: any;
......
...@@ -5,7 +5,8 @@ $dashboard-row-height: 30px; ...@@ -5,7 +5,8 @@ $dashboard-row-height: 30px;
height: $dashboard-row-height; height: $dashboard-row-height;
line-height: $dashboard-row-height; line-height: $dashboard-row-height;
align-items: center; align-items: center;
padding: 0 0.5rem; align-content: center;
justify-content: center;
&--collapse { &--collapse {
background: $panel-bg; background: $panel-bg;
...@@ -22,11 +23,8 @@ $dashboard-row-height: 30px; ...@@ -22,11 +23,8 @@ $dashboard-row-height: 30px;
} }
&:hover { &:hover {
.dashboard-row__chevron { .dashboard-row__actions-left,
color: $link-color; .dashboard-row__actions-right {
}
.dashboard-row__actions {
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
transition: opacity 200ms ease-in-out 100ms; transition: opacity 200ms ease-in-out 100ms;
...@@ -34,29 +32,39 @@ $dashboard-row-height: 30px; ...@@ -34,29 +32,39 @@ $dashboard-row-height: 30px;
} }
} }
.dashboard-row__center {
position: relative;
}
.dashboard-row__title { .dashboard-row__title {
@include brand-bottom-border();
position: relative; position: relative;
flex-grow: 1; flex-grow: 0;
display: flex;
flex-direction: row;
margin-right: $panel-margin;
margin-left: 0;
font-size: 1.15rem; font-size: 1.15rem;
font-weight: $font-weight-semi-bold; font-weight: $font-weight-semi-bold;
padding: 0rem 1rem 0.3rem 1rem;
} }
.dashboard-row__chevron { .dashboard-row__actions-left {
position: absolute;
left: -23px;
font-size: $font-size-xs; font-size: $font-size-xs;
color: $text-muted; color: $text-muted;
position: relative;
top: 1px; top: 1px;
visibility: hidden;
opacity: 0;
} }
.dashboard-row__actions { .dashboard-row__actions-right {
position: absolute;
right: -40px;
padding-right: 1rem; padding-right: 1rem;
font-size: $font-size-sm; font-size: $font-size-sm;
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
top: 0px;
a { a {
color: $text-color-weak; color: $text-color-weak;
padding-left: $spacer; padding-left: $spacer;
...@@ -67,7 +75,6 @@ $dashboard-row-height: 30px; ...@@ -67,7 +75,6 @@ $dashboard-row-height: 30px;
} }
.dashboard-row__title-text { .dashboard-row__title-text {
padding-left: 0.4rem;
color: $text-color; color: $text-color;
} }
...@@ -77,6 +84,9 @@ $dashboard-row-height: 30px; ...@@ -77,6 +84,9 @@ $dashboard-row-height: 30px;
font-size: $font-size-sm; font-size: $font-size-sm;
font-weight: normal; font-weight: normal;
display: none; display: none;
position: absolute;
right: 30px;
top: 0;
} }
.dashboard-row__drag { .dashboard-row__drag {
...@@ -86,6 +96,9 @@ $dashboard-row-height: 30px; ...@@ -86,6 +96,9 @@ $dashboard-row-height: 30px;
background: url("../img/grab_dark.svg") no-repeat 50% 50%; background: url("../img/grab_dark.svg") no-repeat 50% 50%;
background-size: 8px; background-size: 8px;
visibility: hidden; visibility: hidden;
position: absolute;
top: 0;
right: 0;
} }
.panels-wrapper { .panels-wrapper {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment