Sha256: ec2aea2d628cc1bfc1d62832c3790baedbb1e2bc7a0738d299c89abeaa32d61c

Contents?: true

Size: 586 Bytes

Versions: 7

Compression:

Stored size: 586 Bytes

Contents

{% if include.selector %}
    {% assign selector = include.selector %}
{% endif %}

{% if include.seed %}
    {% assign seed = include.seed %}
{% endif %}

<script src="https://cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script>
<script>
    function setRandomBgImage(selector, seed) {
        var pattern = GeoPattern.generate(seed);
        var element = document.querySelector(selector)
        if (element) {
            element.style.backgroundImage = pattern.toDataUrl();
        }
    }
    setRandomBgImage('{{ selector }}', '{{ seed }}');
</script>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
redeyed-jekyll-theme-0.1.7 _includes/extensions/geopattern.html
redeyed-jekyll-theme-0.1.6 _includes/extensions/geopattern.html
redeyed-jekyll-theme-0.1.5 _includes/extensions/geopattern.html
redeyed-jekyll-theme-0.1.4 _includes/extensions/geopattern.html
redeyed-jekyll-theme-0.1.3 _includes/extensions/geopattern.html
redeyed-jekyll-theme-0.1.2 _includes/extensions/geopattern.html
redeyed-jekyll-theme-0.1.1 _includes/extensions/geopattern.html