mirror of
https://github.com/daledavies/jump.git
synced 2025-11-17 02:10:42 +01:00
16 lines
449 B
PHP
16 lines
449 B
PHP
<?php
|
|
/**
|
|
* Generate dynamic CSS for randomising the background image.
|
|
*
|
|
* @author Dale Davies <dale@daledavies.co.uk>
|
|
* @license MIT
|
|
*/
|
|
|
|
// 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');
|
|
echo '.background {background-image: url("'.$backgroundfile.'");}'; |