liquid_feedback_frontend
view app/main/api/style.lua @ 1719:9b8dc1828f1f
If only one policy is available, choose it automatically
author | bsw |
---|---|
date | Mon Sep 27 13:07:56 2021 +0200 (2021-09-27) |
parents | 32cc544d5a5b |
children |
line source
1 slot.set_layout(nil, "application/json")
4 local r = json.object{
5 color = json.object()
6 }
8 local style = execute.chunk{ module = "style", chunk = "_style", params = { style = config.style } }
10 if style.color_md then
11 r.color.md = {}
12 for k, v in pairs(style.color_md) do
13 r.color.md[k] = v
14 end
15 end
17 if style.color_rgb then
18 r.color.rgb = {}
19 for k, v in pairs(style.color_rgb) do
20 r.color.rgb[k] = v
21 end
22 end
24 slot.put_into("data", json.export(json.object{ result = r }))