convert import styles to themepark

Introduces presets which avoid much of the previous configuration
duplication. The original import files are now thin wrappers around
the themepark themes.
This commit is contained in:
Sarah Hoffmann
2024-12-06 12:12:27 +01:00
parent d1b7c14f79
commit 59bce26afe
15 changed files with 442 additions and 457 deletions

View File

@@ -4,6 +4,10 @@ local flex = require('themes/nominatim/init')
function flex.load_topic(name, cfg)
local topic_file = debug.getinfo(1, "S").source:sub(2):match("(.*/)") .. 'themes/nominatim/topics/'.. name .. '.lua'
if topic_file == nil then
error('Cannot find topic: ' .. name)
end
loadfile(topic_file)(nil, flex, cfg or {})
end