Browse Source

added all folders

DimaBondarenko 2 years ago
commit
6ea8e2efeb
63 changed files with 6457 additions and 0 deletions
  1. 51 0
      HW1/src/index.html
  2. 57 0
      HW2.1/src/css/style.css
  3. 53 0
      HW2.1/src/index.html
  4. 349 0
      HW2.2/src/css/normalize.css/normalize.css
  5. 29 0
      HW2.2/src/css/style.css
  6. 22 0
      HW2.2/src/index.html
  7. 349 0
      HW3.1/src/css/normalize.css/normalize.css
  8. 90 0
      HW3.1/src/css/style.css
  9. 39 0
      HW3.1/src/index.html
  10. 349 0
      HWJS01/src/css/normalize.css/normalize.css
  11. 2 0
      HWJS01/src/css/style.min.css
  12. 9 0
      HWJS01/src/css/style.min.css.map
  13. 56 0
      HWJS01/src/index.html
  14. 106 0
      HWJS01/src/js/script.js
  15. 82 0
      HWJS01/src/sass/style.scss
  16. 349 0
      HWJS02/src/css/normalize.css/normalize.css
  17. 2 0
      HWJS02/src/css/style.min.css
  18. 9 0
      HWJS02/src/css/style.min.css.map
  19. 20 0
      HWJS02/src/index.html
  20. 152 0
      HWJS02/src/js/script.js
  21. 5 0
      HWJS02/src/sass/style.scss
  22. 349 0
      HWJS03/src/css/normalize.css/normalize.css
  23. 2 0
      HWJS03/src/css/style.min.css
  24. 9 0
      HWJS03/src/css/style.min.css.map
  25. 43 0
      HWJS03/src/index.html
  26. 185 0
      HWJS03/src/js/script.js
  27. 20 0
      HWJS03/src/sass/style.scss
  28. 349 0
      HWJS04/src/css/normalize.css/normalize.css
  29. 2 0
      HWJS04/src/css/style.min.css
  30. 9 0
      HWJS04/src/css/style.min.css.map
  31. 22 0
      HWJS04/src/index.html
  32. 308 0
      HWJS04/src/js/script.js
  33. 5 0
      HWJS04/src/sass/style.scss
  34. 349 0
      HWJS05/src/css/normalize.css/normalize.css
  35. 2 0
      HWJS05/src/css/style.min.css
  36. 9 0
      HWJS05/src/css/style.min.css.map
  37. 23 0
      HWJS05/src/index.html
  38. 282 0
      HWJS05/src/js/script.js
  39. 5 0
      HWJS05/src/sass/style.scss
  40. 349 0
      HWJS06/src/css/normalize.css/normalize.css
  41. 2 0
      HWJS06/src/css/style.min.css
  42. 9 0
      HWJS06/src/css/style.min.css.map
  43. 20 0
      HWJS06/src/index.html
  44. 135 0
      HWJS06/src/js/script.js
  45. 5 0
      HWJS06/src/sass/style.scss
  46. 349 0
      HWJS07/src/css/normalize.css/normalize.css
  47. 2 0
      HWJS07/src/css/style.min.css
  48. 9 0
      HWJS07/src/css/style.min.css.map
  49. 50 0
      HWJS07/src/index.html
  50. 202 0
      HWJS07/src/js/script.js
  51. 61 0
      HWJS07/src/sass/style.scss
  52. 349 0
      HWJS08/src/css/normalize.css/normalize.css
  53. 2 0
      HWJS08/src/css/style.min.css
  54. 9 0
      HWJS08/src/css/style.min.css.map
  55. 19 0
      HWJS08/src/index.html
  56. 243 0
      HWJS08/src/js/script.js
  57. 5 0
      HWJS08/src/sass/style.scss
  58. 349 0
      HWJS09/src/css/normalize.css/normalize.css
  59. 2 0
      HWJS09/src/css/style.min.css
  60. 9 0
      HWJS09/src/css/style.min.css.map
  61. 19 0
      HWJS09/src/index.html
  62. 100 0
      HWJS09/src/js/script.js
  63. 5 0
      HWJS09/src/sass/style.scss

File diff suppressed because it is too large
+ 51 - 0
HW1/src/index.html


File diff suppressed because it is too large
+ 57 - 0
HW2.1/src/css/style.css


+ 53 - 0
HW2.1/src/index.html

@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>A-level</title>
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <style>
+        blockquote{
+            color: blue;
+        }
+    </style>
+    <link rel="stylesheet" href="css/style.css">
+</head>
+<body>
+    <blockquote cite="http://developer.mozilla.org" style="color: red;">
+        This is a quotation taken from the Mozilla Developer Center.
+    </blockquote>
+
+    <div class="holder">
+        <h1>Title</h1>
+        <ul class="list">
+          <li>
+            <a href="#">link1</a>
+            <ul>
+              <li><a href="#">link2</a></li>
+              <li><a href="#">link3</a></li>
+            </ul>
+          </li>
+          <li><a href="https://www.youtube.com/">link4</a></li>
+          <li><a href="https://validator.w3.org/">link5</a></li>
+          <li><a href="#">link6</a></li>
+        </ul>
+        <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolore, accusamus.</p>
+        <h1>Title</h1>
+        <p>Lorem ipsum dolor sit amet.</p>
+    </div>
+
+    <div class="text-box">
+        <h3>Покрасьте меня в розовый цвет (color:pink).</h3>
+        <p>Данный элемент должен остаться неоформленным.</p>
+        <p id='greycol'>Покрасьте меня в серый цвет (color:grey).</p>
+        <div>Данный элемент должен остаться неоформленным.</div>
+        <div><p>Покрасьте меня в красный цвет (color:red).</p></div>
+        <h3>Данный элемент должен остаться неоформленным.</h3>
+        <p>Покрасьте меня в зеленый цвет (color:green).</p>
+        <p class='yellow'>Покрасьте меня в желтый цвет (color:yellow).</p>
+    </div>
+
+    <div class="bg-box"></div> 
+</body>
+</html>

+ 349 - 0
HW2.2/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 29 - 0
HW2.2/src/css/style.css

@@ -0,0 +1,29 @@
+*{
+    box-sizing: border-box;
+}
+
+.block{
+    width: 350px;
+    height: 220px;
+    padding: 15px 10px 20px;
+    margin-bottom: 30px;
+    border: 2px dashed red;
+    background-color: green;
+}
+
+.container{
+    width: 100%;
+}
+
+.image_html{
+    width: 35%;
+    float: left;
+    padding: 0 20px 10px 0;
+}
+
+.image_htmlcss{
+    width: 30%;
+    float: right;
+    padding: 20px 0 20px 20px;
+}
+

File diff suppressed because it is too large
+ 22 - 0
HW2.2/src/index.html


+ 349 - 0
HW3.1/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 90 - 0
HW3.1/src/css/style.css

@@ -0,0 +1,90 @@
+*{
+    box-sizing: border-box;
+}
+
+blockquote{
+    display: block;
+    text-align: center;
+    margin: 50px auto;
+    color: white;
+    font-size: 25px;
+}
+
+.cards{
+    width: 100%;
+    height: 600px;
+    padding: 50px;
+    background-color: #0d5825;
+    position: relative;
+}
+
+img{
+    width: 150px;
+    position: absolute;
+    left: 50%;
+    /* transform: translateX(-50%); */
+}
+
+.first{
+    transform: translate(-85%, -3%) rotate(-21deg);
+}
+
+.second{
+    transform: translateX(-50%) rotate(-7deg);
+}
+.third{
+    transform: translate(-15%, 7%) rotate(7deg);
+}
+.menu{
+    position: relative;
+}
+nav{
+    position: absolute;
+    padding-top: 50px;
+    width: 25%;
+    height: 100vh;
+    background-color: grey;
+    left: -22%;
+    transition: left 1s ease-out;
+}
+
+.menu_btn{
+    position: absolute;
+    font-size: 20px;
+    top: 50%;
+    right: 0px;
+    transform: translate(40px, -50%) rotate(90deg);
+    letter-spacing: 5px;
+}
+
+nav:hover{
+    left: 0;
+}
+
+nav:hover .menu_btn{
+    z-index: -100;
+}
+ul{
+    list-style-type: none;
+}
+
+li{
+    padding-bottom: 20px;
+    padding-left: 25px;
+    font-size: 20px;
+}
+
+li:hover{
+    color:rgb(177, 177, 66)
+}
+
+li::before{
+    content: '';
+    position: absolute;
+    left: 30px;
+    width: 16px;
+    height: 16px;
+    background-color: rgb(177, 177, 66);
+    border: 2px solid black;
+    transform: rotate(45deg) skew(5deg, 5deg);
+}

