This repository has been archived on 2024-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
svrjs-website/themes/svrjswebsite/layout/_partial/head.ejs

71 lines
2.7 KiB
Text

<head>
<%
var title = page.title;
if(is_current('/docs.html') || is_current('/docs/')) {
title = "Documentation - " + config.title;
} else if(title && !(is_home() || (is_current('/') || is_current('/index.html')))) {
title = title + " - " + config.title;
} else {
title = config.title + " - " + config.subtitle;
}
%>
<title><%= title %></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<% if(is_home() || (is_current('/') || is_current('/index.html'))) { %>
<%- open_graph({description: config.description, image: "https://svrjs.org/logo.png", title: title}); %>
<% } else if(is_page() && page.layout == 'error-page') { %>
<%- open_graph({description: "An error page."}); %>
<% } else { %>
<%- open_graph(); %>
<% } %>
<%- favicon_tag("/favicon.ico"); %>
<% if(is_home() || (is_current('/') || is_current('/index.html'))) { %>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "SVR.JS",
"downloadUrl": "https://svrjs.org",
"author": "SVR.JS Authors",
"applicationCategory": "BrowserApplication",
"offers": {
"@type": "Offer",
"price": "0"
},
"operatingSystem": "Windows, Linux, MacOS, Haiku, FreeBSD, OpenBSD, Solaris, AIX, Android",
"softwareVersion": "<%= page.svrjsversion %>"
}
</script>
<% } %>
<!--[if lt IE 9]><%- js('js/html5shiv.js') %><![endif]-->
<% if(!(is_page() && page.layout == "docs-page")) { %>
<%- css('css/main.css'); %>
<!--[if lte IE 7]><%- css('css/main-ie7.css'); %><![endif]-->
<% if(is_page() && page.layout == 'error-page') { %>
<%- css('css/error.css'); %>
<% } %>
<% } else { %>
<%- css('css/docs.css'); %>
<% } %>
<% if(is_home() || page.layout == 'index-page') { %>
<%- css('css/index-page.css'); %>
<% } %>
<%- css('css/highlight.css'); %>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.svrjs.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>