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
2024-03-15 21:53:12 +01:00

55 lines
2 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'); %>
</head>