+ 39 - 0
HW3.1/src/index.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.css">
+
+    <title>A-level</title>
+</head>
+<body>
+    <div class="cards">
+        <blockquote>
+            <p>"Судьба тасует карты, а мы ими играем."</p>
+            <cite>Артур Шопенгауэр</cite>
+        </blockquote>
+        <img class="first" src="https://raw.githubusercontent.com/0lgamaslova/Alevel-Markup/master/images/card01.png" alt="1">
+        <img class="second" src="https://raw.githubusercontent.com/0lgamaslova/Alevel-Markup/master/images/card01.png" alt="2">
+        <img class="third" src="https://raw.githubusercontent.com/0lgamaslova/Alevel-Markup/master/images/card01.png" alt="3">
+    </div>
+
+    <div class="menu">
+        <nav>
+            <ul>
+                <li>HOME</li>
+                <li>CONTACTS</li>
+                <li>OUR TEAM</li>
+                <li>ABOUT</li>
+                <li>NEWS</li>
+            </ul>
+
+            <div class="menu_btn">Menu here</div>
+        </nav>
+    </div>
+</body>
+</html>

+ 349 - 0
HWJS01/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

File diff suppressed because it is too large
+ 2 - 0
HWJS01/src/css/style.min.css


File diff suppressed because it is too large
+ 9 - 0
HWJS01/src/css/style.min.css.map


+ 56 - 0
HWJS01/src/index.html

@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title>A-level</title>
+</head>
+<body>
+    
+    <section class="calc">
+        <form class="form">
+            <input class="kwatt" type="text" placeholder="Кв*ч за Месяц">
+            <select>
+                <option value="0">Январь</option>
+                <option value="1">Февраль</option>
+                <option value="2">Март</option>
+                <option value="3">Апрель</option>
+                <option value="4">Май</option>
+                <option value="5">Июнь</option>
+                <option value="6">Июль</option>
+                <option value="7">Август</option>
+                <option value="8">Сентябрь</option>
+                <option value="9">Октябрь</option>
+                <option value="10">Ноябрь</option>
+                <option value="11">Декабрь</option>
+            </select>
+            <input class="year" type="text" value="2021" placeholder="Год">
+            <button class="btn">Узнать траты за электричество</button>
+        </form>
+        <div class="report">
+            <div></div>
+            <button class="btn-close">Close</button>
+        </div>
+    </section>
+
+    <section class="login">
+        <form class="form-login">
+            <input class="input-login" type="text" placeholder="login">
+            <input class="input-password" type="text" placeholder="password">
+            <button class="btn-login">login</button>
+        </form>
+        <div class="message">
+            <div></div>
+            <button class="close-btn">Close</button>
+        </div>
+    </section>
+
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 106 - 0
HWJS01/src/js/script.js

@@ -0,0 +1,106 @@
+///for calc
+const priceUpTo250 = 1.44;
+const priceAbove250 = 1.68;
+const inputKwattInMonth = document.querySelector('.kwatt');
+const inputYear = document.querySelector('.year');
+const select = document.querySelector('select');
+const form = document.querySelector('.form');
+const report = document.querySelector('.report');
+const closeBtn = document.querySelector('.btn-close');
+
+//for login
+const formLogin = document.querySelector('.form-login');
+const inputLogin = document.querySelector('.input-login');
+const inputPassword = document.querySelector('.input-password');
+const messageResult = document.querySelector('.message');
+const close = document.querySelector('.close-btn');
+
+
+/////////////////////////
+
+const calc = function(){
+
+    function daysInMonth(year, month){                                      //days in selected month
+        return 33 - new Date(year, month, 33).getDate();
+    }
+
+    function costMonth (value){                                             // money in selected month (2 rate)
+        if (value>250){
+            return 250 * 1.44 + (value - 250) * 1.68
+        } else{
+            return value * 1.44
+        }
+    }
+
+    function showReport (days, cost){
+        let costForDay = (cost / days).toFixed(2);
+        report.querySelector('div').innerHTML = `В текущем месяце вы потратили ${cost} грн. <br>В день ${costForDay} грн.`;
+        report.style.display = 'block'
+    }
+
+    form.addEventListener("submit", (e) => {
+        e.preventDefault();
+        let currYear = inputYear.value;
+        let currMonth = select.value;
+        let days = daysInMonth(currYear, currMonth);
+        
+        let cost = costMonth(inputKwattInMonth.value).toFixed(2);
+        showReport(days, cost);
+    })
+
+    closeBtn.addEventListener("click", (e) => {
+        e.preventDefault();
+        report.style.display = 'none';
+    })
+}
+
+/////////////////////////////////////
+
+const login = function(){
+
+    const credentials = {
+        login: 'admin',
+        password: 'qwerty',
+    };
+
+    function success (){
+        messageResult.style.display = 'block';
+        messageResult.style.backgroundColor = 'green';
+        messageResult.querySelector('div').innerHTML = 'success';
+        messageResult.querySelector('button').style.backgroundColor = 'green'
+    }
+
+    function loginError(){
+        messageResult.style.display = 'block';
+        messageResult.style.backgroundColor = 'red';
+        messageResult.querySelector('div').innerHTML = 'Error';
+        messageResult.querySelector('button').style.backgroundColor = 'red'
+    }
+
+    formLogin.addEventListener("submit", (e) => {
+        e.preventDefault();
+        let loginValue = inputLogin.value.trim();
+        let passwordValue = inputPassword.value.trim();
+        if (loginValue === credentials.login){
+            if (passwordValue === credentials.password){
+                success();
+            } else {
+                loginError();
+            }
+        } else {
+            loginError();
+        }
+    })
+
+    close.addEventListener("click", (e) => {
+        e.preventDefault();
+        messageResult.style.display = 'none';
+    })
+    
+}
+
+
+calc();
+login();
+
+

+ 82 - 0
HWJS01/src/sass/style.scss

@@ -0,0 +1,82 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+
+section.calc{
+    position: relative;
+    padding: 100px;
+    .form{
+        width: 400px;
+        padding: 50px 30px;
+        margin: 0 auto;
+        background-color: rgb(240, 240, 240);
+        border-radius: 4px;
+        box-shadow: 0px 0.5px 30px 1px rgba(0, 0, 0, .4);
+        input, select{
+            margin-bottom: 20px;
+            width: 100%;
+        }
+    }
+    
+    .report{
+        display: none;
+        position: fixed;
+        top: 100px;
+        left: 50%;
+        transform: translateX(-50%);
+        width: 400px;
+        padding: 50px 30px;
+        margin: 0 auto;
+        background-color: rgb(212, 212, 212);
+        border-radius: 4px;
+        box-shadow: 0px 0.5px 30px 1px rgba(0, 0, 0, .4);
+        button{
+            margin-top: 50px;
+        }
+    }
+
+}
+
+section.login{
+    position: relative;
+    padding: 100px;
+    .form-login{
+        width: 400px;
+        padding: 50px 30px;
+        margin: 0 auto;
+        background-color: rgb(240, 240, 240);
+        border-radius: 4px;
+        box-shadow: 0px 0.5px 30px 1px rgba(0, 0, 0, .4);
+        input{
+            margin-bottom: 20px;
+            width: 100%;
+        }
+        button{
+            display: block;
+        }
+    }
+
+    .message{
+        display: none;
+        position: absolute;
+        top: 100px;
+        left: 50%;
+        transform: translateX(-50%);
+        width: 400px;
+        padding: 50px 30px;
+        margin: 0 auto;
+        border-radius: 4px;
+        div{
+            text-align: center;
+            font-size: 30px;
+        }
+        button{
+            display: block;
+            margin: 0 auto;
+            margin-top: 50px;
+            width: 100px;
+            background-color: rgb(0, 146, 0);
+        }
+    }
+}

+ 349 - 0
HWJS02/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 2 - 0
HWJS02/src/css/style.min.css

@@ -0,0 +1,2 @@
+*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}
+/*# sourceMappingURL=style.min.css.map */

+ 9 - 0
HWJS02/src/css/style.min.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAAA,AAAA,CAAC,AAAA,CACG,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,CAAC,CACZ",
+    "sources": [
+        "../sass/style.scss"
+    ],
+    "names": [],
+    "file": "style.min.css"
+}

+ 20 - 0
HWJS02/src/index.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title>A-level</title>
+</head>
+<body>
+    
+    
+
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 152 - 0
HWJS02/src/js/script.js

