Closed ghost closed 9 years ago
Sorry, it seems to be the normal behavior of Kirby - nothing to do with your plugin.
To get around this I style the element as I would normally with CSS. Then I create a CSS overrides snippet which I include in the
just below my CSS file.The snippet would look something like this:
<style>
<?php if(!$site->bgcolor()->empty()):?>
body{
background-color: <?= $site->bgcolor(); ?>;
}
<?php endif;?>
</style>
I recently used this technique to created a portfolio theme for Kirby with a ton of custom settings. https://dribbble.com/shots/2121204-Vessel-Theme
The theme lets you customize just about everything. The background color, text color, link color, max number of columns, the aspect ratio of the grid images, wether they are cropped or not (uses masonry if they are not cropped) You can even upload a custom svg logo and change the color of it's fills from within the panel.
Hope that helps you!
In blueprint
site.php
:Calling to
$site->covercolor()
won't return the expected color#FFFF00
until the site fields are explicitely saved in the panel.PS. Nice plugin. Thanks!