/*
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
const config = require('./config')
const {encode} = require('html-entities');
function html_head(options) {
let canonical_url = `${config.origin}/${options.page === 'index' ? '' : options.page}`;
let html = ``;
html += ``;
html += ``;
html += `
`;
// meta tags
html += ``;
html += ``;
html += ``;
// title
html += `${encode(options.title ?? 'Puter')}`;
// favicons
html += `
`;
// Roboto font
html += ``;
// canonical link
html += ``;
// preload images
if(options.page === 'index'){
html += ``;
html += ``;
}
// Facebook meta tags
html += ``;
html += ``;
html += ``;
html += ``;
html += ``;
// Twitter meta tags
html += ``;
html += ``;
html += ``;
html += ``;
html += ``;
html += ``;
// CSS
html += ``;
html += ``;
html += ``;
html += ``;
if(options.show_navbar ?? false){
html += ``;
html += `