@@ -0,0 +1,152 @@
+//////////////////////////////////////////// Number: age
+// let year = new Date().getFullYear();
+// let age = +prompt("Сколько тебе лет?");
+// if (confirm('в этом году был уже др?')){
+//     alert(`Твой год рождения ${year - age}`)
+// } else {
+//     alert(`Твой год рождения ${year - age - 1}`)
+// }
+
+
+/////////////////////////////////////Number: temperature
+
+// alert (`это ${+prompt("Какая температура?, С") * 9 / 5 + 32} F`);
+
+
+/////////////////////////////////Number: divide
+
+// let x = prompt("Введите первое число");
+// let y = prompt("Введите второе число");
+// if(x/y > 0){
+//     alert(Math.floor(x/y));
+// } else {
+//     alert( -Math.ceil(x/y));
+// }
+
+
+/////////////////////////Number: odd
+// let number = +prompt("Введите число");
+// if(number % 2 === 0){
+//     alert('Число четное');
+// } else {
+//     alert('Число нечетное');
+// }
+
+/////////////////////////String: greeting
+// alert(`привет ${prompt('Как тебя зовут?')}`);
+
+
+/////////////////////////////////String: lexics
+// let result = prompt("что проверить?").indexOf("error");
+// if (result >= 0){
+//     alert('Нашел');
+// } else {
+//     alert('Не нашел')
+// }
+
+/////Boolean
+// let isStudent = confirm('Ты студент?');
+
+///////////////////////////////////////Boolean: if
+// if (confirm('Вы мужчина?????')){
+//     alert('вы мужчина');
+// } else {
+//     alert('вы женщина');
+// }
+
+
+////////////////////////////////////////Array: plus
+let arr = [1, 2, 3, 4, 5, 6, 7];
+
+arr[arr.length] = arr.reduce((a, b) => a + b);
+////////or
+let lastElem = 0
+arr.forEach((item) => {
+    lastElem += item
+})
+arr[arr.length] = lastElem;
+
+
+/////////////////////////////////////////////////////
+// var age = +prompt("Сколько вам лет?","");
+// console.log(age)
+// if(age <= 0){
+//     alert("ты еще не родился")
+// }
+// else{
+//     if (age < 18){
+//         alert("школьник");
+//     }
+//     else{
+//         if (age < 30){
+//             alert("молодеж");
+//         }
+//         else{ 
+//             if (age < 45){
+//                 alert("зрелость");
+//             }
+//             else{ 
+//                 if (age < 60){
+//                     alert("закат");
+//                 }
+//                 else{
+//                     if (age > 60){
+//                         alert("как пенсия?");
+//                     }
+//                     else {
+//                         alert("то ли киборг, то ли ошибка"); 
+//                     }
+//                 }
+//             }
+//         }
+//     }
+// }    
+
+///////////////////////////////////////////////////Comparison: sizes
+// let waist = prompt('Обхват талии, см');
+
+// if (waist < 63){
+//     alert('больше кушай');
+// }else if(waist < 65){
+//         alert('XXS');
+//     }else if(waist < 69){
+//             alert('XS');
+//         }else if(waist < 74){
+//                 alert('S');
+//             }else if(waist < 78){
+//                     alert('M');
+//                 }else if(waist < 83){
+//                         alert('L');
+//                     }else if(waist < 89){
+//                             alert('XL');
+//                         }else if(waist < 94){
+//                                 alert('XXL');
+//                             }else if(waist < 97){
+//                                     alert('XXXL')
+//                                 } else {
+//                                     alert('нужно подумать')
+//                                 }
+
+
+///////////////////////////////////Ternary
+// confirm('Вы мужчина?????') ? alert('вы мужчина') : alert('вы женщина')
+
+
+/////////////////////////////////////////Синий пояс Number: flats
+// let numberFlat = prompt('Номер вашей квартиры');
+// let floors = 9;
+// let sumOnFloor = 4;
+
+// let enteranceNumber = Math.ceil(numberFlat/(floors*sumOnFloor));
+// if (numberFlat%(floors*sumOnFloor) === 0){
+//     alert(`Ваша квартира в ${enteranceNumber} подъезде, на ${floors} этаже`);
+// } else {
+//     let numberFloor = Math.ceil( (numberFlat%(floors*sumOnFloor)) / sumOnFloor);
+//     alert(`Ваша квартира в ${enteranceNumber} подъезде, на ${numberFloor} этаже`);
+// }
+
+
+
+
+
+

+ 5 - 0
HWJS02/src/sass/style.scss

@@ -0,0 +1,5 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+

+ 349 - 0
HWJS03/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 2 - 0
HWJS03/src/css/style.min.css

@@ -0,0 +1,2 @@
+*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}section.currency{position:relative;padding:100px}section.currency .form{width:400px;padding:50px 30px;margin:0 auto;background-color:#f0f0f0;border-radius:4px;-webkit-box-shadow:0px 0.5px 30px 1px rgba(0,0,0,0.4);box-shadow:0px 0.5px 30px 1px rgba(0,0,0,0.4)}section.currency .form input,section.currency .form select{margin-bottom:20px;width:100%}
+/*# sourceMappingURL=style.min.css.map */

File diff suppressed because it is too large
+ 9 - 0
HWJS03/src/css/style.min.css.map


+ 43 - 0
HWJS03/src/index.html

@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title>A-level</title>
+</head>
+<body>
+    
+    <section class="currency">
+        <form class="form">
+            <select class="sell">
+                <option>Я хочу продать</option>
+                <option value="RUB">RUB</option>
+                <option value="EUR">EUR</option>
+                <option value="USD">USD</option>
+                <option value="UAH">UAH</option>
+            </select>
+
+            <input class="sum" placeholder="сумма">
+
+            <select class="buy">
+                <option>Я хочу купить</option>
+                <option value="RUB">RUB</option>
+                <option value="EUR">EUR</option>
+                <option value="USD">USD</option>
+                <option value="UAH">UAH</option>
+            </select>
+            
+            <button class="btn-change">Обменять</button>
+
+        </form>
+    </section>
+
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 185 - 0
HWJS03/src/js/script.js

@@ -0,0 +1,185 @@
+/////////////////////////////////////////switch: sizes
+
+// let size = prompt('Размер ноги, UK');
+
+// switch (size){
+//     case "6" : alert('RU: 38,5');
+//         break;
+//     case "7" : alert('RU : 40');
+//         break;
+//     case "8" : alert('Ru : 41');
+//         break;
+//     case "9" : alert('Ru : 42');
+//         break;
+//     case "10": alert('Ru : 43');
+// }
+
+/////////////////////////////////////switch: if
+
+// let color = prompt("Введите цвет","");
+
+// if (color === "red"){
+//     document.write("<div style='background-color: red;'>красный</div>");
+//     document.write("<div style='background-color: black; color: white;'>черный</div>");
+// } else if (color === 'black'){
+//     document.write("<div style='background-color: black; color: white;'>черный</div>");
+// } else if (color === 'blue'){
+//     document.write("<div style='background-color: blue;'>синий</div>");
+//     document.write("<div style='background-color: green;'>зеленый</div>");
+// } else if (color === 'green'){
+//     document.write("<div style='background-color: green;'>зеленый</div>");
+// } else {
+//     document.write("<div style='background-color: gray;'>Я не понял</div>");
+// }
+
+
+////////////////////////prompt: or
+
+
+// let year = new Date().getFullYear();
+// let age = +prompt("Сколько тебе лет?");
+// if (age === null || age == false){
+//     alert('вводи нормально!')
+// } else {
+//     if (confirm('в этом году был уже др?')){
+//         alert(`Твой год рождения ${year - age}`)
+//     } else {
+//         alert(`Твой год рождения ${year - age - 1}`)
+//     }
+// }
+
+///////////////////////triple prompt and default: or
+
+// let surname = prompt('Фамилия') || 'Иванов';
+// let name = prompt('Имя') || 'Иван';
+// let patronymic = prompt('Отчество') || 'Иваныч';
+// alert(`Тебя зовут ${surname} ${name} ${patronymic}`);
+
+/////////////////login and password
+
+// let userLogin = 'admin';
+// let userPassword = 'qwerty';
+// let login = prompt('Введите логин').trim();
+// if(login === userLogin){
+//     let password = prompt('Введите пароль').trim();
+//     if(password === userPassword){
+//         alert('УРа')
+//     } else {
+//         alert('Ошибка');
+//     }
+// } else {
+//     alert('Ошибка');
+// }
+
+/////////////////////////////////////////currency calc
+
+// let currency = prompt('currency').toLowerCase();
+
+// switch (currency){
+//     case "usd" : let usd = (+prompt('Сколько грн у вас')) / 27; alert(usd.toFixed(2));
+//     break;
+//     case "eur" : let eur = (+prompt('Сколько грн у вас')) / 32; alert(eur.toFixed(2));
+// }
+
+////////////////////////////currency calc: two rates
+
+// let currency = prompt('currency').toLowerCase();
+
+// switch (currency){
+//     case "usd" : let usd = confirm('продажа') ? (+prompt('Сколько грн у вас')) / 27 : (+prompt('Сколько usd у вас')) * 26; alert(usd.toFixed(2));
+//     break;
+//     case "eur" : let eur = confirm('продажа') ? (+prompt('Сколько грн у вас')) / 33 : (+prompt('Сколько eur у вас')) * 32; alert(eur.toFixed(2));
+
+// }
+
+/////////////////////////////////scissors
+
+// let userChoice = prompt('Ваш выбор');
+// let compChoice = Math.random().toFixed(2);
+// if (compChoice <= 0.33){
+//     compChoice = 'камень';
+// } else if (compChoice <= 0.66){
+//     compChoice = 'ножницы';
+// } else {
+//     compChoice = 'бумага'
+// }
+
+// if (userChoice === compChoice){
+//     alert('Ничья');
+// } else if (userChoice === 'камень'){
+//         if (compChoice === 'ножницы'){
+//             alert('Победил юзер');
+//         } else {
+//             alert('Победил комп');
+//         }
+// } else if (userChoice === 'ножницы'){
+//         if (compChoice === 'бумага'){
+//             alert('Победил юзер');
+//         } else {
+//             alert('Победил комп');
+//         }
+// } else if (userChoice === 'бумага'){
+//         if (compChoice === 'камень'){
+//             alert('Победил юзер');
+//         } else {
+//             alert('Победил комп');
+//         }
+// }
+
+///////////////////////////////////////////////////////////////////////////////// 
+const form = document.querySelector('form');
+const inputSell = document.querySelector('.sell');
+const inputBuy = document.querySelector('.buy');
+const inputSum = document.querySelector('.sum');
+
+
+function changeCurrency(currencylist){
+    let rate = currencylist[inputBuy.value];
+    alert(`Вы получаете ${Math.round(inputSum.value * rate)}`)
+}
+
+// async function getExchangeRates(){                                                      ///через async await как еще один вариант
+//     let res = await fetch(`https://open.er-api.com/v6/latest/${inputSell.value}`);
+//     let data = await res.json();
+//     changeCurrency(data.rates);
+// }
+
+form.addEventListener("submit", (e) => {
+    e.preventDefault();
+
+    fetch(`https://open.er-api.com/v6/latest/${inputSell.value}`)
+    .then(res => res.json())
+    .then(data => {
+        changeCurrency(data.rates)
+    })
+
+    
+    // getExchangeRates()
+});
+
+
+////////////////////////////////////////////////////Задание на черный пояс
+
+
+// let userChoice = prompt('Ваш выбор');
+// let compChoice = Math.random().toFixed(2);
+
+
+// сравниваем выбор юзера и выбор компа на равенство если равны но "ничья" сворачиваемся
+// если не ничья то идем дальше и заходим туда где условие по юзеру тру
+// уже знаем что ничьи не может быть проверяем второе и тертье  значение 
+// если тру то "ура" если фолс то методом исключения вы проиграли 
+
+(userChoice === ((compChoice <= 0.33) && ('камень') || (compChoice <= 0.66) && ('ножницы') || ('бумага'))  )  && !(alert('Ничья'))  
+||
+(userChoice ==='камень')  &&  (((compChoice <= 0.33) && ('камень') || (compChoice <= 0.66) && ('ножницы') || ('бумага')) === 'ножницы') &&  !(alert('Победил юзер'))
+||
+(userChoice ==='ножницы')  &&  (((compChoice <= 0.33) && ('камень') || (compChoice <= 0.66) && ('ножницы') || ('бумага')) === 'бумага')  &&  !(alert('Победил юзер'))    
+||
+(userChoice === 'бумага')  &&  (((compChoice <= 0.33) && ('камень') || (compChoice <= 0.66) && ('ножницы') || ('бумага')) === 'камень')  &&  !(alert('Победил юзер')) 
+|| 
+(alert('Победил комп'));
+
+
+
+

+ 20 - 0
HWJS03/src/sass/style.scss

@@ -0,0 +1,20 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+section.currency{
+    position: relative;
+    padding: 100px;
+    .form{
+        width: 400px;
+        padding: 50px 30px;
+        margin: 0 auto;
+        background-color: rgb(240, 240, 240);
+        border-radius: 4px;
+        box-shadow: 0px 0.5px 30px 1px rgba(0, 0, 0, .4);
+        input, select{
+            margin-bottom: 20px;
+            width: 100%;
+        }
+    }
+}

+ 349 - 0
HWJS04/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 2 - 0
HWJS04/src/css/style.min.css

@@ -0,0 +1,2 @@
+*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}
+/*# sourceMappingURL=style.min.css.map */

