{% if jekyll.environment == 'production' and site.google_analytics %}
  {% include google-analytics.html %}
{% endif %}

<script async src="{{ '/assets/javascripts/main.js' | relative_url }}"></script>

<!-- <script type="text/javascript" src="/assets/js/back-to-top.js"></script> -->

<!-- <script src="/assets/js/jquery-4.0.0-beta.2.min.js"></script> -->

<!-- MathJax -->
<script src="/assets/js/mathjax.js"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

<script type="text/javascript" src="/assets/js/post.js"></script>

<script src="/assets/js/vanilla-back-to-top.min.js"></script>
<!-- <script>addBackToTop()</script> default -->		
<script>addBackToTop({
  diameter: 40,
  backgroundColor: '#4c4f69',
  innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><path fill="currentColor" d="M32 2L16 18h10v15h12V18h10zm0 60c-3.308 0-6-2.848-6-6.348v-9.307C26 42.848 28.692 40 32 40s6 2.848 6 6.346v9.307C38 59.152 35.308 62 32 62m0-18.617c-1.654 0-3 1.33-3 2.963v9.307c0 1.633 1.346 2.965 3 2.965s3-1.332 3-2.965v-9.307c0-1.633-1.346-2.963-3-2.963M22 40H10v3h4.5v19h3V43H22zm26 0h-6v22h3v-9.309h3c3.308 0 6-2.848 6-6.348C54 42.846 51.308 40 48 40m0 9.309h-3v-5.926h3c1.654 0 3 1.328 3 2.961s-1.346 2.965-3 2.965"/><title>Go to top</title></svg>',	
  textColor: '#cdd6f4',
})</script>
<style>
  #back-to-top {
    border: 1px solid #cdd6f4;  
    bottom: 160px;
    right: 34px;
    box-shadow: 0 4px 5px 0 #717f93;
    transition: all .2s ease-out;
    opacity: 0.8;
  }
  #back-to-top svg {
    display: block;
    fill: currentColor;
    height: 24px;
    margin: 8px auto 0;
    width: 24px;
  }
  #back-to-top:hover {
    background: #00b3ff;
    color: #000;
    transform: translateY(-3px);
    transition: background .3s ease-out;
    opacity: unset; 
  }		
</style>

<script type="text/javascript" src="/assets/js/SmoothScroll.min.js"></script>
<script>
SmoothScroll({
// Время прокрутки, например: 400 = 0.4 секунды
animationTime : 800,
// Размер шага (в пикселях)
stepSize : 75,

// Доп настройки:

// Ускорение
accelerationDelta : 30,
// Максимальное ускорение
accelerationMax : 2,

// Поддержка клавиатуры
keyboardSupport : true,
// Шаг прокрутки стрелками на клавиатуре (в пикселях)
arrowScroll : 50,

// Pulse (less tweakable)
// ratio of "tail" to "acceleration"
pulseAlgorithm : true,
pulseScale : 4,
pulseNormalize : 1,

// Поддержка тачпада
touchpadSupport : true,
})
</script>

{% if site.search %}
  {%- assign search_provider = site.search_provider | default: "lunr" -%}
  {%- case search_provider -%}
    {%- when "lunr" -%}
      {% include search/lunr-search-scripts.html %}
    {%- when "algolia" -%}
      {% include search/algolia-search-scripts.html %}
  {%- endcase -%}
{% endif %}
