window.addEventListener('load', function () {
    var codeSampes = document.querySelectorAll('.code-sample-toggle');
    
    function codeSampleToggle() {
        var toggleClass = function (codeSamle) {
            if (codeSamle.classList.contains('hide-sample') !== true) {
                codeSamle.classList.add('hide-sample');
                codeSamle.querySelector('span').innerHTML = 'Hide';
                codeSamle.parentNode.querySelector('.code').classList.add('show');
            } else {
                codeSamle.classList.remove('hide-sample');
                codeSamle.querySelector('span').innerHTML = 'Show';
                codeSamle.parentNode.querySelector('.code').classList.remove('show');
            }
            activateMenu();
        };
        
        [].forEach.call(codeSampes, function (codeSamle) {
            codeSamle.addEventListener('click', function () {
                toggleClass(codeSamle)
            })
        })
    }
    
    function allCodeSample() {
        var toggleClass = function (toggler) {
            if (toggler.classList.contains('active') !== true) {
                [].forEach.call(codeSampes, function (codeSamle) {
                    toggler.classList.add('active');
                    toggler.querySelector('span').innerHTML = 'Hide';
                    codeSamle.classList.add('hide-sample');
                    codeSamle.querySelector('span').innerHTML = 'Hide';
                    codeSamle.parentNode.querySelector('.code').classList.add('show');
                });
            } else {
                [].forEach.call(codeSampes, function (codeSamle) {
                    toggler.classList.remove('active');
                    toggler.querySelector('span').innerHTML = 'Show';
                    codeSamle.classList.remove('hide-sample');
                    codeSamle.querySelector('span').innerHTML = 'Show';
                    codeSamle.parentNode.querySelector('.code').classList.remove('show');
                });
            }
            activateMenu();
        }
        document.getElementById('all-code-toggler').addEventListener('click', function () {
            toggleClass(this);
        });
    }
    
    codeSampleToggle();
    allCodeSample();
    
    
    smoothScroll.init({
        selector: '[data-scroll]', // Selector for links (must be a class, ID, data attribute, or element tag)
        speed: 500, // Integer. How fast to complete the scroll in milliseconds
        easing: 'easeInSine', // Easing pattern to use
        offset: - 1, // Integer. How far to offset the scrolling anchor location in pixels
    });
    
    smoothScroll.init({
        selector: '#sidebar.open [data-scroll]', // Selector for links (must be a class, ID, data attribute, or element tag)
        speed: 0, // Integer. How fast to complete the scroll in milliseconds
        offset: - 1, // Integer. How far to offset the scrolling anchor location in pixels
        callback: function (anchor, toggle) {
            document.getElementById('sidebar').classList.remove('open');
        }
    });
    
    function animateOnLoad() {
        if (window.location.hash) {
            var anchor = document.querySelector(window.location.hash);
            smoothScroll.animateScroll(anchor);
        }
    }
    
    animateOnLoad();
    
    
    var positonAnchors = document.querySelectorAll('.positon-anchor');
    
    function activateMenu() {
        var section = {}, i = 0;
        window.onscroll = function () {
            [].forEach.call(positonAnchors, function (positonAnchor) {
                section[positonAnchor.id] = positonAnchor.offsetTop;
            });
            var windowPosition = document.body.scrollTop;
            for (i in section) {
                var sectionHeight = document.getElementById(i).offsetHeight;
                var target = document.querySelector('#left-menu a[href="#' + i + '"]');
                if (windowPosition >= section[i] && windowPosition < (section[i] + sectionHeight)) {
                    if (target.classList.contains('active') === true) {
                        continue;
                    }
                    target.classList.add('active');
                    history.replaceState(null, null, '#' + i);
                } else {
                    target.classList.remove('active');
                }
            }
        }
    }
    
    activateMenu();
    document.addEventListener('resize', activateMenu)
    document.getElementById('open-menu').addEventListener('click', function () {
        document.getElementById('sidebar').classList.toggle('open');
    })
});

@@ -4625,12 +4625,264 @@
 %0A    %7D)%0A
+    window.addEventListener('resize', () =%3E %7B%0A        if (location.hash) %7B%0A            const targetEl = document.querySelector(location.hash);%0A            const posstion = targetEl.offsetTop;%0A            window.scrollTo(0, posstion);%0A        %7D%0A    %7D);%0A
 %7D);%0A

add move to id on resize