+ 9 - 0
HWJS04/src/css/style.min.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAAA,AAAA,CAAC,AAAA,CACG,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,CAAC,CACZ",
+    "sources": [
+        "../sass/style.scss"
+    ],
+    "names": [],
+    "file": "style.min.css"
+}

+ 22 - 0
HWJS04/src/index.html

@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title>A-level</title>
+</head>
+<body>
+    <form>
+        <input type="number">
+        <button>click</button>
+    </form>
+    
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 308 - 0
HWJS04/src/js/script.js

@@ -0,0 +1,308 @@
+////////////////////html tree
+
+let body = {
+    tagName : 'body',
+    subTags : [
+        {
+            tagName : 'div',
+            subTags : [
+                {
+                    tagName : 'span',
+                    text : 'Enter a data please:'
+                },
+                {
+                    tagName : 'br'
+                },
+                {
+                    tagName : 'input',
+                    attrs : {
+                        type : 'text',
+                        id : 'name'
+                    }
+                },
+                {
+                    tagName : 'input',
+                    attrs : {
+                        type : 'text',
+                        id : 'surname'
+                    }
+                }
+            ]
+        },
+        {
+            tagName : 'div',
+            subTags : [
+                {
+                    tagName : 'button',
+                    attrs : {
+                        id : 'ok'
+                    },
+                    text : 'OK'
+                },
+                {
+                    tagName : 'button',
+                    attrs : {
+                        id : 'cancel'
+                    },
+                    text : 'Cancel'
+                }
+            ]
+        }
+    ]
+}
+console.log(body.subTags[1].subTags[1].text); //Выведите значения текста во второй кнопке
+console.log(body.subTags[0].subTags[3].attrs.id) //Выведите значение атрибута id во втором input
+
+////////////////////////////////////////////////////////declarative fields
+
+// let notebook = {
+//     brand: prompt('Enter a brand'),
+//     type:  prompt('Enter a type'),
+//     model: prompt('Enter a model'),
+//     ram: +prompt('Enter a ram'),
+//     size: +prompt('Enter a size'),
+//     weight: +prompt('Enter a weight'),
+//     resolution: {
+//         width: +prompt('Enter a width'),
+//         height: +prompt('Enter a height'),
+//     },
+// };
+
+// let phone = {
+//     brand: prompt('Enter a brand'),
+//     model: prompt('Enter a model'),
+//     ram: +prompt('Enter a ram'),
+//     color: prompt('Enter a color'),
+// };
+
+// let person = {
+//     name: prompt('Enter a name'),
+//     surname: prompt('Enter a surname'),
+//     married: confirm('married?'),
+// };
+
+
+///////////////////////////////////////////////////////
+
+
+
+var notebook = {
+    brand: "HP",
+    type:  "440 G4",
+    model: "Y7Z75EA",
+    ram: 4,
+    size: "14",
+    weight: 1.8,
+    resolution: {
+        width: 1920,
+        height: 1080,
+    },
+};
+
+var phone = {
+    brand: "meizu",
+    model: "m2",
+    ram: 2,
+    color: "black",
+};
+
+var person = {
+    name: "Donald",
+    surname: "Trump",
+    married: true,
+    smartphone: phone,
+    laptop: notebook
+};
+
+// notebook.owner = person;
+// phone.owner = person;
+// or 
+notebook["owner"] = person;
+phone["owner"] = person;
+
+///////////////////////////////////////imperative array fill 3
+// let arr = [];
+// arr[0] = prompt('первый');
+// arr[1] = prompt('второй');
+// arr[2] = prompt('третий');
+
+///////////////////////////////////////////////while confirm
+
+// let i;
+// while(!i){
+//     i = confirm("Вам есть 18?");
+// }
+
+/////////////////////////////////////////array fill
+
+// let array = [];
+// let i = true;
+// while(i){
+//     i = prompt('enter something');
+//     if(i){
+//         array.push(i)
+//     }
+// }
+
+/////////////////////////////////////////////array fill nopush
+// let array = [];
+// let i = true;
+// while(i){
+//     i = prompt('enter something');
+//     if(i){
+//         array[array.length] = i;
+//     }
+// }
+
+/////////////////////////////////////////////////////infinite probability
+// for (let i = 1;; i++){
+//     let num = Math.random();
+//     if (num>0.9){
+//         alert(i);
+//         break;
+//     }
+// }
+
+//////////////////////////////////////empty loop
+// for (let i; i == null; i = prompt('Вам есть 18?')){
+  
+// }
+
+/////////////////////////////////chess one line
+
+// function showOneLine(leng){
+//     let str ='';
+//     for (let i = 0; i < leng; i++){
+//         if (i%2 === 0){
+//             str += ' '
+//         } else {
+//             str += '#'
+//         }
+//     }
+
+//     console.log(str)
+// }
+// showOneLine(23)            
+
+
+/////////////////////////////numbers
+// function showNumbers (qt){
+//     let num = '';
+//     for(let i = 0; i < qt; i++){
+//         for(let j = 0; j < qt; j++){
+//             num += `${j}`;
+//         }
+//         num += '\n';
+//     }
+//     console.log(num);
+// }
+
+// showNumbers(10)
+
+///////////////////////////////chess
+
+// function showChess(x, y){
+//     let str = '';
+//     for (let i = 0; i < y; i++){
+//         if(i%2 === 0){
+//             for(let j = 0; j < x; j++){
+//                 if (j%2 === 0){
+//                     str += '.'
+//                 } else {
+//                     str += '#'
+//                 }
+//             }
+//         } else {
+//             for(let j = 0; j < x; j++){
+//                 if(j%2 === 0){
+//                     str += '#'
+//                 } else {
+//                     str += '.'
+//                 }
+//             }
+//         }
+//         str += '\n'
+//     }
+//     console.log(str)
+// }
+
+// showChess(12, 8)
+
+////////////////////////////////////////////////////cubes
+
+// function showCubesIndex(leng){
+//     let arr = [];
+//     for(let i = 0; i < leng; i++){
+//         arr.push(i**3)
+//     }
+//     console.log(arr)
+// }
+
+// showCubesIndex(20)
+
+//////////////////////////////////multiply table
+// let arr = [];
+// function showMultTable (leng){
+    
+//     for (let i = 0; i < leng; i++){
+//         arr.push([])
+//         for(let j = 0; j < leng; j++){
+//             arr[i].push(i * j)
+//         }
+//     }
+    
+// }
+// showMultTable(100)
+
+/////////////////////////////////////////Задание на синий пояс: Треугольник
+
+// function showTriangle(base){
+//     if(base%2 !== 0){
+//         let str = '';
+//         let size = 1
+//         let height = Math.floor(base/2) + 1;
+//         for(let i = 0; i < height; i++){
+//             let a = (base-size)/2
+//             for(let j = 0; j < base; j++){
+//                 if(j < a || j >= (a+size)){
+//                     str += '.'
+//                 } else {
+//                     str += '#'
+//                 }
+//             }
+//             str += '\n';
+//             size += 2
+//         }
+//         console.log(str)
+//     } else {
+//         console.log('нечетное давай!')
+//     }
+    
+// }
+
+// showTriangle(34);  
+
+
+////////////////////////////////////////////////////Задание на черный пояс: Электронная гадалка
+const input = document.querySelector('input');
+const form = document.querySelector('form');
+
+let history = [0,0,0,0]
+let predictArray = [ [ [[-1,-1], [-1,-1]],[[-1,-1], [-1,-1]] ], [ [[-1,-1], [-1,-1]], [[-1,-1], [-1,-1]] ] ]
+
+form.addEventListener('submit', (e) => {
+    e.preventDefault();
+
+    console.log('предсказываем',predictArray[history[0]] [history[1]] [history[2]] [history[3]]);
+    let num = (+input.value);
+    console.log(`user:${num}`);
+    predictArray[history[0]] [history[1]] [history[2]] [history[3]] = num;
+    history.shift();
+    history.push(num);
+    console.log(history);
+    
+})
+
+
+
+

