i18n 1.0-beta11
xaoxuu 6 years ago
parent 4769b4b354
commit d2d0c16b2f
  1. 26
      layout/_partial/head.ejs
  2. 23
      layout/_partial/scripts.ejs

@ -36,18 +36,21 @@
<meta name="HandheldFriendly" content="True" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- link -->
<% if (config.import && config.import.link){ %>
<% (config.import.link||[]).forEach(function(item){ %>
<link rel="<%= item.rel %>" <% if (item.type){ %>type="<%= item.type %>"<% } %> <% if (item.sizes){ %>sizes="<%= item.sizes %>"<% } %> href="<%- item.href %>" <% if (item.color){ %>color="<%= item.color %>"<% } %>>
<% }) %>
<% } %>
<!-- meta -->
<% if (config.import && config.import.meta){ %>
<% (config.import.meta||[]).forEach(function(item){ %>
<meta name="<%= item.name %>" href="<%- item.content %>">
<meta name="<%= item.name %>" content="<%- item.content %>">
<% }) %>
<% } %>
<!-- link -->
<% if (config.import && config.import.link){ %>
<% (config.import.link||[]).forEach(function(item){ %>
<link rel="<%= item.rel %>" href="<%- item.href %>"
<% if (item.type){ %> type="<%= item.type %>"<% } %>
<% if (item.sizes){ %> sizes="<%= item.sizes %>"<% } %>
<% if (item.media){ %> media="<%= item.media %>"<% } %>
<% if (item.hreflang){ %> hreflang="<%= item.hreflang %>"<% } %>
<% if (item.color){ %> color="<%= item.color %>"<% } %>>
<% }) %>
<% } %>
@ -60,11 +63,6 @@
<%- css('style.css') %>
<% } %>
<% if (config.import && config.import.google_fonts && config.import.google_fonts.length > 0){ %>
<!-- google_fonts -->
<link href="<%= config.import.google_fonts %>" rel="stylesheet">
<% } %>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.6.3/css/all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css">

@ -11,6 +11,14 @@
}, false)
</script>
<% if (config.import && config.import.js == true) { %>
<%- js([theme.theme_info.cdn + 'js/app.js', theme.theme_info.cdn + 'js/search.js']) %>
<% } else if (config.import && config.import.js && config.import.js.length > 0) { %>
<%- js(config.import.js) %>
<% } else { %>
<%- js(['js/app.js', 'js/search.js']) %>
<% } %>
<% if (theme.search && theme.search.enable) { %>
<script>
var GOOGLE_CUSTOM_SEARCH_API_KEY = "<%- theme.search.google_api_key %>";
@ -28,17 +36,7 @@
</script>
<% } %>
<% if (config.import && config.import.js == true) { %>
<%- js([theme.theme_info.cdn + 'js/app.js', theme.theme_info.cdn + 'js/search.js']) %>
<% } else if (config.import && config.import.js && config.import.js.length > 0) { %>
<%- js(config.import.js) %>
<% } else { %>
<%- js(['js/app.js', 'js/search.js']) %>
<% } %>
<% if (page.comments) { %>
<% if ((page.layout == 'post' && page.comments != false) || page.comments == true) { %>
<% if (config.disqus_shortname){ %>
<script>
var disqus_shortname = '<%= config.disqus_shortname %>';
@ -96,13 +94,10 @@
highlight:'<%= config.valine.highlight %>'
})
</script>
<% } %>
<% } %>
<% } %>
<!-- leancloud_visitors -->
<% if (config.leancloud_visitors && config.leancloud_visitors.app_id && config.leancloud_visitors.app_key) { %>
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-leancloud@18.12.24/js/av-core-mini-0.6.4.js"></script>

Loading…
Cancel
Save