liquid_feedback_frontend

diff app/main/api/style.lua @ 1309:32cc544d5a5b

Cumulative patch for upcoming frontend version 4
author bsw/jbe
date Sun Jul 15 14:07:29 2018 +0200 (2018-07-15)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/api/style.lua	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -0,0 +1,24 @@
     1.4 +slot.set_layout(nil, "application/json")
     1.5 +
     1.6 +
     1.7 +local r = json.object{
     1.8 +  color = json.object()
     1.9 +}
    1.10 +
    1.11 +local style = execute.chunk{ module = "style", chunk = "_style", params = { style = config.style } }
    1.12 +
    1.13 +if style.color_md then
    1.14 +  r.color.md = {}
    1.15 +  for k, v in pairs(style.color_md) do
    1.16 +    r.color.md[k] = v
    1.17 +  end
    1.18 +end
    1.19 +
    1.20 +if style.color_rgb then
    1.21 +  r.color.rgb = {}
    1.22 +  for k, v in pairs(style.color_rgb) do
    1.23 +    r.color.rgb[k] = v
    1.24 +  end
    1.25 +end
    1.26 +
    1.27 +slot.put_into("data", json.export(json.object{ result = r }))

Impressum / About Us