+ 5 - 0
HWJS04/src/sass/style.scss

@@ -0,0 +1,5 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+

+ 349 - 0
HWJS05/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 2 - 0
HWJS05/src/css/style.min.css

@@ -0,0 +1,2 @@
+*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}
+/*# sourceMappingURL=style.min.css.map */

+ 9 - 0
HWJS05/src/css/style.min.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAAA,AAAA,CAAC,AAAA,CACG,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,CAAC,CACZ",
+    "sources": [
+        "../sass/style.scss"
+    ],
+    "names": [],
+    "file": "style.min.css"
+}

+ 23 - 0
HWJS05/src/index.html

@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title >A-level</title>
+    <div style="background-color: cadetblue;"></div>
+    
+</head>
+<body>
+    <form>
+        <input type="number">
+        <button>click</button>
+    </form>
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 282 - 0
HWJS05/src/js/script.js

@@ -0,0 +1,282 @@
+//////////////////////////////////3 persons, different fields, fields check
+let a = {
+    name: 'dima',
+    surname: 'bondarenko',
+    fathername: 'valeryevich'
+};
+
+let b = {
+    name: 'mike',
+    surname: 'tayson',
+    age: 28
+};
+
+let c = {
+    name: 'sasha',
+    surname: 'grey',
+    sex: 'lubit'
+}
+// for (let key in a){
+//     if (key === 'fathername' || key === 'age' || key === 'sex'){
+//         alert(`найден ${key} в  обьекте a`)
+//     }
+// }
+
+// for (let key in b){
+//     if (key === 'fathername' || key === 'age' || key === 'sex'){
+//         alert(`найден ${key} в  обьекте b`)
+//     }
+// }for (let key in c){
+//     if (key === 'fathername' || key === 'age' || key === 'sex'){
+//         alert(`найден ${key} в  обьекте c`)
+//     }
+// }
+
+////////////////////////////////array of persons
+let persons = [a, b, c, {name: 'vitalik', surname: 'klichko'}];
+
+
+//////////////////////////////////////loop of persons
+// for (let i = 0; i < persons.length; i++){
+//     console.log(persons[i])
+// }
+
+
+//////////////////////////////////////////loop of name and surname
+// for (let i = 0; i < persons.length; i++){
+//     let {name, surname} = persons[i];
+//     console.log(`name: ${name}, surname: ${surname}`)
+// }
+
+
+///////////////////////////////////////loop of loop of values
+// for (let i = 0; i < persons.length; i++){
+//     for (let key in persons[i]){
+//         console.log(persons[i][key])
+//     }
+// }
+
+
+/////////////////////////////////////////////fullName
+for (let i = 0; i < persons.length; i++){
+    let {name, surname} = persons[i];
+    persons[i]["fullName"] = name +' '+ surname;
+}
+
+//////////////////////////////////serialize
+// let jsonPersons = JSON.stringify(persons);
+
+/////////////////////////////////////////////deserialize
+let jsonPerson = '{"name":"vitya","surname":"yanukovych","location":"rostov","fullName":"vitya yanukovych"}';
+persons[persons.length] = JSON.parse(jsonPerson);
+
+/////////////////////////////////////////HTML
+
+let str = '<table border="1">'
+
+for (let i = 0; i < persons.length; i++){
+    let {name, surname} = persons[i];
+    str += `<tr><td>${name}</td><td>${surname}</td></tr>`;
+}
+
+str += '</table>'
+document.write(str)
+
+///////////////////////////////HTML optional fields and HTML tr color
+
+let str2 = '<table border="1">'
+
+for (let i = 0; i < persons.length; i++){
+    if(i%2 === 0){
+        str2 += '<tr style="background-color: bisque;">'
+        for (let key in persons[i]){
+            str2 += `<td>${persons[i][key]}</td>`  
+        }
+        str2 += '</tr>'
+    } else {
+        str2 += '<tr>'
+        for (let key in persons[i]){
+            str2 += `<td>${persons[i][key]}</td>`  
+        }
+        str2 += '</tr>'
+    }
+    
+}
+
+str2 += '</table>'
+document.write(str2);
+
+//////////////////////////////////////////////HTML th optional
+
+let keys = [];
+persons.forEach((item) => {
+    keys = [...keys,...Object.keys(item)]
+});
+let uniqueKeys = [...new Set(keys)];
+
+let str3 = '<table border="1">'
+str3 += '<tr>'
+uniqueKeys.forEach((key) => {
+    str3 += `<th>${key}</th>`
+})
+str3 += '</tr>'
+
+persons.forEach((person) => {
+    str3 += '<tr>'
+    uniqueKeys.forEach((key) => {
+        if (person[key]){
+            str3 += `<td>${person[key]}</td>`
+        } else {
+            str3 += '<td></td>'
+        }
+    })
+    str3 += '</tr>'
+})
+
+str3 += '</table>'
+document.write(str3)
+
+////////////////////////////////////////// Задание на синий пояс.
+
+let body = {
+        tagName : 'body',
+        subTags : [
+            {
+                tagName : 'div',
+                subTags : [
+                    {
+                        tagName : 'span',
+                        text : 'Enter a data please:'
+                    },
+                    {
+                        tagName : 'br'
+                    },
+                    {
+                        tagName : 'input',
+                        attrs : {
+                            type : 'text',
+                            id : 'name'
+                        }
+                    },
+                    {
+                        tagName : 'input',
+                        attrs : {
+                            type : 'text',
+                            id : 'surname'
+                        }
+                    }
+                ]
+            },
+            {
+                tagName : 'div',
+                subTags : [
+                    {
+                        tagName : 'button',
+                        attrs : {
+                            id : 'ok'
+                        },
+                        text : 'OK'
+                    },
+                    {
+                        tagName : 'button',
+                        attrs : {
+                            id : 'cancel'
+                        },
+                        text : 'Cancel'
+                    }
+                ]
+            }
+       ]
+    }
+let str4 = '';
+
+function makeHtml(obj){
+    let {tagName, subTags, attrs, text} = obj;
+
+    if(attrs){
+        str4 += `<${tagName}`
+        for(let key in attrs){
+            str4 += ` ${key}=${attrs[key]}`
+        }
+        str4 += '>'
+    } else {
+        str4 += `<${tagName}>`
+    }
+
+    if(text){
+        str4 += text;
+        str4 += `</${tagName}>`
+        str4 += '\n'
+
+    }
+    
+    if(subTags){
+        str4 += '\n'
+        subTags.forEach((tag) => {
+            makeHtml(tag);                             //рекурсивно вызываем для вложеных элементов
+        })
+        str4 += `</${tagName}>`
+        str4 += '\n'
+    }
+    
+    if (!text && !subTags){
+        str4 += '\n'
+    }
+}
+
+makeHtml(body);
+
+console.log(str4);
+
+
+//////////////////////////////////////////destruct array
+// let arr = [1,2,3,4,5, "a", "b", "c"];
+// let [odd1, even1, odd2, even2, odd3, ...letters] = arr;
+
+///////////////////////////////destruct string
+// let arr = [1, "abc"];
+// let [number, [s1, s2, s3]] = arr;
+
+/////////////////////////////destruct 2
+let obj = {name: 'Ivan',
+           surname: 'Petrov',
+           children: [{name: 'Maria'}, {name: 'Nikolay'}]
+        }
+let {children : [{name : name1},{name : name2}]} = obj;
+
+////////////////////////////////////////////destruct 3
+let arr = [1,2,3,4, 5,6,7,10];
+let {0 : a1, 1 : b1, 8 : length} = {...[...arr,arr.length]};
+
+////////////////////////////////////////////Задание на черный пояс
+const input = document.querySelector('input');
+const form = document.querySelector('form');
+
+let history = '0000';
+let predictArray = {};
+
+form.addEventListener('submit', (e) => {
+    e.preventDefault();
+
+    console.log('предсказываем',predictArray[history]);
+    let num = (input.value);
+    console.log(`user:${num}`);
+
+    predictArray[history] = num;
+    
+    history = history.substring(1);
+    history = history + num;
+    // console.log(history);
+})
+
+
+
+
+
+
+
+
+
+
+
+

