diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/globals.scss b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/globals.scss new file mode 100644 index 000000000..ece83bbfc --- /dev/null +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/globals.scss @@ -0,0 +1,41 @@ +@import './modules/_variables.scss'; + +$dist: './fonts/Montserrat-Regular'; +@font-face { + font-family: Montserrat; + font-weight: 400; + src: url("./fonts/Montserrat-Regular.eot?") format("eot"),url("./fonts/Montserrat-Regular.woff") format("woff"),url("./fonts/Montserrat-Regular.ttf") format("truetype"),url("./fonts/Montserrat-Regular.svg#Montserrat") format("svg") +} + +@font-face { + font-family: Montserrat; + font-weight: 700; + src: url("./fonts/Montserrat-Bold.eot?") format("eot"),url("./fonts/Montserrat-Bold.woff") format("woff"),url("./fonts/Montserrat-Bold.ttf") format("truetype"),url("./fonts/Montserrat-Bold.svg#Montserrat") format("svg") +} + +html, +body { + font-family: Montserrat,sans-serif; + font-size: 16px; + 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 { + display: none; +} diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/_variables.scss b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/_variables.scss index 179f36d71..c2efd7063 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/_variables.scss +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/_variables.scss @@ -6,14 +6,14 @@ $color-brand-bright: lighten($color-brand, 10%); $color-brand-brighter: lighten($color-brand, 20%); $color-secondary: #83D01B; -$color-secondary-dark: darken($color-secondary, 10%); +$color-secondary-dark: darken($color-secondary, 5%); $color-secondary-darker: darken($color-secondary, 20%); $color-secondary-bright: lighten($color-secondary, 10%); $color-secondary-brighter: lighten($color-secondary, 20%); $color-background-dark: #333333; $color-background-darker: #000000; -$color-background-bright: #EEEEEE; +$color-background-bright: #EEEEFF; $color-background-brighter: #FFFFFF; $color-foreground-dark: #333333; @@ -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 @@ -49,8 +49,5 @@ $media-screen-xl: 1440px; $media-screen-xxl: 1680px; $media-screen-xxxl: 1920px; -// Margins -$margin-center: 10vw; - -$medias: xxs, xs, s, m, l, xl, xxl, xxxl; -$mediavalues: $media-screen-xxs, $media-screen-xs, $media-screen-s, $media-screen-m, $media-screen-l, $media-screen-xl, $media-screen-xxl, $media-screen-xxxl; +// Borders +$border-light: 1px; diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.html b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.html index 034a82aee..6550a8276 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.html +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.html @@ -1,44 +1,38 @@ -
- - - - - - - - - -
+ + + + + + diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.scss b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.scss index 7433920b1..06ca0b6fe 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.scss +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.scss @@ -1,44 +1,28 @@ @import './_variables.scss'; -@font-face { - font-family: Montserrat; - font-weight: 400; - src: url("../dist/fonts/Montserrat-Regular.eot?") format("eot"),url("../dist/fonts/Montserrat-Regular.woff") format("woff"),url("../dist/fonts/Montserrat-Regular.ttf") format("truetype"),url("../dist/fonts/Montserrat-Regular.svg#Montserrat") format("svg") -} - -@font-face { - font-family: Montserrat; - font-weight: 700; - src: url("../dist/fonts/Montserrat-Bold.eot?") format("eot"),url("../dist/fonts/Montserrat-Bold.woff") format("woff"),url("../dist/fonts/Montserrat-Bold.ttf") format("truetype"),url("../dist/fonts/Montserrat-Bold.svg#Montserrat") format("svg") -} - -.app { - font-family: Montserrat,sans-serif; - +.esh-app { &-footer { - padding-top: 40px; - padding-bottom: 40px; - margin-top: 40px; - border-top: 1px solid #eee; - background-color: black; + $margin: 2.5rem; + $padding: 2.5rem; + + background-color: $color-background-darker; + border-top: $border-light solid $color-foreground-bright; + margin-top: $margin; + padding-bottom: $padding; + padding-top: $padding; width: 100%; + $height: 50px; &-brand { - margin-top: 25px; - max-width: 231px; - height: 52px; - margin-left: 0px !important; + height: $height; + width: 230px; } &-text { + color: $color-secondary; + line-height: $height; text-align: right; width: 100%; - height: 100%; - color: #83d01b; - margin-top: 10px; } } } - - - diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.ts b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.ts index 391e966aa..22c9d76ab 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.ts +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.ts @@ -12,7 +12,7 @@ import { SecurityService } from './shared/services/security.service'; */ @Component({ - selector: 'appc-app', + selector: 'esh-app.esh-app', styleUrls: ['./app.component.scss'], templateUrl: './app.component.html' }) 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 d963d060d..efd95e7cb 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,41 +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 54e0d5462..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 @@ -1,125 +1,148 @@ -@import '../_variables.scss'; +@import '../variables'; -select::-ms-expand { - display: none; -} +.esh-catalog { -.catalog { - &-banner { - height: 258px; - vertical-align: middle; + $banner-height: 260px; - &-image { - width: 100%; - position: absolute; - left: 0; - height: 258px; - } + &-hero { + background-image: url('../../images/main_banner.png'); + background-size: cover; + height: $banner-height; + width: 100%; + } - &-text { - position: relative; - top: 75px; - } + &-title { + position: relative; + top: $banner-height / 3.5; + } + + $filter-height: 65px; + + &-filters { + background-color: $color-brand; + height: $filter-height; } + $filter-padding: .5rem; + &-filter { - height: 65px; + 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; + } + } - &-container { + &-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%; - background-color: $color-brand; - left: 0; - height: 65px; + 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; } + } - &-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; - } + &-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; + } + + &-item { + text-align: center; + margin-bottom: 1.5rem; + width: 33%; - &-wrapper { - z-index: 0; - display: inline-block; - margin-left: -10px; + @media screen and (max-width: $media-screen-m) { + width: 50%; } - &-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; + @media screen and (max-width: $media-screen-s) { + width: 100%; } } - &-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; - } - - &-price { - text-align: center; - font-weight: 900; - font-size: 28px; - } - - &-price::before { - content: '$'; - } + &-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; + } + } + + &-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: '$'; } } } diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.ts b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.ts index 0eaf5fd5a..4aba2c433 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.ts +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/catalog/catalog.component.ts @@ -8,7 +8,7 @@ import { IPager } from '../shared/models/pager.model'; import { BasketWrapperService} from '../shared/services/basket.wrapper.service'; @Component({ - selector: 'esh-catalog .catalog', + selector: 'esh-catalog .esh-catalog', styleUrls: ['./catalog.component.scss'], templateUrl: './catalog.component.html' }) diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.html b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.html index ce352ef08..1b0a77c94 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.html +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.html @@ -1,31 +1,25 @@ -
-
+
+
-
-
Showing {{model?.items}} of {{model?.totalItems}} products - Page {{model?.actualPage + 1}} - {{model?.totalPages}}
-
- -
+
\ No newline at end of file diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.scss b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.scss index 10699926e..162de8c9d 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.scss +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.scss @@ -1,30 +1,30 @@ -.pager { - margin-bottom: 20px; - margin-top: 20px; - margin-left: 0px; - margin-right: -30px; +@import "../../../variables"; - &-previous { - position: absolute; - left: 0; - top: 0; - cursor: pointer; - } +.esh-pager { - &-text { - color: #83d01b; + &-wrapper { + padding-top: 1rem; + text-align: center; } - &-next { - position: absolute; - right: 15px; - top: 0; - cursor: pointer; - } + &-item { + $margin: 8vw; + margin: 0 $margin; + + &--navigable { + cursor: pointer; + + &:hover { + color: $color-secondary; + } + } + + @media screen and (max-width: $media-screen-l) { + font-size: $font-size-s; + } - &-isDisabled { - cursor: not-allowed; - opacity: .5; - pointer-events: none; + @media screen and (max-width: $media-screen-m) { + margin: 0 $margin / 2; + } } -} +} \ No newline at end of file diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.ts b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.ts index 73764a9a8..f075e0cc3 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.ts +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/shared/components/pager/pager.ts @@ -3,7 +3,7 @@ import { Component, OnInit, OnChanges, Output, Input, EventEmitter } from '@angu import { IPager } from '../../models/pager.model'; @Component({ - selector: 'esh-pager', + selector: 'esh-pager .esh-pager', templateUrl: './pager.html', styleUrls: ['./pager.scss'] }) diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Views/Home/Index.cshtml b/src/Web/WebSPA/eShopOnContainers.WebSPA/Views/Home/Index.cshtml index 57d9751b4..931ef55c7 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Views/Home/Index.cshtml +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Views/Home/Index.cshtml @@ -1,16 +1,8 @@ - - - -
+ +
- +