added customization from json config file

This commit is contained in:
Tristan Schneider 2020-12-10 18:53:11 +01:00
parent fc2da854da
commit c9c3ed7a59

View File

@ -38,19 +38,22 @@ if (array_key_exists("submitted", $_REQUEST)) {
header("location: ".htmlentities($_SERVER['PHP_SELF']));
}
$raw_json_config = file_get_contents("data/config.json");
$config_data = json_decode($raw_json_config, false);
?>
<html>
<head>
<title>One Word Each</title>
<title><?php print($config_data->title ?? "One Word Each"); ?></title>
<link rel="stylesheet" href="style.css">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="<?php print($config_data->logo->icon_path ?? "favicon.ico"); ?>" type="image/x-icon">
</head>
<body>
<table>
<tr>
<td width="50%"><img src="OWE_Logo.png" width="90%"></td>
<td><h1>One Word Each Seite</h1></td>
<td width="50%"><img src="<?php print($config_data->logo->image_path ?? "OWE_Logo.png"); ?>" width="90%"></td>
<td><h1><?php print($config_data->headline ?? "One Word Each Seite"); ?></h1></td>
</tr>
<table>