+ 5 - 0
HWJS05/src/sass/style.scss

@@ -0,0 +1,5 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+

+ 349 - 0
HWJS06/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 2 - 0
HWJS06/src/css/style.min.css

@@ -0,0 +1,2 @@
+*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}
+/*# sourceMappingURL=style.min.css.map */

+ 9 - 0
HWJS06/src/css/style.min.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAAA,AAAA,CAAC,AAAA,CACG,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,CAAC,CACZ",
+    "sources": [
+        "../sass/style.scss"
+    ],
+    "names": [],
+    "file": "style.min.css"
+}

+ 20 - 0
HWJS06/src/index.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title >A-level</title>
+    <div style="background-color: cadetblue;"></div>
+    
+</head>
+<body>
+    
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 135 - 0
HWJS06/src/js/script.js

@@ -0,0 +1,135 @@
+/////////////////////////////////////////////a
+function a(str){
+    alert(str)
+}
+//a("Привет!") // вызывает alert("Привет!")
+
+///////////////////////////////cube
+function cube(num){
+    return num**3;
+}
+
+// alert(cube(5))
+//or
+function cube2(num){
+    return Math.pow(num, 3)
+}
+// alert(cube2(4))
+
+////////////////////////////////////avg2
+function avg2(a, b){
+    return (a + b) /2;
+}
+// alert(avg2(10,5));
+
+/////////////////////////////////////sum3
+function sum3(a, b, c = 0){
+    return a + b + c;
+}
+
+// alert(sum3(10, 5, 20));
+// alert(sum3(4, 4));
+
+/////////////////////////////////////////intRandom
+// function intRandom(max, min = 0){
+//     return Math.round(Math.random() * (max - min)) + min;
+// }
+
+// alert(intRandom(5, 3))
+
+//or
+
+function intRandom(min, max){
+    if(!max){
+        return Math.round(Math.random() * min);
+    } else {
+        return Math.round(Math.random() * (max - min)) + min;
+    }
+    
+}
+
+// alert(intRandom(5));
+
+
+///////////////////////////////////greetAll
+
+function greetAll(...arrName){
+    let greeting = "Hello ";
+    arrName.forEach((person) => {
+        greeting += `${person}, `
+    })
+    alert(greeting);
+}
+// greetAll("Superman", "SpiderMan", "Captain Obvious", "Vitya");
+
+//////////////////////////////////sum
+
+function sum(){
+   return [...arguments].reduce((a,b) => a + b);
+}
+
+// console.log(sum (7,56,67,68));
+
+
+//////////////////////////////////////////////Union
+function aSample(){
+    a("Привет!") 
+}
+
+function cubeSample(){
+    alert(cube(9)) 
+}
+
+function avg2Sample(){
+    alert(avg2(10,5));
+}
+
+function sum3Sample(){
+    alert(sum3(4, 4));
+}
+
+function intRandomSample(){
+    alert(intRandom(5, 3))
+}
+
+function greetAllSample(){
+    greetAll("Superman", "SpiderMan", "Captain Obvious", "Vitya");
+}
+
+function sumSample(){
+    alert(sum (7,56,67,68));
+}
+
+// let sample = prompt("Введите название задания");
+// switch (sample.toLowerCase()){
+//     case "a": aSample()
+//               break
+//     case "cube": cubeSample()
+//               break
+//     case "avg2": avg2Sample()
+//               break
+//     case "sum3": sum3Sample()
+//               break
+//     case "intrandom": intRandomSample()
+//               break
+//     case "greetall": greetAllSample()
+//               break
+//     case "sum": sumSample()
+//               break
+// }
+
+//////////////////////////////////////Union declarative
+{
+    // let sample = prompt("Введите название задания");
+    let funcs = {
+        a: aSample,
+        cube: cubeSample,
+        avg2: avg2Sample,
+        sum3: sum3Sample,
+        intrandom: intRandomSample,
+        greetall: greetAllSample,
+        sum: sumSample
+    }
+
+   funcs[sample]();
+}

+ 5 - 0
HWJS06/src/sass/style.scss

@@ -0,0 +1,5 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+

+ 349 - 0
HWJS07/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

File diff suppressed because it is too large
+ 2 - 0
HWJS07/src/css/style.min.css


File diff suppressed because it is too large
+ 9 - 0
HWJS07/src/css/style.min.css.map


+ 50 - 0
HWJS07/src/index.html

@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title>A-level</title>
+    
+    
+</head>
+<body>
+       <section class="calc">
+                <form class="form">
+                    <input class="date" type="text" placeholder="День">
+                    <select>
+                        <option value="0">Январь</option>
+                        <option value="1">Февраль</option>
+                        <option value="2">Март</option>
+                        <option value="3">Апрель</option>
+                        <option value="4">Май</option>
+                        <option value="5">Июнь</option>
+                        <option value="6">Июль</option>
+                        <option value="7">Август</option>
+                        <option value="8">Сентябрь</option>
+                        <option value="9">Октябрь</option>
+                        <option value="10">Ноябрь</option>
+                        <option value="11">Декабрь</option>
+                    </select>
+                    <input class="year" type="text" value="2021" placeholder="Год">
+                    <button class="btn">Узнать сколько ты прожил</button>
+                </form>
+                <div class="report">
+                    <div></div>
+                    <button class="btn-close">Close</button>
+                </div>
+        </section>
+        <section class="calc-live">
+            <form class="form-live">
+                <input class="input-usd" type="text" placeholder="USD">
+                <input class="input-uah" type="text" placeholder="UAH">
+            </form>
+        </section>
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 202 - 0
HWJS07/src/js/script.js

