You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.9 KiB

7 years ago
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<%
var title = page.title;
if (is_archive()) {
title = 'Archives';
if (is_month())
title += ': ' + page.year + '/' + page.month;
else if (is_year())
title += ': ' + page.year;
}
else if (is_category())
title = 'Category: ' + page.category;
else if (is_tag())
title = 'Tag: ' + page.tag;
%>
<title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
6 years ago
<% if (page.keywords && config.keywords){ %>
6 years ago
<meta name="keywords" content="<%- page.keywords %>, <%- config.keywords %>">
6 years ago
<% } else if (page.keywords) { %>
6 years ago
<meta name="keywords" content="<%- page.keywords %>">
6 years ago
<% } else if (config.keywords) { %>
6 years ago
<meta name="keywords" content="<%- config.keywords %>">
6 years ago
<% } %>
6 years ago
<% if (page.description && config.description){ %>
<meta name="description" content="<%- page.description %>, <%- config.description %>">
<% } else if (page.description) { %>
<meta name="description" content="<%- page.description %>">
<% } else if (config.description) { %>
<meta name="description" content="<%- config.description %>">
<% } %>
<%- feed_tag(config.feed.path, {title: config.title}) %>
7 years ago
<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">
6 years ago
<!-- meta -->
<% if (config.import && config.import.meta){ %>
<% (config.import.meta||[]).forEach(function(item){ %>
6 years ago
<meta name="<%= item.name %>" content="<%- item.content %>">
<% }) %>
<% } %>
<!-- link -->
6 years ago
<% if (theme.services && theme.services.nodewaves == true) { %>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css">
<% } %>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.6.3/css/all.min.css">
6 years ago
<% 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 %>"<% } %>>
6 years ago
<% }) %>
<% } %>
6 years ago
<% if (theme.services && theme.services.cdn == true && config.theme_cdn) { %>
<% if (config.theme_cdn == true) { %>
<%- css(theme.info.cdn + 'css/style.css') %>
<% } else if (config.theme_cdn.length > 0) { %>
<%- css(config.theme_cdn + 'css/style.css') %>
<% } %>
<% } else { %>
6 years ago
<%- css('style.css') %>
<% } %>
6 years ago
<% if (config.import && config.import.css && config.import.css.length > 0) { %>
<%- css(config.import.css) %>
<% } %>
6 years ago
7 years ago
<script>
function setLoadingBarProgress(num) {
document.getElementById('loading-bar').style.width=num+"%";
}
</script>
6 years ago
6 years ago
<% if (config.google_analytics_key) { %>
6 years ago
<!-- ga -->
6 years ago
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6 years ago
ga('create', '<%- config.google_analytics_key %>', '<%- config.root_domain ? config.root_domain : config.url %>');
6 years ago
ga('send', 'pageview');
</script>
<% } %>
6 years ago
<% if (config.baidu_analytics_key) { %>
6 years ago
<!-- ba -->
6 years ago
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?<%= config.baidu_analytics_key %>";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<% } %>
7 years ago
</head>