hexo-theme-keep/layout/_partial/scripts.ejs

47 lines
1.0 KiB
Plaintext
Raw Normal View History

<%- __js([
'js/utils.js',
'js/main.js',
2020-04-18 17:26:29 +08:00
'js/header-shrink.js',
'js/back2top.js',
'js/dark-light-toggle.js'
2020-04-18 17:26:29 +08:00
]) %>
2020-04-21 10:47:36 +08:00
<%
const {
local_search: t_local_search,
code_copy: t_code_copy,
2022-10-17 21:54:21 +08:00
code_block: t_code_block,
lazyload: t_lazyload,
toc: t_toc,
pjax: t_pjax
} = theme
%>
<% if (t_local_search?.enable === true) { %>
<%- __js('js/local-search.js') %>
<% } %>
<% if (t_code_copy?.enable === true || t_code_block?.enable === true || t_code_block?.tools?.enable === true) { %>
2022-10-17 21:54:21 +08:00
<%- __js('js/code-block.js') %>
<% } %>
<% if (t_lazyload?.enable === true) { %>
2021-01-07 15:15:39 +08:00
<%- __js('js/lazyload.js') %>
<% } %>
<div class="post-scripts<%= theme.pjax?.enable === true ? ' pjax' : '' %>">
<% if (is_post()) { %>
<%- __js([
'js/post-helper.js',
'js/libs/anime.min.js'
]) %>
<% if (t_toc?.enable === true) { %>
<%- __js('js/toc.js') %>
<% } %>
2020-04-21 10:47:36 +08:00
<% } %>
</div>
2020-04-21 10:47:36 +08:00
<% if (t_pjax?.enable === true) { %>
<%- partial('pjax/pjax') %>
2020-04-21 10:47:36 +08:00
<% } %>