@@ -0,0 +1,202 @@
+///////////////////Таблица умножения
+const body = document.querySelector('body');
+
+let table = document.createElement('table');
+body.prepend(table);
+
+// function createTable(size){
+//     for(let i = 0; i < size; i++){
+//         let tr = document.createElement('tr');
+//         table.append(tr);
+        
+//         for(let j = 0; j < size; j++){
+//             let td = document.createElement('td');
+//             tr.append(td);
+//             td.classList.add('cell');
+//             if(i === 0){
+//                 td.innerHTML = 1 * j
+//             } else if (j === 0){
+//                 td.innerHTML = i * 1;
+//             } else {
+//                 td.innerHTML = i * j
+//             }
+
+//             if(i%2!==0){
+//                 td.style.backgroundColor = '#f0f0f0'
+//             }
+            
+//         }
+//     }
+// }
+
+// createTable(20);
+
+///////////////////////////////////////////////////Подсветить ячейку
+
+// function createTable(size){
+//     for(let i = 0; i < size; i++){
+//         let tr = document.createElement('tr');
+//         table.append(tr);
+        
+//         for(let j = 0; j < size; j++){
+//             let td = document.createElement('td');
+//             tr.append(td);
+//             td.classList.add('cell');
+
+//             if(i === 0){
+//                 td.innerHTML = 1 * j
+//             } else if (j === 0){
+//                 td.innerHTML = i * 1;
+//             } else {
+//                 td.innerHTML = i * j
+//             }
+
+//             td.onmouseover = function(e){                                         ///<= 
+//                 this.style.backgroundColor = 'green'                              
+//             }                                                                     
+                                                                                   
+//             if(i%2!==0){                                                                 
+//                 td.style.backgroundColor = '#e0e0e0'                              
+//                 td.onmouseout = function(e){                                      
+//                     this.style.backgroundColor = '#e0e0e0'                        
+//                 }                                                                 
+//             } else {                                                              
+//                 td.onmouseout = function(e){
+//                     this.style.backgroundColor =''
+//                 }
+//             }
+            
+//         }
+//     }
+// }
+
+// createTable(15);
+
+/////////////////////////////////////////Подсветить строку и столбец
+function onLight(elem){                                                     
+
+    let rowIndex = elem.parentElement.rowIndex;
+    let cellIndex = elem.cellIndex;
+    let rows = [...document.querySelectorAll('tr')];
+
+    for (let i = 0; i <= rowIndex; i++){                                                     
+        rows[i].children[cellIndex].style.backgroundColor = 'green'
+    }
+
+    let childrenArray = [...rows[rowIndex].children];                                       
+    for (let i = 0; i <= cellIndex; i++){
+        childrenArray[i].style.backgroundColor = 'green';
+    }
+}
+
+function createTable(size){
+    for(let i = 0; i < size; i++){
+        let tr = document.createElement('tr');
+        table.append(tr);
+        
+        for(let j = 0; j < size; j++){
+            let td = document.createElement('td');
+            tr.append(td);
+            td.classList.add('cell');
+
+            if(i === 0){
+                td.innerHTML = 1 * j
+            } else if (j === 0){
+                td.innerHTML = i * 1;
+            } else {
+                td.innerHTML = i * j
+            }
+
+            if(i%2!==0){                                                                 
+                td.style.backgroundColor = '#e0e0e0'                              
+                                                                                
+            } 
+
+            td.onmouseover = function(e){                                        
+                
+                onLight(this);                
+            }                                                                     
+                                                                                   
+            
+            
+            td.onmouseout = function(e){
+                let rows = [...document.querySelectorAll('tr')];
+                for (let i = 0; i < rows.length; i++){
+                    if(i%2 === 0){
+                        let cells = [...rows[i].children];
+                        cells.forEach((cell) => {
+                            cell.style.backgroundColor = ''
+                        })
+                    } else {
+                        let cells = [...rows[i].children];
+                        cells.forEach((cell) => {
+                            cell.style.backgroundColor = '#e0e0e0'
+                        })
+                    }
+                }
+                                            
+            } 
+
+
+
+        }
+    }
+}
+
+createTable(20);
+
+
+///////////////////////////////Calc
+
+const inputDate = document.querySelector('.date');
+const inputYear = document.querySelector('.year');
+const select = document.querySelector('select');
+const form = document.querySelector('.form');
+const report = document.querySelector('.report');
+const closeBtn = document.querySelector('.btn-close');
+
+
+
+
+    
+
+function getTime(year, month, day){
+    
+    let dBirth = new Date(year, month, day)
+    let today = Date.now();
+
+    let s = Math.floor((today - dBirth) /1000);
+    let min = Math.floor(s/60);
+    let hour = Math.floor(min/60);
+    let days = Math.floor(hour/24);
+    let years = Math.floor(days/365);                                           //помню что иногда 366, но идея задания работа с дом :)
+
+    report.querySelector('div').innerHTML = `Вы прожили ${years} лет ${days} дней, ${hour} часов, ${min} минут, ${s} секунд`;
+    report.style.display = 'block';
+}
+
+form.addEventListener("submit", function(e) {
+    e.preventDefault();
+        getTime(inputYear.value, select.value, inputDate.value)
+    let timerId = setInterval(() => {
+        getTime(inputYear.value, select.value, inputDate.value)
+    },1000)
+    
+    closeBtn.addEventListener("click", (e) => {
+        e.preventDefault();
+        clearInterval(timerId);
+       report.style.display = 'none';
+    })
+})
+
+////////////////////////////calc live
+
+const inputUsd = document.querySelector('.input-usd');
+const inputUah = document.querySelector('.input-uah');
+const exchangeRate = 27;
+inputUsd.addEventListener("input", function(){
+    inputUah.value = (+inputUsd.value) * exchangeRate;
+});
+inputUah.addEventListener("input", function(){
+    inputUsd.value = (+inputUah.value) / exchangeRate;
+})

+ 61 - 0
HWJS07/src/sass/style.scss

@@ -0,0 +1,61 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+
+.cell{
+    border: 2px solid rgb(148, 148, 148);
+    padding: 5px;
+    margin: 5px;
+}
+
+section.calc{
+    position: relative;
+    padding: 100px;
+    .form{
+        width: 400px;
+        padding: 50px 30px;
+        margin: 0 auto;
+        background-color: rgb(240, 240, 240);
+        border-radius: 4px;
+        box-shadow: 0px 0.5px 30px 1px rgba(0, 0, 0, .4);
+        input, select{
+            margin-bottom: 20px;
+            width: 100%;
+        }
+    }
+    
+    .report{
+        display: none;
+        position: fixed;
+        top: 100px;
+        left: 50%;
+        transform: translateX(-50%);
+        width: 400px;
+        padding: 50px 30px;
+        margin: 0 auto;
+        background-color: rgb(212, 212, 212);
+        border-radius: 4px;
+        box-shadow: 0px 0.5px 30px 1px rgba(0, 0, 0, .4);
+        button{
+            margin-top: 50px;
+        }
+    }
+
+}
+
+section.calc-live{
+    padding: 100px;
+    .form-live{
+        width: 400px;
+        padding: 50px 30px;
+        margin: 0 auto;
+        background-color: rgb(240, 240, 240);
+        border-radius: 4px;
+        box-shadow: 0px 0.5px 30px 1px rgba(0, 0, 0, .4);
+        .input-usd, .input-uah{
+            margin-bottom: 20px;
+            width: 100%;
+        }
+    }
+}

+ 349 - 0
HWJS08/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 2 - 0
HWJS08/src/css/style.min.css

@@ -0,0 +1,2 @@
+*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}
+/*# sourceMappingURL=style.min.css.map */

+ 9 - 0
HWJS08/src/css/style.min.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAAA,AAAA,CAAC,AAAA,CACG,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,CAAC,CACZ",
+    "sources": [
+        "../sass/style.scss"
+    ],
+    "names": [],
+    "file": "style.min.css"
+}

+ 19 - 0
HWJS08/src/index.html

@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title>A-level</title>
+    
+    
+</head>
+<body>
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 243 - 0
HWJS08/src/js/script.js

