Commit 28236aed authored by Davyd Dobryakov's avatar Davyd Dobryakov

Add stylelint for scss-linting, fix scss-files by scss-linting standards

parent 54ab80c6
Pipeline #6259 passed with stage
in 1 minute 20 seconds
{
"extends": "stylelint-config-sass-guidelines",
"rules": {
"selector-class-pattern": null,
"scss/selector-no-redundant-nesting-selector": null,
"scss/dollar-variable-pattern": null,
"property-no-vendor-prefix": null
},
"ignoreFiles": ["builds/**", "**/reset.scss"]
}
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</ul> </ul>
</nav> </nav>
</header> </header>
<menu id="menu"> <menu id="menu" class="menu">
<a href="#about"><span>О компании</span></a> <a href="#about"><span>О компании</span></a>
<a href="#products"><span>Продукты</span></a> <a href="#products"><span>Продукты</span></a>
<a href="#services"><span>Услуги</span></a> <a href="#services"><span>Услуги</span></a>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"scripts": { "scripts": {
"dev": "webpack-dev-server --open --host 91.232.225.11 --port 17001 --mode development", "dev": "webpack-dev-server --open --host 91.232.225.11 --port 17001 --mode development",
"lint": "npx eslint src/js/*.js", "lint": "npx eslint src/js/*.js",
"stylelint": "stylelint 'src/**/*.scss'",
"build": "webpack --mode production" "build": "webpack --mode production"
}, },
"browserslist": [ "browserslist": [
...@@ -31,8 +32,13 @@ ...@@ -31,8 +32,13 @@
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"style-loader": "^1.1.3", "style-loader": "^1.1.3",
"stylelint": "^13.2.0",
"stylelint-webpack-plugin": "^1.2.3",
"webpack": "^4.41.5", "webpack": "^4.41.5",
"webpack-cli": "^3.3.10", "webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.10.2" "webpack-dev-server": "^3.10.2"
},
"dependencies": {
"stylelint-config-sass-guidelines": "^7.0.0"
} }
} }
...@@ -2,88 +2,88 @@ ...@@ -2,88 +2,88 @@
@font-face { @font-face {
font-family: 'FuturaDemiC'; font-family: 'FuturaDemiC';
font-style: normal;
font-weight: normal;
src: url('./fonts/FuturaDemiC.eot'); src: url('./fonts/FuturaDemiC.eot');
src: local('Futura Demi Cyrillic'), local('FuturaDemiC'), src: local('Futura Demi Cyrillic'), local('FuturaDemiC'),
url('./fonts/FuturaDemiC.eot?#iefix') format('embedded-opentype'), url('./fonts/FuturaDemiC.eot?#iefix') format('embedded-opentype'),
url('./fonts/FuturaDemiC.woff') format('woff'), url('./fonts/FuturaDemiC.woff') format('woff'),
url('./fonts/FuturaDemiC.ttf') format('truetype'); url('./fonts/FuturaDemiC.ttf') format('truetype');
font-weight: normal;
font-style: normal;
} }
@font-face { @font-face {
font-family: 'FuturaMediumC'; font-family: 'FuturaMediumC';
font-style: normal;
font-weight: 500;
src: url('./fonts/FuturaMediumC.eot'); src: url('./fonts/FuturaMediumC.eot');
src: local('Futura Medium Cyrillic'), local('FuturaMediumC'), src: local('Futura Medium Cyrillic'), local('FuturaMediumC'),
url('./fonts/FuturaMediumC.eot?#iefix') format('embedded-opentype'), url('./fonts/FuturaMediumC.eot?#iefix') format('embedded-opentype'),
url('./fonts/FuturaMediumC.woff') format('woff'), url('./fonts/FuturaMediumC.woff') format('woff'),
url('./fonts/FuturaMediumC.ttf') format('truetype'); url('./fonts/FuturaMediumC.ttf') format('truetype');
font-weight: 500;
font-style: normal;
} }
@font-face { @font-face {
font-family: 'FuturaLightC'; font-family: 'FuturaLightC';
font-style: italic;
font-weight: 300;
src: url('./fonts/FuturaLightC-Italic.eot'); src: url('./fonts/FuturaLightC-Italic.eot');
src: local('Futura Light Italic Cyrillic'), local('FuturaLightC-Italic'), src: local('Futura Light Italic Cyrillic'), local('FuturaLightC-Italic'),
url('./fonts/FuturaLightC-Italic.eot?#iefix') format('embedded-opentype'), url('./fonts/FuturaLightC-Italic.eot?#iefix') format('embedded-opentype'),
url('./fonts/FuturaLightC-Italic.woff') format('woff'), url('./fonts/FuturaLightC-Italic.woff') format('woff'),
url('./fonts/FuturaLightC-Italic.ttf') format('truetype'); url('./fonts/FuturaLightC-Italic.ttf') format('truetype');
font-weight: 300;
font-style: italic;
} }
@font-face { @font-face {
font-family: 'FuturaMediumC'; font-family: 'FuturaMediumC';
font-style: italic;
font-weight: 500;
src: url('./fonts/FuturaMediumC-Italic.eot'); src: url('./fonts/FuturaMediumC-Italic.eot');
src: local('Futura Medium Italic Cyrillic'), local('FuturaMediumC-Italic'), src: local('Futura Medium Italic Cyrillic'), local('FuturaMediumC-Italic'),
url('./fonts/FuturaMediumC-Italic.eot?#iefix') format('embedded-opentype'), url('./fonts/FuturaMediumC-Italic.eot?#iefix') format('embedded-opentype'),
url('./fonts/FuturaMediumC-Italic.woff') format('woff'), url('./fonts/FuturaMediumC-Italic.woff') format('woff'),
url('./fonts/FuturaMediumC-Italic.ttf') format('truetype'); url('./fonts/FuturaMediumC-Italic.ttf') format('truetype');
font-weight: 500;
font-style: italic;
} }
@font-face { @font-face {
font-family: 'FuturaLightC'; font-family: 'FuturaLightC';
font-style: normal;
font-weight: 300;
src: url('./fonts/FuturaLightC.eot'); src: url('./fonts/FuturaLightC.eot');
src: local('Futura Light Cyrillic'), local('FuturaLightC'), src: local('Futura Light Cyrillic'), local('FuturaLightC'),
url('./fonts/FuturaLightC.eot?#iefix') format('embedded-opentype'), url('./fonts/FuturaLightC.eot?#iefix') format('embedded-opentype'),
url('./fonts/FuturaLightC.woff') format('woff'), url('./fonts/FuturaLightC.woff') format('woff'),
url('./fonts/FuturaLightC.ttf') format('truetype'); url('./fonts/FuturaLightC.ttf') format('truetype');
font-weight: 300;
font-style: normal;
} }
@font-face { @font-face {
font-family: 'FuturaDemiC'; font-family: 'FuturaDemiC';
font-style: italic;
font-weight: normal;
src: url('./fonts/FuturaDemiC-Italic.eot'); src: url('./fonts/FuturaDemiC-Italic.eot');
src: local('Futura Demi Italic Cyrillic'), local('FuturaDemiC-Italic'), src: local('Futura Demi Italic Cyrillic'), local('FuturaDemiC-Italic'),
url('./fonts/FuturaDemiC-Italic.eot?#iefix') format('embedded-opentype'), url('./fonts/FuturaDemiC-Italic.eot?#iefix') format('embedded-opentype'),
url('./fonts/FuturaDemiC-Italic.woff') format('woff'), url('./fonts/FuturaDemiC-Italic.woff') format('woff'),
url('./fonts/FuturaDemiC-Italic.ttf') format('truetype'); url('./fonts/FuturaDemiC-Italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
} }
@font-face { @font-face {
font-family: 'FuturaBookC'; font-family: 'FuturaBookC';
font-style: italic;
font-weight: normal;
src: url('./fonts/FuturaBookC-Italic.eot'); src: url('./fonts/FuturaBookC-Italic.eot');
src: local('Futura Book Italic Cyrillic'), local('FuturaBookC-Italic'), src: local('Futura Book Italic Cyrillic'), local('FuturaBookC-Italic'),
url('./fonts/FuturaBookC-Italic.eot?#iefix') format('embedded-opentype'), url('./fonts/FuturaBookC-Italic.eot?#iefix') format('embedded-opentype'),
url('./fonts/FuturaBookC-Italic.woff') format('woff'), url('./fonts/FuturaBookC-Italic.woff') format('woff'),
url('./fonts/FuturaBookC-Italic.ttf') format('truetype'); url('./fonts/FuturaBookC-Italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
} }
@font-face { @font-face {
font-family: 'FuturaBookC'; font-family: 'FuturaBookC';
font-style: normal;
font-weight: normal;
src: url('./fonts/FuturaBookC.eot'); src: url('./fonts/FuturaBookC.eot');
src: local('Futura Book Cyrillic'), local('FuturaBookC'), src: local('Futura Book Cyrillic'), local('FuturaBookC'),
url('./fonts/FuturaBookC.eot?#iefix') format('embedded-opentype'), url('./fonts/FuturaBookC.eot?#iefix') format('embedded-opentype'),
url('./fonts/FuturaBookC.woff') format('woff'), url('./fonts/FuturaBookC.woff') format('woff'),
url('./fonts/FuturaBookC.ttf') format('truetype'); url('./fonts/FuturaBookC.ttf') format('truetype');
font-weight: normal;
font-style: normal;
} }
@import "utils/reset"; @import 'utils/reset';
@import "utils/mixins"; @import 'utils/mixins';
@import "utils/vars"; @import 'utils/vars';
@import "utils/common"; @import 'utils/common';
@import "utils/columns"; @import 'utils/columns';
@import "utils/buttons"; @import 'utils/buttons';
@import "utils/hello-banner"; @import 'utils/hello-banner';
@import "utils/slider"; @import 'utils/slider';
@import "utils/card"; @import 'utils/card';
.btn { .btn {
padding: 0.5rem 1rem;
border-radius: 5px; border-radius: 5px;
padding: 0.5rem 1rem;
} }
.btn-default { .btn-default {
color: $default-color;
background-color: $neutral-primary; background-color: $neutral-primary;
color: $default-color;
} }
.btn-default:hover { .btn-default:hover {
color: $neutral-primary;
background-color: $default-color; background-color: $default-color;
border: 1px solid $neutral-primary; border: 1px solid $neutral-primary;
color: $neutral-primary;
} }
.btn-primary { .btn-primary {
color: $default-color;
background-color: $primary-color; background-color: $primary-color;
color: $default-color;
} }
.btn-primary:hover { .btn-primary:hover {
color: $primary-color;
background-color: $default-color; background-color: $default-color;
border: 1px solid $primary-color; border: 1px solid $primary-color;
color: $primary-color;
} }
.btn-success { .btn-success {
color: $default-color;
background-color: $success-color; background-color: $success-color;
color: $default-color;
} }
.btn-success:hover { .btn-success:hover {
color: $success-color;
background-color: $default-color; background-color: $default-color;
border: 1px solid $success-color; border: 1px solid $success-color;
color: $success-color;
} }
.btn-danger { .btn-danger {
color: $default-color;
background-color: $danger-color; background-color: $danger-color;
color: $default-color;
} }
.btn-danger:hover { .btn-danger:hover {
color: $danger-color;
background-color: $default-color; background-color: $default-color;
border: 1px solid $danger-color; border: 1px solid $danger-color;
color: $danger-color;
} }
.btn-warning { .btn-warning {
color: $default-color;
background-color: $warning-color; background-color: $warning-color;
color: $default-color;
} }
.btn-warning:hover { .btn-warning:hover {
color: $warning-color;
background-color: $default-color; background-color: $default-color;
border: 1px solid $warning-color; border: 1px solid $warning-color;
color: $warning-color;
} }
.card { .card {
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 0;
width: 300px;
height: 300px;
text-align: center;
background: #fff; background: #fff;
color: #fff;
border: 1px solid #d7d7d7; border: 1px solid #d7d7d7;
border-radius: 5px; border-radius: 5px;
position: relative;
box-sizing: border-box; box-sizing: border-box;
color: #fff;
display: flex;
flex-direction: column;
height: 300px;
justify-content: flex-end;
margin: 0.1rem; margin: 0.1rem;
padding: 0;
position: relative;
text-align: center;
width: 300px;
} }
.card__image, .card__image,
.card__image img { .card__image img {
width: 300px;
height: 300px; height: 300px;
width: 300px;
} }
.card__image, .card__image,
.card__image img { .card__image img {
z-index: 1; border-radius: 5px;
box-sizing: border-box;
left: 0;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; z-index: 1;
box-sizing: border-box;
border-radius: 5px;
} }
.card__overlay { .card__overlay {
background: #000; background: #000;
opacity: 0.7; border-radius: 5px;
width: 300px; box-sizing: border-box;
height: 300px; height: 300px;
left: 0;
opacity: 0.7;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; width: 300px;
z-index: 2; z-index: 2;
box-sizing: border-box;
border-radius: 5px;
} }
.card__body { .card__body {
padding: 0.5rem 1rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0.5rem 1rem;
} }
.card__heading, .card__heading,
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
.card__text--animated { .card__text--animated {
font-size: rem(18); font-size: rem(18);
transform: translateY(10%);
position: absolute; position: absolute;
transform: translateY(10%);
visibility: hidden; visibility: hidden;
} }
...@@ -76,10 +76,10 @@ ...@@ -76,10 +76,10 @@
} }
.card:hover .card__text--animated { .card:hover .card__text--animated {
transition: 0.3s ease;
transform: translateY(-10%);
position: static;
margin-top: 0.75rem; margin-top: 0.75rem;
position: static;
transform: translateY(-10%);
transition: 0.3s ease;
visibility: visible; visibility: visible;
} }
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
.card-deck .card__overlay, .card-deck .card__overlay,
.card-deck .card__image, .card-deck .card__image,
.card-deck .card__image img { .card-deck .card__image img {
width: 350px;
height: 350px; height: 350px;
width: 350px;
} }
} }
...@@ -115,8 +115,8 @@ ...@@ -115,8 +115,8 @@
.card-deck .card__overlay, .card-deck .card__overlay,
.card-deck .card__image, .card-deck .card__image,
.card-deck .card__image img { .card-deck .card__image img {
width: 280px;
height: 280px; height: 280px;
width: 280px;
} }
} }
...@@ -126,3 +126,4 @@ ...@@ -126,3 +126,4 @@
margin: auto; margin: auto;
} }
} }
section { section {
margin: 0 20%;
display: grid;
grid-template-columns: repeat(2, 1fr);
background: $default-color; background: $default-color;
border-bottom: 1px solid; border-bottom: 1px solid;
border-right: 1px solid;
border-left: 1px solid;
border-color: $border-base; border-color: $border-base;
box-sizing: border-box; box-sizing: border-box;
display: grid;
grid-template-columns: repeat(2, 1fr);
margin: 0 20%;
} }
section .left-column { section .left-column {
width: 100%;
height: 100%; height: 100%;
padding: 1rem 0.5rem; padding: 1rem 0.5rem;
width: 100%;
} }
section .right-column { section .right-column {
width: 100%;
height: 100%; height: 100%;
width: 100%;
} }
.flex-column { .flex-column {
...@@ -33,11 +31,11 @@ section .right-column { ...@@ -33,11 +31,11 @@ section .right-column {
} }
.right-column .banner { .right-column .banner {
display: flex;
align-items: center; align-items: center;
display: flex;
height: 100%;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
height: 100%;
} }
.description { .description {
...@@ -47,7 +45,7 @@ section .right-column { ...@@ -47,7 +45,7 @@ section .right-column {
@media (min-width: $smDesktopWidth) and (max-width: $desktopWidth) { @media (min-width: $smDesktopWidth) and (max-width: $desktopWidth) {
section, section,
section.flex-column { .flex-column {
margin: 0 10%; margin: 0 10%;
} }
...@@ -59,38 +57,43 @@ section .right-column { ...@@ -59,38 +57,43 @@ section .right-column {
padding: 3rem 10%; padding: 3rem 10%;
} }
} }
@media screen and (max-width: $smDesktopWidth) { @media screen and (max-width: $smDesktopWidth) {
section { section {
display: flex; display: flex;
flex-flow: column wrap; flex-flow: column wrap;
margin: 0; margin: 0;
} }
section .left-column { section .left-column {
order: 1; order: 1;
} }
.right-column, .right-column,
.banner { .banner {
max-height: min-content; max-height: min-content;
} }
nav { nav {
padding: 0.5rem; padding: 0.5rem;
} }
section.flex-column { .flex-column {
margin: 0; margin: 0;
} }
section.card-deck { .card-deck {
margin: 0; margin: 0 auto;
} }
} }
@media screen and (max-width: $smTableWidth) { @media screen and (max-width: $smTableWidth) {
section.card-deck { .card-deck {
margin: 0; margin: 0 auto;
} }
section.card-deck .card-group { .card-deck .card-group {
flex-flow: column wrap; flex-flow: column wrap;
} }
} }
@import "./fonts/fonts"; @import './fonts/fonts';
html { html {
line-height: $mainLineHeight;
font-size: $mainFontSize;
color: $mainFontColor; color: $mainFontColor;
font-size: $mainFontSize;
height: 100%; height: 100%;
line-height: $mainLineHeight;
scroll-behavior: smooth; scroll-behavior: smooth;
@media screen and (max-width: $desktopWidth) { @media screen and (max-width: $desktopWidth) {
font-size: 16px; font-size: 16px;
...@@ -20,21 +20,18 @@ html { ...@@ -20,21 +20,18 @@ html {
} }
body { body {
margin: 0; background: $default-color;
padding: 0; background: rgba(84.7, 91, 100, 0.1);
font-family: 'FuturaMediumC'; font-family: 'FuturaMediumC';
font-size: $mainFontSize; font-size: $mainFontSize;
font-weight: $mainFontWeight; font-weight: $mainFontWeight;
-webkit-font-smoothing: antialiased; margin: 0;
-moz-osx-font-smoothing: grayscale; padding: 0;
background: $default-color;
background: rgba(84.7, 91, 100, 0.1);
// background: #f7f7f7;
} }
*, *,
*:before, *::before,
*:after { *::after {
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -53,9 +50,9 @@ a { ...@@ -53,9 +50,9 @@ a {
ul, ul,
li { li {
list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style-type: none;
} }
.wrapper { .wrapper {
...@@ -73,11 +70,11 @@ li { ...@@ -73,11 +70,11 @@ li {
} }
.container { .container {
width: 100%;
flex: 0 0 auto; flex: 0 0 auto;
position: relative;
margin: 0 auto; margin: 0 auto;
max-width: $desktopWidth; max-width: $desktopWidth;
position: relative;
width: 100%;
@media screen and (max-width: $smDesktopWidth) { @media screen and (max-width: $smDesktopWidth) {
max-width: $tableWidth; max-width: $tableWidth;
...@@ -103,11 +100,11 @@ h2 { ...@@ -103,11 +100,11 @@ h2 {
} }
header { header {
z-index: 4;
position: sticky;
display: block;
background: $default-color; background: $default-color;
display: block;
position: sticky;
transition: top 1s ease-out 0.5s; transition: top 1s ease-out 0.5s;
z-index: 4;
} }
.top-0 { .top-0 {
...@@ -115,11 +112,10 @@ header { ...@@ -115,11 +112,10 @@ header {
} }
nav { nav {
box-shadow: 3px 0 3px rgba(0, 0, 0, 0.3);
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
padding: 0.5rem 1rem;
box-shadow: 3px 0 3px rgba(0, 0, 0, 0.3);
padding: 0.5rem 20%; padding: 0.5rem 20%;
} }
...@@ -127,25 +123,25 @@ nav a { ...@@ -127,25 +123,25 @@ nav a {
padding: 0 0.5rem; padding: 0 0.5rem;
} }
ul.menu-right { .menu-right {
margin-top: auto;
margin-bottom: auto;
display: flex; display: flex;
flex-flow: row wrap;
margin-bottom: auto;
margin-left: auto; margin-left: auto;
margin-top: auto;
order: 2; order: 2;
flex-flow: row wrap;
} }
ul.menu-right > * { .menu-right > * {
margin: auto 0; margin: auto 0;
margin-left: 0.25rem; margin-left: 0.25rem;
} }
footer { footer {
background: $default-color; background: $default-color;
border: 1px solid $border-base;
padding: 1rem 0.5rem; padding: 1rem 0.5rem;
text-align: center; text-align: center;
border: 1px solid $border-base;
} }
.logo img { .logo img {
...@@ -153,8 +149,8 @@ footer { ...@@ -153,8 +149,8 @@ footer {
} }
a { a {
font-size: rem(18);
color: $neutral-primary; color: $neutral-primary;
font-size: rem(18);
} }
a:hover { a:hover {
...@@ -162,11 +158,11 @@ a:hover { ...@@ -162,11 +158,11 @@ a:hover {
} }
.menu-button { .menu-button {
display: inline-block;
padding: 0.5em;
background-color: #fafafa; background-color: #fafafa;
border: 1px solid #ccc; border: 1px solid #ccc;
cursor: pointer; cursor: pointer;
display: inline-block;
padding: 0.5em;
} }
.burger-icon { .burger-icon {
...@@ -183,8 +179,8 @@ a:hover { ...@@ -183,8 +179,8 @@ a:hover {
} }
.visually-visible { .visually-visible {
visibility: visible !important;
display: inherit !important; display: inherit !important;
visibility: visible !important;
} }
@media screen and (min-width: $smDesktopWidth) { @media screen and (min-width: $smDesktopWidth) {
...@@ -193,7 +189,7 @@ a:hover { ...@@ -193,7 +189,7 @@ a:hover {
visibility: hidden; visibility: hidden;
} }
menu#menu { .menu {
display: none; display: none;
visibility: hidden; visibility: hidden;
} }
...@@ -205,54 +201,54 @@ a:hover { ...@@ -205,54 +201,54 @@ a:hover {
visibility: hidden; visibility: hidden;
} }
menu#menu { .menu {
border-top: 1px solid $border-base; background: $default-color;
border-bottom: 1px solid $border-base; border-bottom: 1px solid $border-base;
border-top: 1px solid $border-base;
display: none; display: none;
visibility: hidden;
flex-flow: column wrap; flex-flow: column wrap;
width: 100%;
text-align: center;
z-index: 4;
position: sticky; position: sticky;
background: $default-color; text-align: center;
top: 76px; top: 76px;
visibility: hidden;
width: 100%;
z-index: 4;
} }
menu#menu > a { .menu > a {
display: flex;
width: 100%;
border: inherit; border: inherit;
display: flex;
height: 40px; height: 40px;
width: 100%;
} }
menu#menu > a > span { .menu > a > span {
width: inherit;
text-align: center;
line-height: rem(40); line-height: rem(40);
text-align: center;
width: inherit;
} }
} }
ol.default-list { .default-list {
display: block; display: block;
list-style-type: decimal; list-style-type: decimal;
margin-top: 1em; margin-bottom: 1em;
margin-bottom: 1 em;
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;
margin-top: 1em;
padding-left: 40px; padding-left: 40px;
} }
ol.default-list > li { .default-list > li {
display: list-item; display: list-item;
list-style-type: inherit !important; list-style-type: inherit !important;
} }
select { select {
padding: 0.25rem; background: $default-color;
border: 1px solid $border-base; border: 1px solid $border-base;
border-radius: 5px; border-radius: 5px;
background: $default-color; padding: 0.25rem;
} }
.pt-2 { .pt-2 {
...@@ -268,7 +264,9 @@ select { ...@@ -268,7 +264,9 @@ select {
} }
.map-iframe { .map-iframe {
width: 100%;
height: 300px; height: 300px;
margin: 0 auto; margin: 0 auto;
width: 100%;
} }
.hello-banner { .hello-banner {
width: 100%; margin: 0 auto;
min-height: 500px;
max-height: 500px; max-height: 500px;
min-height: 500px;
position: relative; position: relative;
margin: 0 auto; width: 100%;
} }
.hello-banner__text { .hello-banner__text {
color: #fff; color: #fff;
padding: 3rem 2rem; height: 100%;
padding: 3rem 20%;
position: relative; position: relative;
width: 100%; width: 100%;
padding: 3rem 20%;
z-index: 3; z-index: 3;
height: 100%;
} }
.hello-banner__text h1 { .hello-banner__text h1 {
font-size: rem(48); font-size: rem(48);
font-weight: bold; font-weight: bold;
...@@ -26,21 +26,21 @@ ...@@ -26,21 +26,21 @@
.hello-banner__gradient { .hello-banner__gradient {
background: #000; background: #000;
opacity: 0.8;
width: 100%;
height: 100%; height: 100%;
opacity: 0.8;
position: absolute; position: absolute;
width: 100%;
z-index: 2; z-index: 2;
} }
.hello-banner__img { .hello-banner__img {
background-image: url('../images/banner.jpg');
background-size: cover;
filter: blur(2px); filter: blur(2px);
width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
width: 100%;
z-index: 1; z-index: 1;
background-image: url("../images/banner.jpg");
background-size: cover;
} }
@media (min-width: $desktopWidth) and (max-width: $lgDesktopWidth) { @media (min-width: $desktopWidth) and (max-width: $lgDesktopWidth) {
...@@ -104,3 +104,4 @@ ...@@ -104,3 +104,4 @@
font-size: rem(14); font-size: rem(14);
} }
} }
...@@ -11,15 +11,8 @@ ...@@ -11,15 +11,8 @@
} }
@mixin size($width, $height: $width) { @mixin size($width, $height: $width) {
width: $width;
height: $height; height: $height;
} width: $width;
@mixin placeholder {
::-webkit-input-placeholder {@content}
:-moz-placeholder {@content}
::-moz-placeholder {@content}
:-ms-input-placeholder {@content}
} }
// Burger parts // Burger parts
...@@ -33,13 +26,13 @@ ...@@ -33,13 +26,13 @@
$sass-burger-add-vendor-prefixes: true !default; $sass-burger-add-vendor-prefixes: true !default;
// Burger // Burger
@mixin burger($width: 30px, $height: 5px, $gutter: 3px, $color: #000, $border-radius: 0, $transition-duration: .3s) { @mixin burger($width: 30px, $height: 5px, $gutter: 3px, $color: #000, $border-radius: 0, $transition-duration: 0.3s) {
$burger-height: $height !global; $burger-height: $height !global;
$burger-gutter: $gutter !global; $burger-gutter: $gutter !global;
position: relative;
margin-top: $height + $gutter;
margin-bottom: $height + $gutter; margin-bottom: $height + $gutter;
margin-top: $height + $gutter;
position: relative;
@if $sass-burger-add-vendor-prefixes { @if $sass-burger-add-vendor-prefixes {
-webkit-user-select: none; -webkit-user-select: none;
...@@ -48,11 +41,16 @@ $sass-burger-add-vendor-prefixes: true !default; ...@@ -48,11 +41,16 @@ $sass-burger-add-vendor-prefixes: true !default;
} }
user-select: none; user-select: none;
&, &:before, &:after { &,
&::before,
&::after {
background-color: $color;
display: block; display: block;
width: $width;
height: $height; height: $height;
background-color: $color; transition-duration: $transition-duration;
transition-property: background-color, transform;
width: $width;
@if $border-radius != 0 { @if $border-radius != 0 {
border-radius: $border-radius; border-radius: $border-radius;
} }
...@@ -62,26 +60,25 @@ $sass-burger-add-vendor-prefixes: true !default; ...@@ -62,26 +60,25 @@ $sass-burger-add-vendor-prefixes: true !default;
-moz-transition-property: background-color, -moz-transform; -moz-transition-property: background-color, -moz-transform;
-o-transition-property: background-color, -o-transform; -o-transition-property: background-color, -o-transform;
} }
transition-property: background-color, transform;
@if $sass-burger-add-vendor-prefixes { @if $sass-burger-add-vendor-prefixes {
-webkit-transition-duration: $transition-duration; -webkit-transition-duration: $transition-duration;
-moz-transition-duration: $transition-duration; -moz-transition-duration: $transition-duration;
-o-transition-duration: $transition-duration; -o-transition-duration: $transition-duration;
} }
transition-duration: $transition-duration;
} }
&:before, &:after { &::before,
&::after {
content: '';
position: absolute; position: absolute;
content: "";
} }
&:before { &::before {
top: -($height + $gutter); top: -($height + $gutter);
} }
&:after { &::after {
top: $height + $gutter; top: $height + $gutter;
} }
} }
...@@ -89,13 +86,15 @@ $sass-burger-add-vendor-prefixes: true !default; ...@@ -89,13 +86,15 @@ $sass-burger-add-vendor-prefixes: true !default;
// Select parts of the burger // Select parts of the burger
@mixin burger-parts { @mixin burger-parts {
&, &:before, &:after { &,
&::before,
&::after {
@content; @content;
} }
} }
@mixin burger-top { @mixin burger-top {
&:before { &::before {
@content; @content;
} }
} }
...@@ -107,7 +106,7 @@ $sass-burger-add-vendor-prefixes: true !default; ...@@ -107,7 +106,7 @@ $sass-burger-add-vendor-prefixes: true !default;
} }
@mixin burger-bottom { @mixin burger-bottom {
&:after { &::after {
@content; @content;
} }
} }
...@@ -118,22 +117,27 @@ $sass-burger-add-vendor-prefixes: true !default; ...@@ -118,22 +117,27 @@ $sass-burger-add-vendor-prefixes: true !default;
& { & {
background-color: transparent; background-color: transparent;
} }
&:before {
&::before {
transform: translateY($burger-gutter + $burger-height) rotate(45deg);
@if $sass-burger-add-vendor-prefixes { @if $sass-burger-add-vendor-prefixes {
-webkit-transform: translateY($burger-gutter + $burger-height) rotate(45deg); -webkit-transform: translateY($burger-gutter + $burger-height) rotate(45deg);
-moz-transform: translateY($burger-gutter + $burger-height) rotate(45deg); -moz-transform: translateY($burger-gutter + $burger-height) rotate(45deg);
-ms-transform: translateY($burger-gutter + $burger-height) rotate(45deg); -ms-transform: translateY($burger-gutter + $burger-height) rotate(45deg);
-o-transform: translateY($burger-gutter + $burger-height) rotate(45deg); -o-transform: translateY($burger-gutter + $burger-height) rotate(45deg);
} }
transform: translateY($burger-gutter + $burger-height) rotate(45deg);
} }
&:after {
&::after {
transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg);
@if $sass-burger-add-vendor-prefixes { @if $sass-burger-add-vendor-prefixes {
-webkit-transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg); -webkit-transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg);
-moz-transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg); -moz-transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg);
-ms-transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg); -ms-transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg);
-o-transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg); -o-transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg);
} }
transform: translateY(-($burger-gutter + $burger-height)) rotate(-45deg);
} }
} }
.slider { .slider {
position: relative;
overflow: hidden; overflow: hidden;
position: relative;
} }
.slider__wrapper { .slider__wrapper {
...@@ -14,27 +14,27 @@ ...@@ -14,27 +14,27 @@
} }
.slider__control { .slider__control {
position: absolute;
top: 50%;
display: flex;
align-items: center; align-items: center;
justify-content: center; background: rgba(0, 0, 0, 0.5);
width: 40px;
color: #fff; color: #fff;
text-align: center; display: flex;
opacity: 0.5;
height: 50px; height: 50px;
justify-content: center;
opacity: 0.5;
position: absolute;
text-align: center;
top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
background: rgba(0, 0, 0, 0.5); width: 40px;
z-index: 10; z-index: 10;
} }
.slider__control:hover, .slider__control:hover,
.slider__control:focus { .slider__control:focus {
color: #fff; color: #fff;
text-decoration: none;
outline: 0;
opacity: 0.9; opacity: 0.9;
outline: 0;
text-decoration: none;
} }
.slider__control_left { .slider__control_left {
...@@ -46,12 +46,12 @@ ...@@ -46,12 +46,12 @@
} }
.slider__control::before { .slider__control::before {
content: "";
display: inline-block;
width: 20px;
height: 20px;
background: transparent no-repeat center center; background: transparent no-repeat center center;
background-size: 100% 100%; background-size: 100% 100%;
content: '';
display: inline-block;
height: 20px;
width: 20px;
} }
.slider__control_left::before { .slider__control_left::before {
...@@ -63,51 +63,52 @@ ...@@ -63,51 +63,52 @@
} }
.slider__item .card { .slider__item .card {
background: #fff;
border: 1px solid #d7d7d7;
border-radius: 5px;
box-sizing: border-box;
color: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 300px;
justify-content: flex-end; justify-content: flex-end;
padding: 0; padding: 0;
width: 100%;
height: 300px;
text-align: center;
background: #fff;
color: #fff;
border: 1px solid #d7d7d7;
border-radius: 5px;
position: relative; position: relative;
box-sizing: border-box; text-align: center;
width: 100%;
} }
.slider__item .card .card__body .card__image img,
.slider__item .card .card__body .card__image { .slider__item .card__image img,
z-index: 1; .slider__item .card__image {
border-radius: 5px;
height: 100%;
left: 0;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0;
width: 100%; width: 100%;
height: 100%; z-index: 1;
border-radius: 5px;
} }
.slider__item .card .card__body .card__overlay { .slider__item .card__overlay {
background: #000; background: #000;
opacity: 0.5; border-radius: 5px;
width: 100%;
height: 100%; height: 100%;
left: 0;
opacity: 0.5;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; width: 100%;
z-index: 2; z-index: 2;
border-radius: 5px;
} }
.slider__item .card .card__body { .slider__item .card__body {
padding: 0.5rem 1rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0.5rem 1rem;
} }
.slider__item .card .card__body .card__heading, .slider__item .card__heading,
.slider__item .card .card__body .card__text { .slider__item .card__text {
z-index: 3; z-index: 3;
} }
...@@ -119,39 +120,40 @@ a:focus, ...@@ -119,39 +120,40 @@ a:focus,
@media (min-width: $tableWidth) and (max-width: $smDesktopWidth) { @media (min-width: $tableWidth) and (max-width: $smDesktopWidth) {
.slider { .slider {
width: 100%;
max-width: $smDesktopWidth; max-width: $smDesktopWidth;
width: 100%;
} }
.slider__item { .slider__item {
width: calc(100% / 3);
max-width: calc(#{$smDesktopWidth} / 3);
flex: 0 0 calc(100% / 3); flex: 0 0 calc(100% / 3);
max-width: calc(#{$smDesktopWidth} / 3);
width: calc(100% / 3);
} }
} }
@media (min-width: $phoneWidth) and (max-width: $tableWidth) { @media (min-width: $phoneWidth) and (max-width: $tableWidth) {
.slider { .slider {
width: 100%;
max-width: $tableWidth; max-width: $tableWidth;
width: 100%;
} }
.slider__item { .slider__item {
width: calc(100% / 2);
max-width: calc(#{$tableWidth}/ 2);
flex: 0 0 calc(100% / 2); flex: 0 0 calc(100% / 2);
max-width: calc(#{$tableWidth}/ 2);
width: calc(100% / 2);
} }
} }
@media screen and (max-width: $phoneWidth) { @media screen and (max-width: $phoneWidth) {
.slider { .slider {
width: 100%;
max-width: $phoneWidth; max-width: $phoneWidth;
width: 100%;
} }
.slider__item { .slider__item {
width: 100%;
max-width: $phoneWidth;
flex: 0 0 100%; flex: 0 0 100%;
max-width: $phoneWidth;
width: 100%;
} }
} }
// Font // Font
$mainFont : 'Montserrat', Helvetica, Arial, sans-serif; $mainFont: 'Montserrat', Helvetica, Arial, sans-serif;
// Size // Size
$mainFontColor : #101010; $mainFontColor: #101010;
$mainFontSize : 18px; $mainFontSize: 18px;
$mainFontWeight : 400; $mainFontWeight: 400;
$mainLineHeight : 1.4; $mainLineHeight: 1.4;
$lgDesktopWidth : 1537px; $lgDesktopWidth: 1537px;
$desktopWidth : 1281px; $desktopWidth: 1281px;
$smDesktopWidth : 1025px; $smDesktopWidth: 1025px;
$tableWidth : 769px; $tableWidth: 769px;
$smTableWidth : 641px; $smTableWidth: 641px;
$phoneWidth : 481px; $phoneWidth: 481px;
$smPhoneWidth : 321px; $smPhoneWidth: 321px;
$desktopWidthNumber : 1280; $desktopWidthNumber: 1280;
$smDesktopWidthNumber : 1024; $smDesktopWidthNumber: 1024;
$tableWidthNumber : 768; $tableWidthNumber: 768;
$smTableWidthNumber : 640; $smTableWidthNumber: 640;
$phoneWidthNumber : 480; $phoneWidthNumber: 480;
$smPhoneWidthNumber : 320; $smPhoneWidthNumber: 320;
// Main color // Main color
$default-color : #ffffff; $default-color: #fff;
$primary-color : #444ce0; $primary-color: #444ce0;
$success-color : #26de81; $success-color: #26de81;
$danger-color : #fc5c65; $danger-color: #fc5c65;
$warning-color : #fed330; $warning-color: #fed330;
$light-color : #999999; $light-color: #999;
$purple-color : #8854d0; $purple-color: #8854d0;
// Neutral Color // Neutral Color
$neutral-primary : #303133; $neutral-primary: #303133;
$neutral-regular : #606266; $neutral-regular: #606266;
$neutral-secondary : #909399; $neutral-secondary: #909399;
$neutral-placeholder : #C0C4CC; $neutral-placeholder: #c0c4cc;
// Border Color // Border Color
$border-base : #DCDFE6; $border-base: #dcdfe6;
$border-light : #E4E7ED; $border-light: #e4e7ed;
$border-lighter : #EBEEF5; $border-lighter: #ebeef5;
$border-lightex : #F2F6FC; $border-lightex: #f2f6fc;
const path = require('path') const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin') const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const StylelintPlugin = require('stylelint-webpack-plugin')
module.exports = { module.exports = {
entry: { entry: {
...@@ -101,6 +102,7 @@ module.exports = { ...@@ -101,6 +102,7 @@ module.exports = {
plugins: [ plugins: [
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: '[name].css' filename: '[name].css'
}) }),
new StylelintPlugin()
] ]
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment