From 242ec565169e45613be002be7379515b9c988ccd Mon Sep 17 00:00:00 2001 From: Quique Fernandez Date: Tue, 27 Dec 2016 19:08:44 +0100 Subject: [PATCH] fix catalog layout --- .../Client/globals.scss | 7 + .../Client/modules/_variables.scss | 2 +- .../modules/catalog/catalog.component.html | 64 +++--- .../modules/catalog/catalog.component.scss | 194 ++++++++++-------- 4 files changed, 155 insertions(+), 112 deletions(-) diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/globals.scss b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/globals.scss index fa43bfe72..ece83bbfc 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/globals.scss +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/globals.scss @@ -20,13 +20,20 @@ body { font-weight: $font-weight-normal; z-index: 10; } +*, +*::after, +*::before { + box-sizing: border-box; +} .preloading { color: $color-brand; + display: block; font-size: $font-size-xl; left: 50%; position: fixed; top: 50%; + transform: translate(-50%, -50%); } select::-ms-expand { diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/_variables.scss b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/_variables.scss index a4747f04b..89c030bdf 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/_variables.scss +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/_variables.scss @@ -33,7 +33,7 @@ $font-weight-normal: 400; $font-weight-semibold: 600; $font-weight-bold: 700; -$font-size-xs: .5rem; // 8px +$font-size-xs: .65rem; // 10.4px $font-size-s: .85rem; // 13.6px $font-size-m: 1rem; // 16px $font-size-l: 1.25rem; // 20px diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.html b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.html index 3771ef7c4..91585e941 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.html +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.html @@ -1,38 +1,46 @@ -
-
- +
+
+
-
-
-
-
- -
-
- -
- -
-
+
+ +
+
+ + +
+
+ +
-
-
- - -
+ +
+
+ + + + +
{{item.name}}
-
+
{{item.price}}
+ -
\ No newline at end of file +
+ diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.scss b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.scss index 7d840457a..0b6be9bd2 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.scss +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.scss @@ -3,6 +3,7 @@ .esh-catalog { $banner-height: 260px; + &-hero { background-image: url('../../images/main_banner.png'); background-size: cover; @@ -16,105 +17,132 @@ } $filter-height: 65px; - &-filter { + + &-filters { + background-color: $color-brand; height: $filter-height; + } - &-container { + $filter-padding: .5rem; + + &-filter { + background-color: transparent; + border-color: $color-brand-bright; + color: $color-foreground-brighter; + cursor: pointer; + margin-right: 1rem; + margin-top: .5rem; + outline-color: $color-secondary; + padding-bottom: 0; + padding-left: $filter-padding; + padding-right: $filter-padding; + padding-top: $filter-padding * 3; + min-width: 140px; + -webkit-appearance: none; + + option { background-color: $color-brand; - height: $filter-height; - left: 0; + } + } + + &-label { + display: inline-block; + position: relative; + z-index: 0; + + &::before { + color: rgba($color-foreground-brighter, .5); + content: attr(data-title); + font-size: $font-size-xs; + margin-top: $font-size-xs; + margin-left: $filter-padding; position: absolute; - width: 100%; + text-transform: uppercase; + z-index: 1; } - &-button { - width: 45px; - height: 45px; - padding: 6px 20px 10px 8px; - background-color: $color-secondary; - color: white; - font-size: 16px; - margin: 10px 0; - border: none; + &::after { + background-image: url('../../images/arrow-down.png'); + height: 7px; //png height + content: ''; position: absolute; + right: $filter-padding * 3; + top: $filter-padding * 5; + width: 10px; //png width + z-index: 1; + } + } + + &-send { + background-color: $color-secondary; + color: $color-foreground-brighter; + cursor: pointer; + font-size: $font-size-m; + margin-top: -$filter-padding * 3; + padding: $filter-padding; + transition: all $animation-speed-default; + + &:hover { + background-color: $color-secondary-darker; + transition: all $animation-speed-default; } + } + + &-items { + margin-top: 1rem; + } - &-select { - background-color: transparent; - padding: 10px; - margin: 10px; - margin-right: 20px; - color: #fff; - padding-top: 20px; - padding-bottom: 3px; - min-width: 140px; - border-color: #37c7ca; - max-height: 43px; - -webkit-appearance: none; - - & option { - background-color: #00a69c; - } + &-item { + text-align: center; + margin-bottom: 1.5rem; + width: 33%; + + @media screen and (max-width: $media-screen-m) { + width: 50%; } - &-wrapper { - z-index: 0; - display: inline-block; - margin-left: -10px; + @media screen and (max-width: $media-screen-s) { + width: 100%; } + } - &-wrapper::before { - content: attr(data-name); - opacity: 0.5; - z-index: 1; - text-transform: uppercase; - position: absolute; - font-size: 10px; - margin-top: 15px; - margin-left: 21px; - color: white; + &-thumbnail { + max-width: 370px; + width: 100%; + } + + &-button { + background-color: $color-secondary; + border: none; + color: $color-foreground-brighter; + cursor: pointer; + font-size: $font-size-m; + height: 3rem; + margin-top: 1rem; + transition: all $animation-speed-default; + width: 80%; + + &:hover { + background-color: $color-secondary-darker; + transition: all $animation-speed-default; } } - &-content { - margin-top: 10px; - - &-item { - text-align: center; - margin-bottom: 20px; - - &-image { - } - - &-button { - width: 255px; - height: 45px; - padding: 10px 20px 10px 20px; - background-color: $color-secondary; - color: white; - font-size: 16px; - margin: 10px 0; - border: none; - cursor: pointer; - } - - &-title { - text-align: center; - text-transform: uppercase; - font-weight: 300; - font-size: 16px; - /*margin-top: 20px;*/ - } - - &-price { - text-align: center; - font-weight: 900; - font-size: 28px; - } - - &-price::before { - content: '$'; - } + &-name { + font-size: $font-size-m; + font-weight: $font-weight-semilight; + margin-top: .5rem; + text-align: center; + text-transform: uppercase; + } + + &-price { + text-align: center; + font-weight: 900; + font-size: 28px; + + &::before { + content: '$'; } } }