diff --git a/.prettierrc b/.prettierrc index 63b17e3..012b680 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,11 +1,11 @@ { "printWidth": 80, - "tabWidth": 2, + "tabWidth": 4, "useTabs": false, "semi": true, "singleQuote": true, "quoteProps": "as-needed", - "trailingComma": "all", + "trailingComma": "es5", "bracketSpacing": true, "endOfLine": "auto" } \ No newline at end of file diff --git a/03-lection1/01-button/button.css b/03-lection1/01-button/button.css index 0e0f4b8..b354e68 100644 --- a/03-lection1/01-button/button.css +++ b/03-lection1/01-button/button.css @@ -1,77 +1,83 @@ /* Стилизация кнопки */ -.button -{ - padding: 0; - box-sizing: border-box; - box-shadow: none; - outline: none; - border: none; - background: none; - width: 189px; - height: 48px; - cursor: pointer; - border-radius: 8px; - transition: opacity 200ms ease-in-out, background 200ms ease-in-out; - font-family: Roboto; - font-style: normal; - font-weight: 500; - font-size: 16px; - line-height: 19px; - text-align: center; - text-transform: none; - text-indent: 0px; - text-shadow: none; - +.button { + display: inline-flex; + justify-content: center; + align-items: center; + flex: 0 1 auto; + flex-basis: 189px; + padding: 0 15px; + /*box-sizing: border-box;*/ + box-shadow: none; + outline: none; + border: none; + background: none; + max-width: 189px; + height: 48px; + cursor: pointer; + border-radius: 8px; + transition: opacity 200ms ease-in-out, background 200ms ease-in-out; + font-family: Roboto; + font-style: normal; + font-weight: 500; + font-size: 16px; + line-height: 19px; + text-align: right; + text-transform: none; + text-indent: 0px; + text-shadow: none; } -.button_primary -{ - color: var(--white); - background-color: var(--primary); +.button_primary { + color: var(--white); + background-color: var(--primary); } -.button_primary:hover -{ - background-color: var(--primary-darken); +.button_primary:hover { + background-color: var(--primary-darken); } -.button_primary:disabled -{ - opacity: 0.5; - cursor: default; - pointer-events: none; +.button_primary:disabled { + opacity: 0.5; + cursor: default; + pointer-events: none; } -.button_secondary -{ - color: var(--white); - background-color: var(--secondary); +.button_secondary { + color: var(--white); + background-color: var(--secondary); } -.button_secondary:hover -{ - background-color: var(--secondary-darken); +.button_secondary:hover { + background-color: var(--secondary-darken); } -.button_secondary:disabled -{ - opacity: 0.5; - cursor: default; - pointer-events: none; +.button_secondary:disabled { + opacity: 0.5; + cursor: default; + pointer-events: none; } -.button_alternate -{ - color: var(--black); - border: 1px solid var(--grey-3); - +.button_alternate { + color: var(--black); + border: 1px solid var(--grey-3); } -.button_alternate:hover -{ - border: 1px solid var(--black); + +.button_alternate:hover { + border: 1px solid var(--black); } -.button_alternate:disabled +.button_alternate:disabled { + opacity: 0.5; + cursor: default; + pointer-events: none; +} + +.buttons { - opacity: 0.5; - cursor: default; - pointer-events: none; -} \ No newline at end of file + display: grid; + grid-template-columns: 1fr 2fr; + grid-template-rows: repeat(3 60px); + justify-content: center; + align-content: center; + gap: 10px 5px; + box-sizing: border-box; + margin: 0px; +} diff --git a/03-lection1/02-accordion/accordion.css b/03-lection1/02-accordion/accordion.css index b36a7f1..e2bb79d 100644 --- a/03-lection1/02-accordion/accordion.css +++ b/03-lection1/02-accordion/accordion.css @@ -1,20 +1,24 @@ /* Стилизация аккордеона */ - -.accordion::-webkit-details-marker { - display: none; +.accordion{ + display:flex; + flex-direction: column; + flex-wrap: nowrap; } - -.accordion { - display: block; +.accordion__summary { + display:flex; + flex-direction: row; + justify-content: space-between; + width: 100%; + } - .accordion__item { + display:block; border: 1px solid var(--grey-3); border-radius: 8px; box-sizing: border-box; padding: 32px; - width: 730px; + max-width: 730px; font-family: Inter; font-style: normal; @@ -27,4 +31,15 @@ .accordion__item:last-child { margin-bottom: 0; + } + + + .accordion__item[open] > .accordion__summary > .accordion__icon { + transform: rotate(-180deg); + } + .accordion__icon { + fill: none; + width: 20px; + height: 10px; + color: var(--black); } \ No newline at end of file diff --git a/03-lection1/02-accordion/index.html b/03-lection1/02-accordion/index.html index f646837..2faf3de 100644 --- a/03-lection1/02-accordion/index.html +++ b/03-lection1/02-accordion/index.html @@ -7,23 +7,30 @@ -
- - Accordion item 1 - -

- 1. Обратите внимание, что `summary` по-умолчанию имеет `display: inline`. Поменяйте, если это необходимо. - - 2. За стрелочку в `summary` отвечает псевдоэлемент `::-webkit-details-marker`. Так как пока что не изучали, как прибивать элементы к краям контейнера, то скрываем нативную так, а свою сделаем позже: -

-
-
- - Accordion item 2 - -

- В директории компонента лежат стили, картинки, которые использует только он, возможно, что-то еще, специфичное именно для него. -

-
+
+
+ + Accordion item 1 + + + + + +

+ Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit. Exercitation veniam consequat sunt nostrud amet. +

+
+
+ + Accordion item 2 + + + + +

+ Amet minim mollit non deserunt ullamco est sit aliqua dolor do amet sint. Velit officia consequat duis enim velit mollit. Exercitation veniam consequat sunt nostrud amet. +

+
+
diff --git a/04-lection2/01-histogram/histogram.css b/04-lection2/01-histogram/histogram.css index 27a172a..679cce0 100644 --- a/04-lection2/01-histogram/histogram.css +++ b/04-lection2/01-histogram/histogram.css @@ -37,6 +37,8 @@ width: 100%; overflow:hidden; align-items: flex-end; + animation: ani 0.6s ease-out; + transform-origin:bottom; } .histogram__column { flex: 1 1 auto; @@ -47,4 +49,19 @@ } .histogram__column:first-child { margin: 0; +} + +@keyframes ani { + 0% { + transform: scaleY(0); + + } + 50% { + transform: scaleY(0); + + } + 100% { + transform: scaleY(1); + + } } \ No newline at end of file diff --git a/04-lection2/02-skeleton/skeleton.css b/04-lection2/02-skeleton/skeleton.css index ad9b114..a42975a 100644 --- a/04-lection2/02-skeleton/skeleton.css +++ b/04-lection2/02-skeleton/skeleton.css @@ -5,6 +5,8 @@ margin:0px; border: 1px solid var(--grey-3); border-radius: 8px; + width: 100%; + overflow: hidden; } .skeleton__column { display: flex; @@ -31,26 +33,52 @@ height:20px; margin:5px; background: linear-gradient(to right, var(--grey-2) 0%, var(--grey-5) 33.33%, var(--grey-6)52.08%, var(--grey-7) 73.96%, var(--grey-2) 100% ); + background-size: 200%; + animation-name: go; + animation-iteration-count: infinite; + animation-duration: 1.5s; } + .skeleton__rectangle-mid { flex: 0 1 20px; max-width:calc(100% * 0.5); height:20px; margin:5px; background: linear-gradient(to right, var(--grey-2) 0%, var(--grey-5) 33.33%, var(--grey-6)52.08%, var(--grey-7) 73.96%, var(--grey-2) 100% ); + background-size: 200%; + animation-name: go; + animation-iteration-count: infinite; + animation-duration: 1.5s; } .skeleton__rectangle-big { flex: 0 1 20px; max-width: 100%; margin:5px; background: linear-gradient(to right, var(--grey-2) 0%, var(--grey-5) 33.33%, var(--grey-6)52.08%, var(--grey-7) 73.96%, var(--grey-2) 100% ); + background-size: 200%; + animation-name: go; + animation-iteration-count: infinite; + animation-duration: 1.5s; } .skeleton__circle { flex: 0 0 auto; flex-basis: 64px; height: 64px; border-radius: 32px; - background: var(--grey-2); + background: linear-gradient(to right, var(--grey-2) 0%, var(--grey-5) 33.33%, var(--grey-6)52.08%, var(--grey-7) 73.96%, var(--grey-2) 100% ); margin:5px; + background-size: 200%; + animation-name: go; + animation-iteration-count: infinite; + animation-duration: 1.5s; + } + + @keyframes go { + 0%{ + background-position:100%; + } + 100% { + background-position: -100%; + } } \ No newline at end of file diff --git a/05-lection3/01-tooltip/index.html b/05-lection3/01-tooltip/index.html index eeff33c..bcd7f4e 100644 --- a/05-lection3/01-tooltip/index.html +++ b/05-lection3/01-tooltip/index.html @@ -16,12 +16,16 @@ +
- -
- -
-
Helper Text
+ +
+ + + + +
Helper Text
+
diff --git a/05-lection3/01-tooltip/tooltip.css b/05-lection3/01-tooltip/tooltip.css index dc8b5fb..02196c1 100644 --- a/05-lection3/01-tooltip/tooltip.css +++ b/05-lection3/01-tooltip/tooltip.css @@ -1,23 +1,29 @@ .tooltip { - display: block; + display: inline-block; position:relative; + margin:70px 0px 30px 75px; } .tooltip__trigger { - + position:relative; + display: inline-block; + box-sizing:border-box; + padding-top: 0px; + width: 24px; + height: 24px; } .tooltip__help { - background-color: var(--blue); + background-color:var(--primary); box-shadow: 0px 2px 4px rgba(33, 36 41, 0.05); border-radius: 10px; width: 129px; padding: 13px 21px; position:absolute; - left: 50%; bottom:100%; - transform: translateX(-50%); + transform: translate(-50%, -5px); + left: 50%; font-family: Inter; font-style: normal; font-weight: 400; @@ -25,7 +31,9 @@ line-height: 24px; color: var(--grey-2); text-align: center; + pointer-events: none; display: none; + } .tooltip__help:before { content: ""; @@ -38,4 +46,11 @@ } .tooltip__trigger:hover ~ .tooltip__help { display: block; -} \ No newline at end of file + pointer-events: all; +} +.tooltip__icon { + fill: none; + width: 24px; + height: 24px; + color: var(--primary); +} diff --git a/05-lection3/02-modal/modal.css b/05-lection3/02-modal/modal.css index d310d84..557b8ce 100644 --- a/05-lection3/02-modal/modal.css +++ b/05-lection3/02-modal/modal.css @@ -29,6 +29,7 @@ right: 16px; top: 10px; cursor:pointer; + color:var(--modal-text); } @@ -42,12 +43,13 @@ height: 199; background-color:var(--white); border-radius: 8px; + box-sizing:border-box; } .modal__prompt { - color: var(--gray-4); + color: var(--modal-text); font-family: Inter; font-style: normal; font-weight: 400; diff --git a/05-lection3/03-calendar/calendar.css b/05-lection3/03-calendar/calendar.css index 1f9fafd..d6272e4 100644 --- a/05-lection3/03-calendar/calendar.css +++ b/05-lection3/03-calendar/calendar.css @@ -2,25 +2,28 @@ box-sizing: border-box; border: 1px solid var(--grey-3); border-radius: 8px; - padding: 28px; + padding: 12px; width: 100%; - max-width: 358px; + max-height:280px; + max-width: 265px; + margin:0; } .calendar__title { + display: block; font-weight: 600; - font-size: 20px; - line-height: 24px; + font-size: 16px; + line-height: 18px; color: var(--calendar); text-align: center; - margin-bottom: 20px; + margin: 0; } .calendar__item { display: flex; justify-content: center; align-items: center; font-size: 14px; - line-height: 20px; + line-height: 18px; color: var(--calendar); } diff --git a/07-lection5/01-checkbox/checkbox.css b/07-lection5/01-checkbox/checkbox.css index 56fbd26..d530d12 100644 --- a/07-lection5/01-checkbox/checkbox.css +++ b/07-lection5/01-checkbox/checkbox.css @@ -1,5 +1,6 @@ .checkbox { display: block; + margin:0; } .checkbox__input { @@ -25,6 +26,7 @@ border-radius: 4px; position: relative; cursor: pointer; + } .checkbox__input:checked ~ .checkbox__state .checkbox__control{ background: var(--blue); @@ -68,4 +70,20 @@ line-height: 24px; color: var(--grey-4); margin-left: 12px; - } \ No newline at end of file + } + + .checkbox .checkbox__input:checked ~ .checkbox__state .checkbox__control { + animation: pulse .5s; +} + +@keyframes pulse { + 0% { + box-shadow: 0 0 0 0 #bdc3c7; + } + 100% { + box-shadow: 0 0 0 1.5rem rgba(189, 195, 199, 0); + } +} + + + diff --git a/07-lection5/02-radio/radio.css b/07-lection5/02-radio/radio.css index d55eb33..ae81b2d 100644 --- a/07-lection5/02-radio/radio.css +++ b/07-lection5/02-radio/radio.css @@ -1,5 +1,6 @@ .radio { display: block; + margin:0; } .radio__input { @@ -68,4 +69,17 @@ line-height: 24px; color: var(--grey-4); margin-left: 12px; -} \ No newline at end of file +} + +.radio .radio__input:checked ~ .radio__state .radio__control { + animation: pulse .5s; +} + +@keyframes pulse { + 0% { + box-shadow: 0 0 0 0 #bdc3c7; + } + 100% { + box-shadow: 0 0 0 1.5rem rgba(189, 195, 199, 0); + } +} diff --git a/07-lection5/03-toggler/index.css b/07-lection5/03-toggler/index.css index 7ff525b..3205d10 100644 --- a/07-lection5/03-toggler/index.css +++ b/07-lection5/03-toggler/index.css @@ -24,5 +24,5 @@ p { line-height: 18px; letter-spacing: 0.04em; text-transform: uppercase; - color: #ACB5BD; + color: var(--black); } diff --git a/07-lection5/03-toggler/toggler.css b/07-lection5/03-toggler/toggler.css index 95ac794..41b904e 100644 --- a/07-lection5/03-toggler/toggler.css +++ b/07-lection5/03-toggler/toggler.css @@ -43,6 +43,7 @@ top: 1px; background: #DDE2E5; border-radius: 50%; + transition: all 0.5s ease; } .toggler__input:focus ~ .toggler__state .toggler__legend { @@ -64,9 +65,11 @@ } .toggler__input:checked ~ .toggler__state .toggler__control .toggler__round { - left: unset; + /*left: unset;*/ + left: 1.5rem; right: 1px; background: #FFFFFF; + transition: all 0.5s ease; } .toggler__input:disabled ~ .toggler__state .toggler__control { @@ -77,3 +80,17 @@ .toggler__input:disabled ~ .toggler__state .toggler__legend { color: #DDE2E5; } + +.toggler .toggler__input:checked ~ .toggler__state .toggler__control { + animation: pulse .5s; +} + +@keyframes pulse { + 0% { + box-shadow: 0 0 0 0 #bdc3c7; + } + 100% { + box-shadow: 0 0 0 1.5rem rgba(189, 195, 199, 0); + } +} + diff --git a/07-lection5/04-input/index.html b/07-lection5/04-input/index.html index bfa3a77..28b0c69 100644 --- a/07-lection5/04-input/index.html +++ b/07-lection5/04-input/index.html @@ -79,6 +79,6 @@ - + diff --git a/07-lection5/04-input/input.css b/07-lection5/04-input/input.css index 897da18..0503e53 100644 --- a/07-lection5/04-input/input.css +++ b/07-lection5/04-input/input.css @@ -1,13 +1,14 @@ .input { - display:inline-flex; + display:flex; flex-direction: column; align-items: start; box-sizing: border-box; } .input__control { - width: 350px; + width: 272px; height: 56px; + box-sizing: border-box; cursor: pointer; background: var(--white); border: 1px solid var(--grey-2); @@ -23,6 +24,12 @@ color: var(--grey-4); } +@media screen and (min-width:400px) { + .input__control { + width:350px; + + } +} .input__control::placeholder { color:var(--grey-2); } @@ -63,6 +70,7 @@ .input__state { position: relative; + display: flex; } .input__legend { @@ -73,14 +81,13 @@ font-size: 16px; line-height: 24px; color: var(--grey-4); - margin-left: 12px; } .input__icon-invalid, .input__icon-success { display: none; position: absolute; top: 50%; - right: 20px; + right: 12px; transform: translate(-50%, -50%); } diff --git a/09-lection7/01-burger-menu/burger-menu.css b/09-lection7/01-burger-menu/burger-menu.css index bfb1d81..6acf5cc 100644 --- a/09-lection7/01-burger-menu/burger-menu.css +++ b/09-lection7/01-burger-menu/burger-menu.css @@ -11,4 +11,4 @@ .burger-menu[data-open] { transform: translateZ(0); -} +} \ No newline at end of file diff --git a/09-lection7/01-burger-menu/index.html b/09-lection7/01-burger-menu/index.html index bd16c5c..b158388 100644 --- a/09-lection7/01-burger-menu/index.html +++ b/09-lection7/01-burger-menu/index.html @@ -1,21 +1,21 @@ - - - - - - - - - -
- -
- - + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/10-lection8/01-theme-changer/index.html b/10-lection8/01-theme-changer/index.html index b6cd1b6..c96b1e1 100644 --- a/10-lection8/01-theme-changer/index.html +++ b/10-lection8/01-theme-changer/index.html @@ -1,4 +1,3 @@ -
+ +

Reusable component library

-
-
-
Tooltip
-
-
-
Custom form elements
-
-
-
Calendar
-
-
-
Modal dialog
-
-
-
- +
+ -
-
-
Total orders
-
View all
-
-
-
50254
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Histogram
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
-
-
Avatar
-
-
+