2022-02-04 09:53:55 +00:00
|
|
|
<?php
|
2022-02-04 11:52:57 +00:00
|
|
|
/**
|
|
|
|
|
* Generate dynamic CSS for randomising the background image.
|
|
|
|
|
*
|
|
|
|
|
* @author Dale Davies <dale@daledavies.co.uk>
|
|
|
|
|
* @license MIT
|
|
|
|
|
*/
|
|
|
|
|
|
2022-02-04 09:53:55 +00:00
|
|
|
// Provided by composer for psr-4 style autoloading.
|
|
|
|
|
require __DIR__ .'/vendor/autoload.php';
|
|
|
|
|
|
|
|
|
|
$config = new Jump\Config();
|
|
|
|
|
$backgroundfile = (new Jump\Background($config))->get_random_background_file();
|
|
|
|
|
|
|
|
|
|
header('Content-Type: text/css');
|
2022-02-14 22:06:00 +00:00
|
|
|
echo '.background {background-image: url("'.$backgroundfile.'");}';
|