diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index eb6f6ee..715f561 100755 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -1,5 +1,3 @@ - - @@ -36,12 +34,28 @@ - - <%- css('style.css') %> - <%- css('fontawesome-free-5.6.3-web/css/all.min.css') %> - <% if (config.google_fonts){ %> - + + <% if (config.import && config.import.style == true) { %> + <%- css('//cdn.jsdelivr.net/gh/xaoxuu/blog@gh-pages/style.css') %> + <% } else if (config.import && config.import.style && config.import.style.length > 0){ %> + <%- css(config.import.style) %> + <% } else { %> + <%- css('style.css') %> + <% } %> + + + <% if (config.import && config.import.fontawesome == true) { %> + <%- css('//cdn.jsdelivr.net/gh/xaoxuu/cdn@master/fontawesome/5.6.3/css/all.min.css') %> + <% } else if (config.import && config.import.fontawesome && config.import.fontawesome.length > 0){ %> + <%- css(config.import.fontawesome) %> + <% } else { %> + <%- css('fontawesome-free-5.6.3-web/css/all.min.css') %> + <% } %> + + + <% if (config.import && config.import.google_fonts && config.import.google_fonts.length > 0){ %> + <% } %> + <% } %>
<% if(isPostList){ %> diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index 7778ba5..2dc0102 100755 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -1,11 +1,10 @@ - + - + -<%- js('js/jquery.fitvids.js') %> <% if (theme.search && theme.search.enable) { %> <% } %> -<%- js('js/search.js') %> -<%- js('js/app.js') %> + + +<% if (config.import && config.import.js == true) { %> + <%- js('https://cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-material-x@master/source/js/search.js') %> + <%- js('https://cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-material-x@master/source/js/app.js') %> +<% } else if (config.import && config.import.js && config.import.js.length > 0) { %> + <% (config.usecdn||[]).forEach(function(cdn_url){ %> + <%- js(cdn_url) %> + <% }) %> +<% } else { %> + <%- js('js/search.js') %> + <%- js('js/app.js') %> +<% } %> + <% if (page.comments) { %> <% if (config.disqus_shortname){ %> diff --git a/layout/layout.ejs b/layout/layout.ejs index c094b77..5b06b49 100755 --- a/layout/layout.ejs +++ b/layout/layout.ejs @@ -1,3 +1,5 @@ + + <%- partial('_partial/head') %> <%- partial('_partial/loading') %> @@ -20,3 +22,4 @@ <%- partial('_partial/scripts') %> + diff --git a/source/js/app.js b/source/js/app.js index 8744e53..6a08200 100755 --- a/source/js/app.js +++ b/source/js/app.js @@ -200,7 +200,7 @@ var customSearch; setScrollReveal(); setTocToggle(); - $(".article .video-container").fitVids(); + // $(".article .video-container").fitVids(); setTimeout(function () { $('#loading-bar-wrapper').fadeOut(500);