From 1f759b6b8c590378e19fcff6c1b0047787dbe982 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 13 Feb 2019 14:01:37 +0100 Subject: [PATCH] Style fixes --- Jenkinsfile | 21 +++--- front/core/components/dialog/style.scss | 2 +- .../components/icon-button/icon-button.js | 2 +- front/core/components/icon-button/style.scss | 16 +++-- front/core/components/table/style.scss | 70 ++++++++++--------- front/salix/components/home/style.scss | 4 +- front/salix/components/main-menu/style.scss | 3 +- front/salix/components/topbar/style.scss | 2 +- front/salix/styles/descriptor.scss | 3 +- front/salix/styles/misc.scss | 12 ++-- front/salix/styles/summary.scss | 2 +- front/salix/styles/variables.scss | 8 ++- gulpfile.js | 2 +- modules/client/front/index/index.html | 4 +- modules/item/front/index/style.scss | 2 +- modules/item/front/last-entries/style.scss | 14 ++-- modules/item/front/summary/style.scss | 2 +- .../item/front/ticket-descriptor/style.scss | 25 +++---- modules/ticket/front/index/index.html | 2 +- modules/ticket/front/index/style.scss | 47 ++----------- modules/ticket/front/sale/style.scss | 24 +++---- 21 files changed, 126 insertions(+), 141 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e1215375e4..234abd8dde 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ pipeline { stage('Checkout') { steps { script { - env.COMPOSE_PROJECT_NAME = env.JOB_NAME.replace('/', '-'); + env.COMPOSE_PROJECT_NAME = env.JOB_NAME.replace('/', '-') env.GIT_COMMITTER_EMAIL = sh( script: 'git --no-pager show -s --format="%ae"', returnStdout: true @@ -24,21 +24,24 @@ pipeline { switch (env.BRANCH_NAME) { case 'master': env.PORT = 5002 - break; - case 'test': + break + case 'test': env.PORT = 5001 - break; + break + case 'test': + env.PORT = 5000 + break } switch (env.BRANCH_NAME) { case 'master': env.NODE_ENV = 'production' - break; - case 'test': + break + case 'test': env.NODE_ENV = 'test' - break; + break case 'dev': env.NODE_ENV = 'development' - break; + break } } echo "Committer: ${env.GIT_COMMITTER_EMAIL}" @@ -57,7 +60,7 @@ pipeline { } stage('Test') { when { - branch 'dev'; + branch 'dev' } environment { NODE_ENV = "" diff --git a/front/core/components/dialog/style.scss b/front/core/components/dialog/style.scss index c63d02e15b..8fad14e03f 100644 --- a/front/core/components/dialog/style.scss +++ b/front/core/components/dialog/style.scss @@ -22,7 +22,7 @@ & > div { position: relative; box-shadow: 0 0 .4em $color-shadow; - background-color: white; + background-color: $color-bg-panel; border-radius: .2em; overflow: auto; padding: 2em; diff --git a/front/core/components/icon-button/icon-button.js b/front/core/components/icon-button/icon-button.js index 100c761792..b4022ccecb 100644 --- a/front/core/components/icon-button/icon-button.js +++ b/front/core/components/icon-button/icon-button.js @@ -6,7 +6,7 @@ export default class IconButton { if ($element[0].getAttribute('tabindex') == null) $element[0].tabIndex = 0; - $element.on("keyup", event => this.onKeyDown(event, $element)); + $element.on('keyup', event => this.onKeyDown(event, $element)); let button = $element[0].querySelector('button'); $element[0].addEventListener('click', event => { if (this.disabled || button.disabled) diff --git a/front/core/components/icon-button/style.scss b/front/core/components/icon-button/style.scss index 0874c57581..d5932fa395 100644 --- a/front/core/components/icon-button/style.scss +++ b/front/core/components/icon-button/style.scss @@ -3,16 +3,20 @@ vn-icon-button { outline: 0; color: $color-main; + display: inline-block; - button { - background: transparent !important; - background-color: transparent !important; - display: inline-block; + & > button { + background-color: transparent; + display: block; color: inherit; border: 0; + padding: .25em; - &.mdl-button--colored { - color: inherit; + &:hover { + background-color: initial; + } + & > vn-icon { + display: block; } } } diff --git a/front/core/components/table/style.scss b/front/core/components/table/style.scss index f05c6f4e17..65f2344c97 100644 --- a/front/core/components/table/style.scss +++ b/front/core/components/table/style.scss @@ -15,7 +15,7 @@ vn-table { display: table-header-group; border-bottom: .15em solid $color-spacer; - vn-th[field] { + & > * > vn-th[field] { position: relative; overflow: visible; cursor: pointer; @@ -49,17 +49,22 @@ vn-table { border-top: .15em solid $color-spacer; display: table-footer-group } - vn-tr, a.vn-tr { + & > * > vn-tr, + & > * > a.vn-tr { display: table-row } vn-thead, vn-tbody, vn-tfoot { & > * { display: table-row; - - vn-th { - font-weight: bold + + & > vn-th { + font-weight: bold; + padding-top: 1em; + padding-bottom: .8em; } - vn-td, vn-th, vn-td-editable { + & > vn-th, + & > vn-td, + & > vn-td-editable { vertical-align: middle; display: table-cell; text-align: left; @@ -87,11 +92,6 @@ vn-table { color: #f7931e; } } - vn-th { - font-weight: bold; - padding-top: 1em; - padding-bottom: .8em; - } & > :last-child { padding-right: 1em; } @@ -99,18 +99,13 @@ vn-table { padding-left: 1em; } } - a.vn-tr { + & > a.vn-tr { color: inherit; } } vn-tbody > * { border-bottom: .1em solid $color-spacer-light; - &, - & > vn-td, - & > vn-td > .chip { - transition: background-color 200ms ease-in-out; - } &:last-child { border-bottom: none; } @@ -124,37 +119,44 @@ vn-table { &.notice, & > .notice, & > vn-td > .notice { - color: white; - background-color: $color-notice; + color: $color-font-bg; + background-color: $color-notice-medium; } &.success, & > .success, & > vn-td > .success { - color: white; - background-color: $color-success; + color: $color-font-bg; + background-color: $color-success-medium; } &.warning, & > .warning, & > vn-td > .warning { - color: white; - background-color: $color-main; + color: $color-font-bg; + background-color: $color-main-medium; } &.alert, & > .alert, & > vn-td > .alert { - color: white; - background-color: $color-alert; + color: $color-font-bg; + background-color: $color-alert-medium; + } + & > [actions] { + width: 1px; + + & > * { + vertical-align: middle; + } } } - } - vn-empty-rows { - display: table-caption; - caption-side: bottom; - text-align: center; - padding: 1.5em; - width: 100%; - box-sizing: border-box; - color: $color-font-secondary; + & > vn-empty-rows { + display: table-caption; + caption-side: bottom; + text-align: center; + padding: 1.5em; + width: 100%; + box-sizing: border-box; + color: $color-font-secondary; + } } vn-autocomplete { div.mdl-textfield { diff --git a/front/salix/components/home/style.scss b/front/salix/components/home/style.scss index 6c1e1762b7..72322d0e07 100644 --- a/front/salix/components/home/style.scss +++ b/front/salix/components/home/style.scss @@ -24,7 +24,7 @@ vn-home { overflow:hidden; border-radius: 6px; background-color: $color-main; - color: white; + color: $color-font-dark; display: flex; flex-direction: column; height: 8em; @@ -54,7 +54,7 @@ vn-home { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; - color: white; + color: inherit; margin: 0; /* & > .bind-letter { diff --git a/front/salix/components/main-menu/style.scss b/front/salix/components/main-menu/style.scss index c4e0f7a889..fb7acf2966 100644 --- a/front/salix/components/main-menu/style.scss +++ b/front/salix/components/main-menu/style.scss @@ -1,4 +1,5 @@ @import "effects"; +@import "variables"; vn-main-menu { display: flex; @@ -31,7 +32,7 @@ vn-main-menu { vn-menu.vn-popover > div > div.content > ul { list-style-type: none; margin: 0; - color: white; + color: $color-font-dark; & > li { @extend %clickable-light; diff --git a/front/salix/components/topbar/style.scss b/front/salix/components/topbar/style.scss index 5c0ea23bdb..dc5273dbfc 100644 --- a/front/salix/components/topbar/style.scss +++ b/front/salix/components/topbar/style.scss @@ -2,7 +2,7 @@ vn-topbar { display: flex; - color: white; + color: $color-font-dark; box-sizing: border-box; background-color: $color-header; align-items: center; diff --git a/front/salix/styles/descriptor.scss b/front/salix/styles/descriptor.scss index af72b9c41c..782a57e66b 100644 --- a/front/salix/styles/descriptor.scss +++ b/front/salix/styles/descriptor.scss @@ -8,10 +8,9 @@ & > .header { display: flex; background: $color-main; - color: white; justify-content: space-between; align-items: stretch; - color: white; + color: $color-font-dark; & > * { min-width: 1.8em; diff --git a/front/salix/styles/misc.scss b/front/salix/styles/misc.scss index d02d4676a0..266994d264 100644 --- a/front/salix/styles/misc.scss +++ b/front/salix/styles/misc.scss @@ -20,7 +20,7 @@ input[type=reset]::-moz-focus-inner { } a , .link{ - color: $color-main; + color: $color-font-link; text-decoration: none; } .link { @@ -148,11 +148,9 @@ vn-tool-bar { max-width: 36em; margin: 0 auto; } - a.vn-list-item { @extend %clickable; } - .vn-list-item { padding: $pad-medium; border-bottom: $border-thin solid $color-spacer-light; @@ -180,7 +178,13 @@ a.vn-list-item { } } } - } + } +} +vn-empty-rows.vn-list-item { + text-align: center; + padding: 1.5em; + box-sizing: border-box; + color: $color-font-secondary; } /** START - FORM ELEMENTS DISABLED **/ diff --git a/front/salix/styles/summary.scss b/front/salix/styles/summary.scss index 2dd5b58fe5..fd1e99a222 100644 --- a/front/salix/styles/summary.scss +++ b/front/salix/styles/summary.scss @@ -9,7 +9,7 @@ padding: $pad-small; border: none; background: $color-main; - color: white; + color: $color-font-dark; margin: 0; text-align: center; line-height: 1.3em; diff --git a/front/salix/styles/variables.scss b/front/salix/styles/variables.scss index 418c605a6f..b794d56109 100644 --- a/front/salix/styles/variables.scss +++ b/front/salix/styles/variables.scss @@ -28,8 +28,10 @@ $border-thick: .15em; $color-header: #3d3d3d; $color-bg: #e5e5e5; $color-bg-dark: #3d3d3d; -$color-font:#222222; +$color-font: #222222; $color-font-secondary: #9b9b9b; +$color-font-dark: white; +$color-font-bg: rgba(0, 0, 0, .7); $color-active: #3d3d3d; $color-active-font: white; $color-bg-panel: white; @@ -47,6 +49,7 @@ $color-hover-cd: rgba(0, 0, 0, .1); $color-hover-dc: .7; $color-disabled: .6; +$color-font-link: darken($color-main, 10%); $color-main-medium: lighten($color-main, 20%); $color-main-light: lighten($color-main, 35%); $color-success-medium: lighten($color-success, 20%); @@ -63,6 +66,8 @@ $color-bg: #222; $color-bg-dark: #222; $color-font: white; $color-font-secondary: #777; +$color-font-dark: white; +$color-font-bg: rgba(0, 0, 0, .8); $color-active: #666; $color-active-font: white; $color-bg-panel: #3c3b3b; @@ -80,6 +85,7 @@ $color-hover-cd: rgba(255, 255, 255, .1); $color-hover-dc: .7; $color-disabled: .6; +$color-font-link: lighten($color-main, 10%); $color-main-medium: darken($color-main, 20%); $color-main-light: darken($color-main, 35%); $color-success-medium: darken($color-success, 20%); diff --git a/gulpfile.js b/gulpfile.js index d69dd5d0de..d668b98aeb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -115,7 +115,7 @@ async function backTestDocker() { if (argv['random']) await execP(`docker rm -fv ${containerId}`); } -backTestDocker.description = `Runs backend tests using in site container`; +backTestDocker.description = `Runs backend tests restoring fixtures first`; function backTest(done) { const nodemon = require('gulp-nodemon'); diff --git a/modules/client/front/index/index.html b/modules/client/front/index/index.html index 07b394073c..32f01c7e4e 100644 --- a/modules/client/front/index/index.html +++ b/modules/client/front/index/index.html @@ -22,11 +22,11 @@ ng-repeat="client in clients track by client.id" client="::client"> - No results - Enter a new search diff --git a/modules/item/front/index/style.scss b/modules/item/front/index/style.scss index b73c1e32ce..d360f83371 100644 --- a/modules/item/front/index/style.scss +++ b/modules/item/front/index/style.scss @@ -5,7 +5,7 @@ vn-item-product { .id { background-color: $color-main; - color: white; + color: $color-font-dark; margin-bottom: 0em; } .image { diff --git a/modules/item/front/last-entries/style.scss b/modules/item/front/last-entries/style.scss index c22d7073c4..c2e03b6ed9 100644 --- a/modules/item/front/last-entries/style.scss +++ b/modules/item/front/last-entries/style.scss @@ -1,21 +1,23 @@ @import "variables"; + vn-item-last-entries { .round { background-color: $color-spacer; border-radius: 25px; float: right; width: 25px; - color: white; + color: $color-font-dark; text-align: center; font-weight: bold; } - & vn-horizontal { + vn-horizontal { justify-content: center; } - & vn-date-picker { - flex: none!important; - & .mdl-textfield{ - width: 400px!important; + vn-date-picker { + flex: none !important; + + .mdl-textfield{ + width: 400px !important; } } @media screen and (max-width: 1440px) { diff --git a/modules/item/front/summary/style.scss b/modules/item/front/summary/style.scss index 6f4823c309..bb7e5d2272 100644 --- a/modules/item/front/summary/style.scss +++ b/modules/item/front/summary/style.scss @@ -9,7 +9,7 @@ vn-item-summary { .item-state { padding: .4em; background-color: $color-main; - color: white; + color: $color-font-dark; p { font-size: .8em; diff --git a/modules/item/front/ticket-descriptor/style.scss b/modules/item/front/ticket-descriptor/style.scss index 32fd7d9dc7..ae7f338d09 100644 --- a/modules/item/front/ticket-descriptor/style.scss +++ b/modules/item/front/ticket-descriptor/style.scss @@ -1,10 +1,12 @@ @import "variables"; vn-dialog.modal-form { - vn-horizontal.header{ + vn-horizontal.header { background-color: $color-main; - h5{ - color: white; + color: $color-font-dark; + + h5 { + color: inherit; margin: 0 auto; } } @@ -14,23 +16,22 @@ vn-dialog.modal-form { table { width: 100% } - &>div{ - padding: 0!important; + & > div { + padding: 0 !important; } vn-textfield { width: 100%; } - .buttons{ - margin-top: 0!important; + .buttons { + margin-top: 0 !important; } - - p{ + p { display: none; } - button.close > vn-icon{ - color: white!important; + button.close > vn-icon { + color: white !important; } vn-ticket-sale-edit-discount > div { - padding-bottom: 0!important; + padding-bottom: 0 !important; } } \ No newline at end of file diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index 6e2038ea6f..50e801e59d 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -82,7 +82,7 @@ {{::ticket.agencyMode}} {{::ticket.warehouse}} {{::ticket.total | currency: 'EUR': 2}} - + vn-icon{