@@ -0,0 +1,243 @@
+////////////////////////////////////////////////////////////////ES6
+let a = (str) => alert(str);
+// a("Привет!") // вызывает alert("Привет!")
+
+let cube = (num) => num**3;
+// alert(cube(5))
+//or
+let cube2 = (num) => Math.pow(num, 3);
+// alert(cube2(4))
+
+let avg2 = (a, b) => (a + b) /2;
+// alert(avg2(10,5));
+
+
+// let sum3 = (a, b, c = 0) => a + b + c; //или
+let sum3 = (...arr) => arr.reduce((a,b) => a+b) // но по условию сумма 3 аргументов
+// alert(sum3(10, 5, 20));
+// alert(sum3(4, 4));
+
+
+let intRandom = (min, max) => {
+    let num = (!max) ? Math.round(Math.random() * min) : Math.round(Math.random() * (max - min)) + min;
+        return num
+}
+// alert(intRandom(3));
+
+let greetAll = (...arrNames) => {
+    let greeting = "Hello ";
+    arrNames.forEach((person) => {
+        greeting += `${person}, `
+    })
+    alert(greeting);
+}
+// greetAll("Superman", "SpiderMan", "Captain Obvious", "Vitya");
+
+let sum = (...arr) => arr.reduce((a,b) => a + b);
+// console.log(sum (7,56,67,68,2));
+
+
+///////////////////////////////////////sort
+
+var persons = [
+    {name: "Иван", age: 17},
+    {name: "Мария", age: 35},
+    {name: "Алексей", age: 73},
+    {name: "Яков", age: 12},
+    {name: "Дима", age: 28},
+    {name: "Миша", age: 50},
+    {name: "Андрей", age: 60}
+]
+
+let sort = (arr, key, reverse = true) => {
+    for (let i = 0; i < arr.length-1; i++){
+        let wasSwap = false;
+        for(let j = 0; j < (arr.length-1)-i; j++){  //// каждый раз уменьшаем количество итераций на i (-i), так как в конце уже все четко
+            if(reverse){
+                if(arr[j][key] > arr[j + 1][key]){
+                    [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]]; ///меняем местами полностью обьекты а не ключи
+                    wasSwap = true
+                }
+            }else{
+                if(arr[j][key] < arr[j + 1][key]){
+                    [arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];          
+                    wasSwap = true
+                }
+            }
+            
+        }
+        if(!wasSwap) break;
+    }
+    return arr
+}
+
+////////////////////////////////////////array map
+let arr = ["1", {}, null, undefined, "500", 700];
+let arr2 = arr.map((elem) => {
+    if(typeof elem === "string" && !isNaN(+elem)){
+        elem = +elem
+    }
+    return elem
+})
+
+console.log(arr2)
+
+/////////////////////////////////////////////array reduce
+let arr5 = [4, NaN, 3, Infinity, "0", "34", 5, "string", 6, null];
+// let arr6 = arr5.reduce((a, b) => {
+//     if(typeof b === 'number' && !isNaN(b * 0)){
+        
+//         return a * b
+//     } else {
+//         return a
+//     }
+    
+// }, 1)      
+//или 
+let arr6 = arr5.reduce((a,b) => (typeof b === 'number' && !isNaN(b*0) ? a * b : a),1);
+console.log(arr6);
+
+///////////////////////////////////////object filter
+var phone = {
+    brand: "meizu",
+    model: "m2",
+    ram: 2,
+    color: "black",
+};
+
+function filter(obj, fun){
+    let newObj = {};
+    Object.entries(obj).forEach((item)=>{
+        if (fun(item[0], item[1])){
+            newObj[item[0]] = item[1];
+        };
+
+    });
+    return newObj
+}
+
+console.log(filter(phone, (key, value) => value == 'black' || value == 'm2')); /// => {model: 'm2', color: 'black'}
+//console.log(filter(phone,(key,value) => key == "color" || value == 2)); //=> {ram: 2, color: 'black'}
+//console.log(filter(phone,(key,value) => key == "color" || value == "black")); //=> {color: 'black'} 
+
+///////////////////////////////object map
+function map (obj, func){
+    let res = {}
+    Object.entries(obj).forEach((item) => {
+        res = {...res,...func(item[0], item[1])}
+    })
+    console.log(res)
+}
+
+map({name: "Иван", age: 17},(key,value) => {
+    let result = {};
+    result[key+"_"] = value + "$";
+    return result                           
+});
+
+//////////////////////////////////////////////////////Sum
+
+const s = n => n <= 1 ? 1 : n + s(n-1);
+
+////////////////////////////////////////////////////HTML Tree
+let body = {
+    tagName : 'body',
+    subTags : [
+        {
+            tagName : 'div',
+            subTags : [
+                {
+                    tagName : 'span',
+                    text : 'Enter a data please:'
+                },
+                {
+                    tagName : 'br'
+                },
+                {
+                    tagName : 'input',
+                    attrs : {
+                        type : 'text',
+                        id : 'name'
+                    }
+                },
+                {
+                    tagName : 'hr'
+                },
+                {
+                    tagName : 'input',
+                    attrs : {
+                        type : 'text',
+                        id : 'surname'
+                    }
+                }
+            ]
+        },
+        {
+            tagName : 'div',
+            subTags : [
+                {
+                    tagName : 'button',
+                    attrs : {
+                        id : 'ok'
+                    },
+                    text : 'OK'
+                },
+                {
+                    tagName : 'button',
+                    attrs : {
+                        id : 'cancel'
+                    },
+                    text : 'Cancel'
+                }
+            ]
+        }
+   ]
+}
+let str4 = '';
+
+function makeHtml(obj, level = 0){
+    let tab = '    '.repeat(level);                 ///добавляем tab
+    let {tagName, subTags, attrs, text} = obj;
+
+    if(attrs){
+        str4 += tab +`<${tagName}`
+        for(let key in attrs){
+            str4 += ` ${key}=${attrs[key]}`
+        }
+        str4 += '>'
+    } else {
+        str4 += tab + `<${tagName}>`
+    }
+
+    if(text){
+        str4 += text;
+        str4 += `</${tagName}>`
+        str4 += '\n'
+
+    }
+
+    if(subTags){
+        str4 += '\n'
+        subTags.forEach((tag) => {
+            makeHtml(tag, level + 1);      //рекурсивно вызываем для вложеных элементов
+        })
+        str4 += tab + `</${tagName}>`
+        str4 += '\n'
+    }
+
+    if (!text && !subTags){
+        str4 += '\n'
+    }
+}
+
+makeHtml(body);
+
+console.log(str4);
+
+
+
+
+
+
+
+

+ 5 - 0
HWJS08/src/sass/style.scss

@@ -0,0 +1,5 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+

+ 349 - 0
HWJS09/src/css/normalize.css/normalize.css

@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+   ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+  line-height: 1.15; /* 1 */
+  -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+  background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+  border-style: none;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: inherit; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+  padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Misc
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+  display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+  display: none;
+}

+ 2 - 0
HWJS09/src/css/style.min.css

@@ -0,0 +1,2 @@
+*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}
+/*# sourceMappingURL=style.min.css.map */

+ 9 - 0
HWJS09/src/css/style.min.css.map

@@ -0,0 +1,9 @@
+{
+    "version": 3,
+    "mappings": "AAAA,AAAA,CAAC,AAAA,CACG,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,CAAC,CACZ",
+    "sources": [
+        "../sass/style.scss"
+    ],
+    "names": [],
+    "file": "style.min.css"
+}

+ 19 - 0
HWJS09/src/index.html

@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    
+    <link rel="stylesheet" href="css/normalize.css/normalize.css">
+    <link rel="icon" href="https://camo.githubusercontent.com/eb8b5f9caa4b4765b222e961729eadb775ac710b/68747470733a2f2f67617265766e612e6769746875622e696f2f6a732d73616d706c65732f696d616765732f612d6c6576656c2d69636f2e706e67">
+    <link rel="stylesheet" href="css/style.min.css">
+
+    <title>A-level</title>
+    
+    
+</head>
+<body>
+    <script src="js/script.js"></script>
+</body>
+</html>

+ 100 - 0
HWJS09/src/js/script.js

@@ -0,0 +1,100 @@
+/////////////////////////////////////////makeProfileTimer
+function makeProfileTimer(){
+    let startTime = performance.now();
+    return function (){
+        let finishTime = performance.now();
+        return `прошло ${Math.round((finishTime - startTime) * 1000)} микросекунд`      // по условию именно МИКРОСЕКУНД, 
+    }
+}
+
+let timer = makeProfileTimer();
+alert('Замеряем время работы этого alert');
+alert(timer());
+
+/////////////////////////////////////////////////makeSaver
+function makeSaver(MathRandom){
+    let wasnotCalled = true;
+    let number
+    return function (){
+        
+        if (wasnotCalled){
+            number = MathRandom()       //вызываем раз, 
+            wasnotCalled = false        // и выключаем возможность вызова повторно (из условия)
+        }
+        return number
+    }
+}
+
+let saver = makeSaver(Math.random);
+
+let value1 = saver();
+let value2 = saver();
+let value3 = saver();
+ 
+let saver2 = makeSaver(() => console.log('saved function called') || [null, undefined, false, '', 0, Math.random()][Math.ceil(Math.random()*6)])
+
+let value4 = saver2();
+let value5 = saver2();
+let value6 = saver2();
+
+
+let namePrompt = prompt.bind(window, 'Как тебя зовут?');
+let nameSaver = makeSaver(namePrompt);
+alert(`Привет! Prompt еще не было!`);
+alert(`Привет ${nameSaver()}. Только что запустился prompt, первый и последний раз`);
+alert(`Слушай, ${nameSaver()}, го пить пиво. Ведь prompt был только один раз`);
+
+
+//////////////////////////////////////Final Countdown
+// alert('start');
+// (function (sec = 0){
+//     for (let i = 5; i >= 0; i--){
+//         setTimeout(() => {
+//             i ? console.log(i) : console.log('поехали')
+            
+//         }, (sec++) * 1000 )
+//     }
+// })()
+
+/////////////////////////////////////////////////////myBind 
+function myBind(func, thisArgs, bindedParams){
+    return function (...args){
+        let count = 0;
+        let combinedParams = []
+        bindedParams.forEach((item) => {
+            if(item === undefined){                    // находим undefined
+                combinedParams = [...combinedParams, args[count]]    // добавляем из переданных args
+                count++   //увеличиваем счетчик, чтобы брать следующий элемент
+            } else {
+                combinedParams = [...combinedParams,item] // если не undefined, то его же и берем, не изменяя bindedParams
+            }
+        })
+        
+        for (; count < args.length; count++){                      // подкидываем все остальные
+            combinedParams = [...combinedParams, args[count]] 
+        }
+        
+        return func.call(thisArgs,...combinedParams);
+    }
+}
+
+let pow5 = myBind(Math.pow, Math, [undefined, 5]);
+let cube = myBind(Math.pow, Math, [undefined, 3]);
+let chessMin = myBind(Math.min, Math, [undefined, 4, undefined, 5,undefined, 8,undefined, 9]);
+let zeroPrompt = myBind(prompt, window, [undefined, "0"]);
+
+console.log(pow5(2)) // => 32
+
+console.log(cube(3)) // => 27
+console.log(cube(4)) // => 64
+
+console.log(chessMin(-1,-5,3,15,1, 1, -7)) // => -7   
+console.log(chessMin(-6,5,-7,1)) // => -7   
+
+let someNumber = zeroPrompt("Введите число");// в инпуте попадет 0, а "Введите число" как сообщение prompt
+
+
+console.log(myBind((...params) => params.join(''), null, [undefined, 'b', undefined, undefined, 'e', 'f'])('a','c','d') === 'abcdef') // => true
+
+
+

+ 5 - 0
HWJS09/src/sass/style.scss

@@ -0,0 +1,5 @@
+*{
+    box-sizing: border-box;
+    margin: 0;
+}
+