<head>
{% if editmode %}<link rel="stylesheet" href="{{ site.static_asset_host }}/libs/edicy-tools/latest/edicy-tools.css">{% endif %}
</head>
<body>
{% if editmode %}
<button class="bg-settings-toggle" data-bg="{{ page.data.bg | json | escape }}"></button>
{% endif %}
{% editorjsblock %}
<script src='{{ site.static_asset_host }}/libs/edicy-tools/latest/edicy-tools.js'></script>
<script>
var bgPicker = new Edicy.BgPicker($('.bg-settings-toggle'), {
preview: function(data) {
// data contains image and color info
// Fired every time color or image is changed
// Use this for previewing changes to user
},
commit: function(data) {
// Fired when modal is closed
// Save page.data.bg value here
}
});
</script>
{% endeditorjsblock %}
</body>