{"id":312453,"date":"2020-11-02T21:00:34","date_gmt":"2020-11-02T21:00:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=312453"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=312453","title":{"rendered":"\u0426\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0442\u0435\u043c\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<h2>\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c<\/h2>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0442\u0435\u043c\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c<\/h2>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u0430\u0439\u0442\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0442\u0435\u043c\u044b \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u043e\u043c \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u0435(\u043e\u0431\u044b\u0447\u043d\u043e).<\/p>\n<h2>\u0427\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f<\/h2>\n<ul>\n<li>\n<p>\u0417\u043d\u0430\u043d\u0438\u0435 HTML<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043d\u0438\u0435 CSS<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043d\u0438\u0435 JS<\/p>\n<\/li>\n<\/ul>\n<h2>\u041d\u0430\u0447\u043d\u0435\u043c<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u041f\u043e\u043a\u0430 \u0432\u0441\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u044b\u0440\u043e, \u043d\u043e \u044d\u0442\u043e \u043f\u043e\u043a\u0430.<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt;     &lt;meta charset=\"UTF-8\"&gt;     &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;     &lt;title&gt;\u0422\u0435\u043c\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt;     &lt;div class=\"text\"&gt;         Themes sait     &lt;\/div&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c CSS \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n<pre><code class=\"css\">html, body {     margin: 0;     padding: 0; }  .text {     position: fixed;     font-size: 100px;     width: 100%;     height: 100%;     justify-content: center;     align-items: center;     display: flex; }<\/code><\/pre>\n<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c black.css.<\/p>\n<pre><code class=\"css\">:root {     --textColor: white;     --background: black; }<\/code><\/pre>\n<p>\u0418 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c white.css.<\/p>\n<pre><code class=\"css\">:root {     --textColor: black;     --background: white; }<\/code><\/pre>\n<h2>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/h2>\n<p>\u0427\u0442\u043e \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 &#171;:root&#187;? \u0418 \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b?<\/p>\n<p>&#171;:root&#187; &#8212; \u042d\u0442\u043e <strong>\u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043b\u0430\u0441\u0441 <\/strong>\u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0439 \u043a \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e &lt;html&gt;&lt;\/html&gt;.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b &#8212; \u042d\u0442\u043e <strong>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <\/strong>\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 <strong>\u0442\u043e\u043b\u044c\u043a\u043e <\/strong>\u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0438 \u044d\u0442\u043e &#171;root&#187;. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0434 \u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0430 \u0442\u0438\u0440\u0435(&#171;&#8212;&#171;). \u0427\u0442\u043e\u0431\u044b \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 var(&#8212;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435_\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439).<\/p>\n<\/p>\n<h2>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043d\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<pre><code class=\"css\">html, body {     margin: 0;     padding: 0;     background: var(--background); }  .text {     color: var(--textColor);     position: fixed;     font-size: 100px;     width: 100%;     height: 100%;     justify-content: center;     align-items: center;     display: flex; }<\/code><\/pre>\n<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0430\u0439\u0442, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0427\u0442\u043e \u0431\u044b \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c CSS \u0444\u0430\u0439\u043b\u044b. \u041d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0430 \u043e\u0434\u0438\u043d, \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439, \u0438 \u043a\u0430\u043a \u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f <strong>\u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e <\/strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GET \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b(\u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 URL \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430(&#171;https:\/\/domain.com?var=1&#187;)). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 &#171;\u0442\u0435\u043c\u043d\u0430\u044f \u0442\u0435\u043c\u0430&#187;, \u0430 \u043f\u043e \u043d\u0443\u0436\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &#8212; &#171;\u0431\u0435\u043b\u0430\u044f&#187;. \u0427\u0442\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#171;\u0431\u0435\u043b\u0443\u044e \u0442\u0435\u043c\u0443&#187; \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#171;white&#187; \u0441 \u043b\u044e\u0431\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c(&#171;https:\/\/domain.com?white=true&#187;).<\/p>\n<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c JS \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e.<\/p>\n<pre><code class=\"javascript\">function $_GET(key) {     let p = window.location.search;     p = p.match(new RegExp(key + \"=([^&amp;=]+)\"));     return p ? Boolean(p[1]) : false; }  function color() {     let head  = document.getElementsByTagName(\"head\")[0];     let link  = document.createElement(\"link\");     link.id   = \"css\";     link.rel  = \"stylesheet\";     link.type = \"text\/css\";     link.media = \"all\";     if($_GET(\"white\")) {         link.href = \".\/white.css\";     } else {         link.href = \".\/black.css\";             }     head.appendChild(link); }<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 &#171;color&#187;.<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt;     &lt;meta charset=\"UTF-8\"&gt;     &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;     &lt;title&gt;\u0422\u0435\u043c\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435&lt;\/title&gt;     &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;     &lt;script src=\"index.js\"&gt;&lt;\/script&gt; &lt;\/head&gt; &lt;body&gt;     &lt;div class=\"text\"&gt;         Themes sait     &lt;\/div&gt; &lt;\/body&gt; &lt;script&gt;color()&lt;\/script&gt; &lt;\/html&gt;<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0430\u0439\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u0442\u0435\u043c\u0430\u043c\u0438, \u043d\u043e \u0432\u0435\u0434\u044c \u043d\u0430 \u0434\u0432\u0443\u0445 \u0442\u0435\u043c\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435. \u0412\u0441\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p><a href=\"https:\/\/github.com\/Ilya-cmd\/Themes-sait\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 gitHub<\/a>. <\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc8\/b9b\/f58\/dc8b9bf589aca4f2965a7a3ea31c262b.png\" width=\"1920\" height=\"938\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/526164\/\"> https:\/\/habr.com\/ru\/post\/526164\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<h2>\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c<\/h2>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0442\u0435\u043c\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c<\/h2>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u0430\u0439\u0442\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u0442\u0435\u043c\u044b \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u043e\u043c \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u0435(\u043e\u0431\u044b\u0447\u043d\u043e).<\/p>\n<h2>\u0427\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f<\/h2>\n<ul>\n<li>\n<p>\u0417\u043d\u0430\u043d\u0438\u0435 HTML<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043d\u0438\u0435 CSS<\/p>\n<\/li>\n<li>\n<p>\u0417\u043d\u0430\u043d\u0438\u0435 JS<\/p>\n<\/li>\n<\/ul>\n<h2>\u041d\u0430\u0447\u043d\u0435\u043c<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u041f\u043e\u043a\u0430 \u0432\u0441\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u044b\u0440\u043e, \u043d\u043e \u044d\u0442\u043e \u043f\u043e\u043a\u0430.<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt;     &lt;meta charset=\"UTF-8\"&gt;     &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;     &lt;title&gt;\u0422\u0435\u043c\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt;     &lt;div class=\"text\"&gt;         Themes sait     &lt;\/div&gt; &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c CSS \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n<pre><code class=\"css\">html, body {     margin: 0;     padding: 0; }  .text {     position: fixed;     font-size: 100px;     width: 100%;     height: 100%;     justify-content: center;     align-items: center;     display: flex; }<\/code><\/pre>\n<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c black.css.<\/p>\n<pre><code class=\"css\">:root {     --textColor: white;     --background: black; }<\/code><\/pre>\n<p>\u0418 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c white.css.<\/p>\n<pre><code class=\"css\">:root {     --textColor: black;     --background: white; }<\/code><\/pre>\n<h2>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/h2>\n<p>\u0427\u0442\u043e \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 &#171;:root&#187;? \u0418 \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b?<\/p>\n<p>&#171;:root&#187; &#8212; \u042d\u0442\u043e <strong>\u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043b\u0430\u0441\u0441 <\/strong>\u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0439 \u043a \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e &lt;html&gt;&lt;\/html&gt;.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b &#8212; \u042d\u0442\u043e <strong>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <\/strong>\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 <strong>\u0442\u043e\u043b\u044c\u043a\u043e <\/strong>\u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0438 \u044d\u0442\u043e &#171;root&#187;. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0434 \u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0430 \u0442\u0438\u0440\u0435(&#171;&#8212;&#171;). \u0427\u0442\u043e\u0431\u044b \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 var(&#8212;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435_\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439).<\/p>\n<\/p>\n<h2>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043d\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<pre><code class=\"css\">html, body {     margin: 0;     padding: 0;     background: var(--background); }  .text {     color: var(--textColor);     position: fixed;     font-size: 100px;     width: 100%;     height: 100%;     justify-content: center;     align-items: center;     display: flex; }<\/code><\/pre>\n<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0430\u0439\u0442, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0427\u0442\u043e \u0431\u044b \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c CSS \u0444\u0430\u0439\u043b\u044b. \u041d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u0430 \u043e\u0434\u0438\u043d, \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439, \u0438 \u043a\u0430\u043a \u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f <strong>\u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e <\/strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GET \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b(\u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 URL \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430(&#171;https:\/\/domain.com?var=1&#187;)). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 &#171;\u0442\u0435\u043c\u043d\u0430\u044f \u0442\u0435\u043c\u0430&#187;, \u0430 \u043f\u043e \u043d\u0443\u0436\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &#8212; &#171;\u0431\u0435\u043b\u0430\u044f&#187;. \u0427\u0442\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#171;\u0431\u0435\u043b\u0443\u044e \u0442\u0435\u043c\u0443&#187; \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#171;white&#187; \u0441 \u043b\u044e\u0431\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c(&#171;https:\/\/domain.com?white=true&#187;).<\/p>\n<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c JS \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0433\u043e.<\/p>\n<pre><code class=\"javascript\">function $_GET(key) {     let p = window.location.search;     p = p.match(new RegExp(key + \"=([^&amp;=]+)\"));     return p ? Boolean(p[1]) : false; }  function color() {     let head  = document.getElementsByTagName(\"head\")[0];     let link  = document.createElement(\"link\");     link.id   = \"css\";     link.rel  = \"stylesheet\";     link.type = \"text\/css\";     link.media = \"all\";     if($_GET(\"white\")) {         link.href = \".\/white.css\";     } else {         link.href = \".\/black.css\";             }     head.appendChild(link); }<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 &#171;color&#187;.<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt;     &lt;meta charset=\"UTF-8\"&gt;     &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;     &lt;title&gt;\u0422\u0435\u043c\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435&lt;\/title&gt;     &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;     &lt;script src=\"index.js\"&gt;&lt;\/script&gt; &lt;\/head&gt; &lt;body&gt;     &lt;div class=\"text\"&gt;         Themes sait     &lt;\/div&gt; &lt;\/body&gt; &lt;script&gt;color()&lt;\/script&gt; &lt;\/html&gt;<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0430\u0439\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u0442\u0435\u043c\u0430\u043c\u0438, \u043d\u043e \u0432\u0435\u0434\u044c \u043d\u0430 \u0434\u0432\u0443\u0445 \u0442\u0435\u043c\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435. \u0412\u0441\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p><a href=\"https:\/\/github.com\/Ilya-cmd\/Themes-sait\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 gitHub<\/a>. <\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/526164\/\"> https:\/\/habr.com\/ru\/post\/526164\/<\/a><br \/><\/br><\/br><\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-312453","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=312453"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312453\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=312453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=312453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=312453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}