31 lines
848 B
Handlebars
31 lines
848 B
Handlebars
<header>
|
|
<style>
|
|
|
|
</style>
|
|
</header>
|
|
|
|
|
|
<div style="width:100%;height:calc(100% - 64px);">
|
|
<div id="jsonStyleTree" class="json-tree"></div>
|
|
</div>
|
|
|
|
<script>
|
|
fetch('/api/styles/get', { method: 'POST' })
|
|
.then(res => res.json())
|
|
.then(json => {
|
|
const tree = createJsonTree({
|
|
container: document.getElementById("jsonStyleTree"),
|
|
data: json,
|
|
expandInitially: true,
|
|
onSave: json => {
|
|
fetch('/api/styles/save', {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify(tree.getChanges(), null, 2)
|
|
}).then(() => writeEventLog(0, 'Stylesheet', JSON.stringify(tree.getChanges())) );
|
|
}
|
|
});
|
|
});
|
|
|
|
</script>
|