{"id":1161,"date":"2023-04-04T18:25:25","date_gmt":"2023-04-04T15:25:25","guid":{"rendered":"https:\/\/notes.profidev.online\/?p=1161"},"modified":"2023-04-04T18:25:26","modified_gmt":"2023-04-04T15:25:26","slug":"svg-burger","status":"publish","type":"post","link":"https:\/\/notes.profidev.online\/ru\/elements\/1161\/","title":{"rendered":"SVG Burger"},"content":{"rendered":"<figure class=\"wp-block-video\"><video height=\"307\" style=\"aspect-ratio: 649 \/ 307;\" width=\"649\" controls src=\"https:\/\/notes.profidev.online\/wp-content\/uploads\/2023\/04\/vokoscreenng-2023-04-04_17-22-32.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;button onclick=&quot;onToggle()&quot;&gt;\n    &lt;svg version=&quot;1.1&quot; id=&quot;Layer_1&quot; xmlns=&quot;http:\/\/www.w3.org\/2000\/svg&quot; xmlns:xlink=&quot;http:\/\/www.w3.org\/1999\/xlink&quot; x=&quot;0px&quot; y=&quot;0px&quot;\n       viewbox=&quot;0 0 512 512&quot; style=&quot;overflow: visible; enable-background:new 0 0 512 512;&quot; xml:space=&quot;preserve&quot;&gt;\n    &lt;g&gt;\n      &lt;path id=&quot;burger-bar-one&quot; class=&quot;path-1 path&quot; d=&quot;M50,116.7l404.2-0.2c0,0,84,12.4,140,10.4s97-96,86-127s-83.3-93.3-142,0s-84,116.6-84,116.6L50,391.3&quot;\/&gt;\n    &lt;\/g&gt;\n    &lt;g&gt;\n      &lt;path id=&quot;burger-bar-two&quot; class=&quot;path&quot; d=&quot;M462,391.1l-412,0.2c0,0-98.6,15.7-98.8,71.7c-0.2,36,93,90,147,96c32.7,3.6,247.4,0.9,343-54        C521.1,459,462,391.1,462,391.1L50,116.7&quot;\/&gt;\n    &lt;\/g&gt;\n    &lt;line id=&quot;burger-bar-three&quot; class=&quot;path&quot; x1=&quot;50&quot; y1=&quot;256&quot; x2=&quot;462&quot; y2=&quot;256&quot;\/&gt;\n    &lt;\/svg&gt;\n  &lt;\/button&gt;\n  &lt;div class=&quot;text-area&quot;&gt;\n    &lt;a target=&quot;_blank&quot; href=&quot;http:\/\/dewwwald.com&quot;&gt;dewwwald.com&lt;\/a&gt;&lt;br\/&gt;\n    click below\n  &lt;\/div&gt;\n  &lt;script src=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/gsap\/1.19.1\/plugins\/CSSPlugin.min.js&quot;&gt;&lt;\/script&gt;\n  &lt;script src=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/gsap\/1.19.1\/easing\/EasePack.min.js&quot;&gt;&lt;\/script&gt;\n  &lt;script src=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/gsap\/1.19.1\/TweenLite.min.js&quot;&gt;&lt;\/script&gt;<\/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;}\">body {\n  background-color: #ef5435;\n  color: white;\n  font-family: sans-serif;\n}\n\n.text-area {\n  text-align: center;\n}\n\na {\n  color: white;\n  cursor: pointer;\n}\na:hover {\n  stroke: #faccc3;\n}\n\nbutton {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  background-color: transparent;\n  -webkit-appearance: none;\n  border: none;\n  outline: none;\n  stroke: white;\n  cursor: pointer;\n  transition: all 175ms ease-in-out;\n}\nbutton:hover {\n  stroke: #faccc3;\n}\n\nsvg {\n  width: 100px;\n}\n\n#burger-bar-one {\n  opacity: 1;\n  stroke-dasharray: 412px 1500px;\n}\n\n#burger-bar-two {\n  opacity: 1;\n  stroke-dasharray: 412px 1500px;\n}\n\n#burger-bar-three {\n  opacity: 1;\n}\n\n.path {\n  fill: transparent;\n  stroke-width: 67px;\n  stroke: #000000;\n  stroke-linecap: round;\n  opacity: 0;\n  stroke: inherit;\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;}\">let toggled = false;\n\nlet barOne = document.getElementById('burger-bar-one');\nlet barTwo = document.getElementById('burger-bar-two');\nlet barThree = document.getElementById('burger-bar-three');\n\n\nfunction onToggle() {\n  if (!toggled) {\n    toggled = !toggled;\n    TweenLite.to(barOne, .5, { strokeDashoffset:-1076} );\n    TweenLite.to(barTwo, .5, { strokeDashoffset:-1250} );\n    TweenLite.to(barThree, .5, { opacity: 0, x: -1000 });\n  } else {\n    toggled = !toggled;\n    TweenLite.to(barOne, .5, { strokeDashoffset:0} );\n    TweenLite.to(barTwo, .5, { strokeDashoffset:0} );\n    TweenLite.to(barThree, .5, { opacity: 1, x: 0 });\n  }\n}<\/pre><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1163,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[65],"class_list":["post-1161","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-elements","tag-burger"],"_links":{"self":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1161","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=1161"}],"version-history":[{"count":1,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1161\/revisions"}],"predecessor-version":[{"id":1164,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1161\/revisions\/1164"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media\/1163"}],"wp:attachment":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media?parent=1161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/categories?post=1161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/tags?post=1161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}