{"id":496,"date":"2023-03-08T17:11:51","date_gmt":"2023-03-08T14:11:51","guid":{"rendered":"https:\/\/notes.profidev.online\/?p=496"},"modified":"2023-03-28T23:48:59","modified_gmt":"2023-03-28T20:48:59","slug":"originalnoe-menyu","status":"publish","type":"post","link":"https:\/\/notes.profidev.online\/ru\/headermenu\/496\/","title":{"rendered":"Original menu"},"content":{"rendered":"<figure class=\"wp-block-video\"><video height=\"859\" style=\"aspect-ratio: 1629 \/ 859;\" width=\"1629\" controls src=\"https:\/\/notes.profidev.online\/wp-content\/uploads\/2023\/03\/vokoscreenng-2023-03-08_15-09-02.webm\"><\/video><\/figure>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;cobalt&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">&lt;div class=&quot;scene&quot;&gt;\n\n&lt;div class=&quot;bg&quot;&gt;&lt;\/div&gt;\n\n&lt;div class=&quot;content&quot;&gt;\n\n&lt;div class=&quot;block&quot;&gt;\n\n&lt;img class=&quot;prime-img&quot; src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-1.jpg&quot; alt=&quot;&quot; \/&gt;\n\n&lt;img src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-2.jpg&quot; alt=&quot;&quot; class=&quot;sec-img&quot; \/&gt;\n\n&lt;h2 class=&quot;link&quot;&gt;Whatever 1&lt;\/h2&gt;\n\n&lt;span class=&quot;sec-info&quot;&gt;Secondary information 1&lt;\/span&gt;\n\n&lt;\/div&gt;\n\n&lt;div class=&quot;block&quot;&gt;\n\n&lt;img class=&quot;prime-img&quot; src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-3.jpg&quot; alt=&quot;&quot; \/&gt;\n\n&lt;img src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-4.jpg&quot; alt=&quot;&quot; class=&quot;sec-img&quot; \/&gt;\n\n&lt;h2 class=&quot;link&quot;&gt;Whatever 2&lt;\/h2&gt;\n\n&lt;span class=&quot;sec-info&quot;&gt;Secondary information 2&lt;\/span&gt;\n\n&lt;\/div&gt;\n\n&lt;div class=&quot;block&quot;&gt;\n\n&lt;img class=&quot;prime-img&quot; src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-5.jpg&quot; alt=&quot;&quot; \/&gt;\n\n&lt;img src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-6.jpg&quot; alt=&quot;&quot; class=&quot;sec-img&quot; \/&gt;\n\n&lt;h2 class=&quot;link&quot;&gt;Whatever 3&lt;\/h2&gt;\n\n&lt;span class=&quot;sec-info&quot;&gt;Secondary information 3&lt;\/span&gt;\n\n&lt;\/div&gt;\n\n&lt;div class=&quot;block&quot;&gt;\n\n&lt;img class=&quot;prime-img&quot; src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-7.jpg&quot; alt=&quot;&quot; \/&gt;\n\n&lt;img src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-8.jpg&quot; alt=&quot;&quot; class=&quot;sec-img&quot; \/&gt;\n\n&lt;h2 class=&quot;link&quot;&gt;Whatever 4&lt;\/h2&gt;\n\n&lt;span class=&quot;sec-info&quot;&gt;Secondary information 4&lt;\/span&gt;\n\n&lt;\/div&gt;\n\n&lt;div class=&quot;block&quot;&gt;\n\n&lt;img class=&quot;prime-img&quot; src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-9.jpg&quot; alt=&quot;&quot; \/&gt;\n\n&lt;img src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-10.jpg&quot; alt=&quot;&quot; class=&quot;sec-img&quot; \/&gt;\n\n&lt;h2 class=&quot;link&quot;&gt;Whatever 5&lt;\/h2&gt;\n\n&lt;span class=&quot;sec-info&quot;&gt;Secondary information 5&lt;\/span&gt;\n\n&lt;\/div&gt;\n\n&lt;\/div&gt;\n\n&lt;\/div&gt;\n\n&lt;script src=&quot;\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery\/2.1.3\/jquery.min.js&quot;&gt;&lt;\/script&gt;\n\n\/\/\u0421\u043a\u0440\u0438\u043f\u0442 js \u043d\u0430\u0434\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c\n\/\/\u0410\u0432\u0442\u043e\u0440: Nikolay Talanov. @suez<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;cobalt&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">@font-face {\n  src: url(https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/Metropolis_1920.otf);\n  font-family: Metropolis;\n}\n@font-face {\n  src: url(https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/PFSquareSansPro-Medium.otf);\n  font-family: pfs-medium;\n}\n*, *:before, *:after {\n  box-sizing: border-box;\n  margin: 0;\n  padding: 0;\n}\n\nhtml, body {\n  height: 100%;\n  overflow: hidden;\n}\n\n.scene {\n  position: relative;\n  height: 100%;\n  border: 10px solid #000;\n  z-index: 50;\n  overflow: hidden;\n}\n\n.bg {\n  position: absolute;\n  z-index: 1;\n  top: calc(50% - 52.5vh - 10px);\n  left: calc(50% - 52.5vw - 10px);\n  width: calc(105% + 20px);\n  height: calc(105% + 20px);\n  background-image: url(&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/142996\/mousover-img-bg.jpg&quot;);\n  background-size: cover;\n}\n\n.content {\n  position: absolute;\n  width: 200rem;\n  height: 127.5rem;\n  left: calc(50% - 100rem);\n  top: calc(50% - 63.75rem);\n  will-change: top, left;\n  z-index: 100;\n  will-change: transform;\n}\n\n.block {\n  position: absolute;\n}\n.block:nth-child(1) {\n  top: 15rem;\n  left: 85rem;\n}\n.block:nth-child(1) .sec-img {\n  margin-left: 2rem;\n  margin-top: -5rem;\n}\n.block:nth-child(1) .link {\n  bottom: 5rem;\n  left: 3rem;\n}\n.block:nth-child(1) .sec-info {\n  bottom: 3.5rem;\n  left: 3rem;\n}\n.block:nth-child(2) {\n  top: 35rem;\n  left: 135rem;\n}\n.block:nth-child(2) .sec-img {\n  margin-left: -10rem;\n  margin-top: -12rem;\n}\n.block:nth-child(2) .link {\n  color: #64B5F6;\n  top: 4rem;\n  left: 4rem;\n}\n.block:nth-child(2) .sec-info {\n  color: #64B5F6;\n  top: 2.5rem;\n  left: 4rem;\n}\n.block:nth-child(3) {\n  top: 80rem;\n  left: 120rem;\n}\n.block:nth-child(3) .sec-img {\n  margin-right: -5rem;\n  margin-top: 3rem;\n}\n.block:nth-child(3) .link {\n  color: #AB47BC;\n  top: 3rem;\n  left: 4rem;\n}\n.block:nth-child(3) .sec-info {\n  color: #AB47BC;\n  top: 6rem;\n  left: 4rem;\n}\n.block:nth-child(4) {\n  top: 70rem;\n  left: 40rem;\n}\n.block:nth-child(4) .prime-img {\n  display: block;\n}\n.block:nth-child(4) .sec-img {\n  display: block;\n  margin-left: 4rem;\n  margin-top: 2rem;\n}\n.block:nth-child(4) .link {\n  color: #EF5350;\n  top: 3rem;\n  right: 5rem;\n}\n.block:nth-child(4) .sec-info {\n  color: #EF5350;\n  top: 6rem;\n  right: 5rem;\n}\n.block:nth-child(5) {\n  top: 30rem;\n  left: 30rem;\n}\n.block:nth-child(5) .sec-img {\n  margin-left: -57rem;\n  margin-top: 3rem;\n}\n.block:nth-child(5) .link {\n  color: #4CAF50;\n  bottom: 4rem;\n  right: 3rem;\n}\n.block:nth-child(5) .sec-info {\n  color: #4CAF50;\n  bottom: 7rem;\n  right: 3rem;\n}\n.block img {\n  position: relative;\n  opacity: 0.3;\n  transition: opacity 0.3s, transform 0.5s 0.3s;\n  will-change: transform;\n}\n.block .prime-img {\n  z-index: 50;\n  width: 35rem;\n}\n.block .sec-img {\n  vertical-align: top;\n  z-index: 100;\n  width: 20rem;\n}\n.block .link {\n  position: absolute;\n  z-index: 200;\n  color: #fff;\n  font-family: Metropolis;\n  font-size: 3rem;\n  line-height: 1;\n  cursor: pointer;\n}\n.block .sec-info {\n  position: absolute;\n  z-index: 400;\n  color: #fff;\n  font-size: 1.5rem;\n  line-height: 1;\n  font-family: pfs-medium;\n  transform: rotateX(90deg);\n  opacity: 0;\n  transition: transform 0.5s cubic-bezier(0.53, 0.11, 0.76, 1.38), opacity 0.3s 0.5s;\n  will-change: transform;\n  transform-origin: 50% 100%;\n}\n.block:hover img {\n  opacity: 1;\n  transform: scale(1.3);\n}\n.block:hover .sec-info {\n  opacity: 1;\n  transform: rotateX(0deg);\n  transition: transform 0.5s 0.3s cubic-bezier(0.53, 0.11, 0.76, 1.38), opacity 0.3s;\n}<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&quot;,&quot;theme&quot;:&quot;cobalt&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}\">$(document).ready(function() {\n  \n  function debounce(func, wait, immediate) {\n    var timeout;\n    return function() {\n      var context = this, args = arguments;\n      clearTimeout(timeout);\n      timeout = setTimeout(function() {\n        timeout = null;\n        if (!immediate) func.apply(context, args);\n      }, wait);\n      if (immediate &amp;&amp; !timeout) func.apply(context, args);\n    };\n  };\n  \n  var winW = $(window).width(),\n      winH = $(window).height(),\n      winWHalf = winW \/ 2,\n      winHHalf = winH \/ 2,\n      $cont = $(&quot;.content&quot;),\n      $bg = $(&quot;.bg&quot;),\n      contW = $cont.width(),\n      contH = $cont.height(),\n      bgW = $bg.width(),\n      bgH = $bg.height(),\n      diffX = (winW - contW) \/2,\n      diffY = (winH - contH) \/2;\n  \n  var finalX = 0,\n      finalY = 0,\n      finalBgX = 0,\n      finalBgY = 0;\n  \n  var moveContent = function(e) {\n    console.log(bgW + &quot; &quot; + winW);\n    var x = e.pageX,\n        y = e.pageY;\n    \n    finalX = (x - winWHalf) * (contW \/ winW) \/ 2;\n    finalY = (y - winHHalf) * (contH \/ winH) \/ 2;\n    \n    finalBgX = (x - winWHalf) * (bgW \/ winW) \/ 20;\n    finalBgY = (y - winHHalf) * (bgH \/ winH) \/ 20;\n    \n    $cont.css(&quot;transform&quot;, &quot;translate3D(&quot; + (0 - finalX) + &quot;px, &quot; + (0 - finalY) + &quot;px, 0)&quot;);\n    \n    $bg.css(&quot;transform&quot;, &quot;translate3D(&quot; + (0 - finalBgX) + &quot;px, &quot; + (0 - finalBgY) + &quot;px, 0)&quot;);\n    \n  };\n  \n  $(document).on(&quot;mousemove&quot;, moveContent);\n  \n  $(window).on(&quot;resize&quot;, function() {\n    winW = $(window).width();\n    winH = $(window).height();\n    winWHalf = winW \/ 2;\n    winHHalf = winH \/ 2;\n    contW = $cont.width();\n    contH = $cont.height();\n    bgW = $bg.width();\n    bgH = $bg.height();\n    diffX = (winW - contW) \/2;\n    diffY = (winH - contH) \/2;\n    \n    moveContent({pageX: winWHalf, pageY: winHHalf});\n  });\n  \n});<\/pre><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":497,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[17],"class_list":["post-496","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-headermenu","tag-jquery"],"_links":{"self":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/comments?post=496"}],"version-history":[{"count":0,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media\/497"}],"wp:attachment":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}