<%- renderJSModule([
    'js/tools/imageViewer.js',
    'js/utils.js',
    'js/main.js',
    'js/layouts/navbarShrink.js',
    'js/tools/scrollTopBottom.js',
    'js/tools/lightDarkSwitch.js',
    'js/layouts/categoryList.js'
]) %>

<% if (theme.navbar.search.enable) { %>
    <%- renderJSModule('js/tools/localSearch.js') %>
<% } %>

<% if (theme.articles.code_block.copy) { %>
    <%- renderJSModule('js/tools/codeBlock.js') %>
<% } %>

<% if (theme.articles.lazyload) { %>
    <%- renderJSModule('js/layouts/lazyload.js') %>
<% } %>

<% if (theme.footer.runtime) { %>
    <%- renderJS('js/tools/runtime.js') %>
    <%- renderJS('js/libs/odometer.min.js') %>
    <%- renderCSS('assets/odometer-theme-minimal.css') %>
<% } %>

<% if (theme.home_banner.subtitle.length !== 0) { %>
  <%- renderJS('js/libs/Typed.min.js') %>
  <%- renderJSModule('js/plugins/typed.js') %>
<% } %>

<% if (theme.plugins.mermaid.enable) { %>
    <%- renderJS('js/libs/mermaid.min.js') %>
    <%- renderJS('js/plugins/mermaid.js') %>
<% } %>

<% if (theme.masonry || theme.photos || theme.gallery) { %>
    <%- renderJS('js/libs/minimasonry.min.js') %>
    <%- renderJSModule('js/plugins/masonry.js') %>
<% } %>

<% if (!theme.global.preloader) { %>
    <%- renderJS('js/libs/anime.min.js')%>
<% } %>

<div class="post-scripts" <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
    <% if (theme.articles.toc.enable) { %>
        <%- renderJSModule([
            'js/tools/tocToggle.js',
            'js/layouts/toc.js',
            'js/plugins/tabs.js'
        ]) %>
    <% } %>
</div>
