4 * This file reads the style.ini of the used template and displays the
5 * replacements defined in it. Color replacements will be displayed
6 * visually. This should help with adjusting and using the styles
7 * specified in the style.ini
9 * @author Andreas Gohr <andi@splitbrain.org>
10 * @author Anika Henke <anika@selfthinker.org>
13 // phpcs:disable PSR1.Files.SideEffects
14 if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__
. '/../../');
15 if (!defined('NOSESSION')) define('NOSESSION', 1);
16 require_once(DOKU_INC
. 'inc/init.php');
19 <html lang
="en" dir
="ltr">
21 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8" />
22 <title
>Template Replacements
</title
>
25 background
-color
: #fff;
34 font
-family
: monospace
;
36 border
: 1px solid
#fff;
39 border
: 1px solid
#ccc;
43 border
: 1px
#000 solid;
49 // get merged style.ini
50 $styleUtils = new \dokuwiki\
StyleUtils($conf['template']);
51 $ini = $styleUtils->cssStyleini();
55 echo "<caption>" . hsc($conf['template']) . "'s style.ini</caption>";
56 foreach ($ini['replacements'] as $key => $val) {
58 echo '<td>' . hsc($key) . '</td>';
59 echo '<td>' . hsc($val) . '</td>';
61 if (preg_match('/^#[0-f]{3,6}$/i', $val)) {
62 echo '<div class="color" style="background-color:' . $val . ';"> </div>';
69 echo "<p>Non-existent or invalid template or style.ini: <strong>" . hsc($conf['template']) . "</strong></p>";