 {% unless page.no_back_top %}
  <script type="text/javascript">
    window.onscroll = function() {scrollFunction()};

    function scrollFunction() {
      if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
        document.getElementById("top").style.display = "block";
      } else {
        document.getElementById("top").style.display = "none";
      }
    }

    $('#top').click(function(){
      $('html, body').animate({
        scrollTop: 0
      }, 200);
    });
  </script>