Skip to content

Commit

Permalink
feat: fix head inject in body after enabling preloader #321
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanNotFound committed Jan 28, 2024
1 parent 72f3a8a commit 8b32836
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions layout/_partials/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@

<%- renderCSS('fonts/Chillax/chillax.css') %>

<!--- Inject Part-->
<% if (theme.inject.enable == true) { %>
<% for (let i in theme.inject.head) { %>
<% if (theme.inject.head[i] !== null){ %>
<% if (theme.global.single_page == true) { %>
<%- theme.inject.head[i].replace("<script", "<script data-swup-reload-script") %>
<% } else { %>
<%- theme.inject.head[i] %>
<% } }%>
<% } }%>

<% if (theme.global.preloader) { %>
<%- partial('_partials/preloader') %>
<% } %>
Expand Down Expand Up @@ -104,16 +115,7 @@
<link href="<%- theme.global.fonts.english.url %>" rel="stylesheet">
<% } %>

<!--- Inject Part-->
<% if (theme.inject.enable == true) { %>
<% for (let i in theme.inject.head) { %>
<% if (theme.inject.head[i] !== null){ %>
<% if (theme.global.single_page == true) { %>
<%- theme.inject.head[i].replace("<script", "<script data-swup-reload-script") %>
<% } else { %>
<%- theme.inject.head[i] %>
<% } }%>
<% } }%>

<%- export_config() %>

<!--- Fontawesome Part-->
Expand Down

0 comments on commit 8b32836

Please sign in to comment.