This repository has been archived on 2022-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
md-cms/manifest.php
Joshua Ramon Enslin 067beedf29 Improved settings of CSPs.
Added manifest.json.
Added further security-related HTTP headers.
2018-06-18 13:57:35 +02:00

41 lines
815 B
PHP

<?PHP
/**
* This file generates a web manifest based on the settings.
*
* @author Joshua Ramon Enslin <joshua@jrenslin.de>
*/
// Include functions and settings.
require_once __DIR__ . "/inc/functions.php";
// Ensure working environment for frontend.
ensureEnvironment();
// Fill output array
$data = [];
$data["name"] = $data['short_name'] = $settings['pageTitle'];
$data["start_url"] = "/";
$data["display"] = "standalone";
$data["background_color"] = "#000";
$data["theme_color"] = "#AFB42B";
$data["description"] = "Website of " . $settings['pageTitle'];
/*
$data['icons'] = [
"src" => $settings['logo'],
"type" => mime_content_type(__DIR__ . $settings['logo'])
];
*/
// Return JSON-encoded data.
header('Content-Type: application/json');
echo json_encode($data, JSON_PRETTY_PRINT);
?>