titledk/silverstripe-backgroundimages

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

Maintainers

Package info

github.com/titledk/silverstripe-backgroundimages

Type:silverstripe-module

pkg:composer/titledk/silverstripe-backgroundimages

Statistics

Installs: 263

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

2.0 2016-09-07 16:02 UTC

This package is not auto-updated.

Last update: 2026-03-01 03:04:41 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'