fablab-luenen / dokuwiki-krypton

Nice (simple, modern, polished) DokuWiki theme.
https://wiki.fablab-luenen.de/
Other
8 stars 2 forks source link

Add site theme color #44

Closed solarkraft closed 3 years ago

solarkraft commented 3 years ago

https://developers.google.com/web/updates/2015/08/using-manifest-to-set-sitewide-theme-color

solarkraft commented 3 years ago

Should be configurable

solarkraft commented 3 years ago

Dokuwiki seems to already have a manifest.json (... why?): https://www.dokuwiki.org/devel:manifest This is automatically takes __background_alt__: https://www.dokuwiki.org/devel:style.ini

solarkraft commented 3 years ago

But doesn't seem to be active. Maybe the theme disables it. Fine by me generally, but ... theme color replacements only work in imported CSS?

solarkraft commented 3 years ago

Perhaps the styling plugin has a way to access style.ini from php ... https://www.dokuwiki.org/plugin:styling?s[]=style&s[]=ini

solarkraft commented 3 years ago

Looks like the accent color is now __theme_color__: https://github.com/selfthinker/dokuwiki_template_starter/commit/9d210bc0cd38ce0e44427a3027486e59a3396c13

solarkraft commented 3 years ago

The manifest thing works, but integrating it into the CSS doesn't. __theme_color__ isn't replaced and @ini_theme_color is caught by SASS.

solarkraft commented 3 years ago

Replacements seemingly just don't work. Tested with

background-color: unquote("@ini_background");
background-color: __background__;
solarkraft commented 3 years ago

Oh right.

<!-- 
        I know the CSS and JS imports can be done within the style.ini and script.js files,
        but I had some issues with styling (and import order) there, so I'm doing those imports here. 
        -->
        <!--     Fonts and icons  -->
        <link href="<?php echo tpl_basedir(); ?>assets/css/fonts.css" rel="stylesheet">
        <!-- CSS Files -->
        <link href="<?php echo tpl_basedir(); ?>assets/css/doku.css" rel="stylesheet" />