From 66c66f7696d045bbcdf6c9c36560caaea51471f8 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 5 Apr 2018 12:46:02 +0200 Subject: [PATCH] vnHome style fix --- client/core/src/components/icon/style.scss | 1 + client/salix/src/components/home/home.html | 28 +++---- client/salix/src/components/home/style.scss | 86 +++++++++------------ client/salix/src/styles/misc.scss | 4 + e2e/helpers/components_selectors.js | 1 - e2e/helpers/selectors.js | 6 +- services/loopback/common/locale/en.json | 3 +- 7 files changed, 59 insertions(+), 70 deletions(-) diff --git a/client/core/src/components/icon/style.scss b/client/core/src/components/icon/style.scss index e9764adec..bed29630d 100644 --- a/client/core/src/components/icon/style.scss +++ b/client/core/src/components/icon/style.scss @@ -1,6 +1,7 @@ vn-icon { display: inline-block; font-size: 18pt; + text-align: center; & > i, & > i.material-icons { diff --git a/client/salix/src/components/home/home.html b/client/salix/src/components/home/home.html index df6699a79..81a4f331c 100644 --- a/client/salix/src/components/home/home.html +++ b/client/salix/src/components/home/home.html @@ -1,18 +1,12 @@ - - -
-
- - - - - - - - -

-
-
+
+
+ + +

{{::mod.name}}

- - \ No newline at end of file +
+
\ No newline at end of file diff --git a/client/salix/src/components/home/style.scss b/client/salix/src/components/home/style.scss index b35c1a1c7..b311ccdf7 100644 --- a/client/salix/src/components/home/style.scss +++ b/client/salix/src/components/home/style.scss @@ -1,59 +1,49 @@ vn-home { padding: 2em; - vn-horizontal{ - margin-bottom: 15px; - } - h6{ - color: #3C393B; - text-align: center; - } - a:link{ - text-decoration: none; - } - vn-module-container{ - display: flex; - flex: 1; - flex-direction: row; - justify-content: center; - .vn-module{ + & > div { + & > h6 { + color: #3C393B; + text-align: center; + margin-bottom: 15px; + } + & > .modules { display: flex; - flex: none; - margin: 10px; - background-color: #FF9300; - color: white; + flex: 1; + flex-direction: row; + justify-content: center; + flex-wrap: wrap; - overflow:hidden; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; + & > a { + overflow:hidden; + border-radius: 6px; + background-color: #FF9300; + color: white; + display: flex; + flex-direction: column; + height: 8em; + width: 7em; + margin: .5em; + padding: 1em; + justify-content: center; - .home__icon{ - width: 150px; - height: 150px; - img { - max-width: 50%; - margin-top: 20px; + transition: opacity 250ms ease-out; + + &:hover { + opacity: .7; + } + & > vn-icon { + font-size: 4em; + } + & > h4 { + text-align: center; + padding-top: .4em; + font-size: 16pt; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } } - h4{ - text-transform: capitalize; - font-size: 16pt; - } - vn-one{ - text-align: center; - } - - i{ - font-size: 75px !important; - margin: 0 auto; - padding-top: 15px; - } - &:hover{ - opacity: 0.7; - } - - } } } \ No newline at end of file diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss index b90297764..b7fbde50e 100644 --- a/client/salix/src/styles/misc.scss +++ b/client/salix/src/styles/misc.scss @@ -113,6 +113,10 @@ html [noDrop], .noDrop{ a { color: inherit; + + &:link { + text-decoration: none; + } } .vn-clickable { diff --git a/e2e/helpers/components_selectors.js b/e2e/helpers/components_selectors.js index 488d002e0..7aae5042c 100644 --- a/e2e/helpers/components_selectors.js +++ b/e2e/helpers/components_selectors.js @@ -8,7 +8,6 @@ export default { vnSubmit: 'vn-submit > input', vnTopbar: 'vn-topbar > header', vnIcon: 'vn-icon', - vnModuleContainer: 'vn-module-container > a', vnSearchBar: 'vn-searchbar > form > vn-horizontal', vnFloatButton: 'vn-float-button > button', vnMenuItem: 'vn-menu-item > li > a', diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index f5dd5e6e0..ba1ae8a72 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -11,9 +11,9 @@ export default { ticketsButton: `vn-main-menu [vn-id="apps-menu"] ul > li:nth-child(6)` }, moduleAccessView: { - clientsSectionButton: `${components.vnModuleContainer}[ui-sref="clients"]`, - itemsSectionButton: `${components.vnModuleContainer}[ui-sref="item.index"]`, - ticketsSectionButton: `${components.vnModuleContainer}[ui-sref="ticket.list"]` + clientsSectionButton: `vn-home a[ui-sref="clients"]`, + itemsSectionButton: `vn-home a[ui-sref="item.index"]`, + ticketsSectionButton: `vn-home a[ui-sref="ticket.list"]` }, clientsIndex: { searchClientInput: `${components.vnTextfield}`, diff --git a/services/loopback/common/locale/en.json b/services/loopback/common/locale/en.json index cd258a4b6..3dad6cb9e 100644 --- a/services/loopback/common/locale/en.json +++ b/services/loopback/common/locale/en.json @@ -9,5 +9,6 @@ "Quantity cannot be zero": "Quantity cannot be zero", "can't be blank": "can't be blank", "DNI Incorrecto": "DNI Incorrecto", - "El NIF/CIF debe ser único": "El NIF/CIF debe ser único" + "El NIF/CIF debe ser único": "El NIF/CIF debe ser único", + "Package cannot be blank": "Package cannot be blank" } \ No newline at end of file