titledk/silverstripe-backgroundimages

Define background image based on images that your users upload (WIP)

2.0 2016-09-07 16:02 UTC

This package is not auto-updated.

Last update: 2024-12-21 20:30:37 UTC


README

Define background image based on images that your users upload.

Usage

/**
 * @return string
 */
public function getBackgroundCSS()
{
    return BackgroundImageStyle::create(
        $this->PrimaryImage()
    )
        ->getCSS();
}
<div style="$BackgroundCSS">
</div>
Identity:
  colors:
    primary: '#111'
    primary-gradient-start: '#222'
    primary-gradient-end: '#333'