2020-05-29 19:48:10 +03:00
|
|
|
<!--
|
|
|
|
JS selector for site.
|
|
|
|
-->
|
|
|
|
|
2021-07-01 11:20:36 +03:00
|
|
|
<!-- layout specified -->
|
|
|
|
|
2021-12-03 15:50:12 +03:00
|
|
|
{% if page.layout == 'post' %}
|
2021-04-06 09:05:55 +03:00
|
|
|
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
2021-01-23 10:07:18 +03:00
|
|
|
<!-- pv-report needs countup.js -->
|
|
|
|
<script async src="https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.min.js"></script>
|
2021-07-01 11:20:36 +03:00
|
|
|
<script defer src="{{ '/assets/js/dist/pvreport.min.js' | relative_url }}"></script>
|
2021-01-23 10:07:18 +03:00
|
|
|
{% endif %}
|
2020-12-04 09:18:25 +03:00
|
|
|
{% endif %}
|
2020-05-29 19:48:10 +03:00
|
|
|
|
2021-04-21 18:17:34 +03:00
|
|
|
{% if page.layout == 'post' or page.layout == 'page' %}
|
|
|
|
<!-- image lazy-loading & popup -->
|
2021-09-10 17:01:18 +03:00
|
|
|
<script src="https://cdn.jsdelivr.net/combine/npm/lozad/dist/lozad.min.js,npm/magnific-popup@1/dist/jquery.magnific-popup.min.js,npm/clipboard@2/dist/clipboard.min.js"></script>
|
2021-04-21 18:17:34 +03:00
|
|
|
{% endif %}
|
|
|
|
|
2021-01-23 10:07:18 +03:00
|
|
|
{% if page.layout == 'home'
|
2022-01-26 17:06:44 +03:00
|
|
|
or page.layout == 'post'
|
|
|
|
or page.layout == 'archives'
|
|
|
|
or page.layout == 'category'
|
|
|
|
or page.layout == 'tag' %}
|
|
|
|
|
|
|
|
{% if site.prefer_datetime_locale %}
|
|
|
|
{% assign locale = site.prefer_datetime_locale | downcase %}
|
|
|
|
{% else %}
|
|
|
|
{% assign locale = site.lang | split: '-' | first %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/combine/npm/dayjs@1,npm/dayjs@1/locale/{{ locale }}.min.js,npm/dayjs@1/plugin/relativeTime.min.js,npm/dayjs@1/plugin/localizedFormat.min.js"></script>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if page.layout == 'home'
|
|
|
|
or page.layout == 'categories'
|
|
|
|
or page.layout == 'post'
|
|
|
|
or page.layout == 'page' %}
|
2021-01-23 10:07:18 +03:00
|
|
|
{% assign type = page.layout %}
|
2022-01-26 17:06:44 +03:00
|
|
|
{% elsif page.layout == 'archives'
|
|
|
|
or page.layout == 'category'
|
|
|
|
or page.layout == 'tag' %}
|
|
|
|
{% assign type = "misc" %}
|
2021-01-23 10:07:18 +03:00
|
|
|
{% else %}
|
2021-04-21 18:17:34 +03:00
|
|
|
{% assign type = "commons" %}
|
2021-01-23 10:07:18 +03:00
|
|
|
{% endif %}
|
2020-05-29 19:48:10 +03:00
|
|
|
|
2021-01-23 10:07:18 +03:00
|
|
|
{% assign js = type | prepend: '/assets/js/dist/' | append: '.min.js' %}
|
|
|
|
<script defer src="{{ js | relative_url }}"></script>
|
2020-05-29 19:48:10 +03:00
|
|
|
|
2020-12-04 09:18:25 +03:00
|
|
|
{% if page.math %}
|
|
|
|
<!-- MathJax -->
|
2021-03-09 10:50:08 +03:00
|
|
|
<script>
|
2021-04-02 16:14:43 +03:00
|
|
|
/* see: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options> */
|
2021-03-09 10:50:08 +03:00
|
|
|
MathJax = {
|
|
|
|
tex: {
|
2021-04-02 16:14:43 +03:00
|
|
|
inlineMath: [ /* start/end delimiter pairs for in-line math */
|
2021-03-09 10:50:08 +03:00
|
|
|
['$','$'],
|
|
|
|
['\\(','\\)']
|
|
|
|
],
|
2021-04-02 16:14:43 +03:00
|
|
|
displayMath: [ /* start/end delimiter pairs for display math */
|
2021-03-09 10:50:08 +03:00
|
|
|
['$$', '$$'],
|
|
|
|
['\\[', '\\]']
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
|
|
|
<script type="text/javascript" id="MathJax-script" async
|
|
|
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
|
|
|
|
</script>
|
2020-12-04 09:18:25 +03:00
|
|
|
{% endif %}
|
2021-07-20 20:35:07 +03:00
|
|
|
|
|
|
|
<!-- commons -->
|
|
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/combine/npm/popper.js@1.16.1,npm/bootstrap@4/dist/js/bootstrap.min.js"></script>
|
|
|
|
|
|
|
|
{% if jekyll.environment == 'production' %}
|
|
|
|
<!-- PWA -->
|
|
|
|
<script defer src="{{ '/app.js' | relative_url }}"></script>
|
|
|
|
|
|
|
|
<!-- GA -->
|
2022-01-14 14:01:22 +03:00
|
|
|
{% if site.google_analytics.id != empty and site.google_analytics.id %}
|
2021-07-20 20:35:07 +03:00
|
|
|
{% include google-analytics.html %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|