Restyle of custom fields

stable
Jesús Espino 2016-11-19 10:00:42 +01:00 committed by Xaviju
parent 12a6bec5bb
commit 382758715b
2 changed files with 40 additions and 1 deletions

View File

@ -7,8 +7,10 @@ section.duty-custom-fields(ng-show="ctrl.customAttributes.length")
ng-click="toggleCollapse()" ng-click="toggleCollapse()"
) )
tg-svg(svg-icon="icon-arrow-down") tg-svg(svg-icon="icon-arrow-down")
.custom-fields-body( .custom-fields-body(
ng-show="!collapsed" ng-show="!collapsed"
ng-class="{'collapse-fields': ctrl.customAttributes.length > 6}"
) )
.custom-attribute( .custom-attribute(
ng-repeat="attr in ctrl.customAttributes" ng-repeat="attr in ctrl.customAttributes"

View File

@ -24,7 +24,7 @@
border-bottom: 1px solid $whitish; border-bottom: 1px solid $whitish;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
padding: 1rem; padding: .7rem;
&:hover { &:hover {
.custom-field-options { .custom-field-options {
opacity: 1; opacity: 1;
@ -85,3 +85,40 @@
} }
} }
} }
.custom-fields-body {
display: flex;
flex-wrap: wrap;
&.collapse-fields {
.custom-attribute {
flex-basis: 50%;
@include breakpoint(laptop) {
flex-basis: 100%;
&:nth-child(even) {
padding: 0;
}
&:nth-child(odd) {
padding: 0;
}
}
&:nth-child(even) {
padding: 0 0 0 2rem;
}
&:nth-child(odd) {
padding: 0 2rem 0 0;
}
}
}
.custom-attribute {
flex-basis: 100%;
&:nth-child(even) {
padding: 0;
}
&:nth-child(odd) {
padding: 0;
}
}
.custom-field-single {
height: 100%;
}
}