From: Jo-Philipp Wich Date: Fri, 9 Apr 2021 12:25:51 +0000 (+0200) Subject: luci-theme-openwrt-2020: honor CSS definitions passed by views X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=c5ff3244e92f267e3b7410b3196615f5fec75051;p=openwrt-luci.git luci-theme-openwrt-2020: honor CSS definitions passed by views Legacy Lua views might declare a global `css` variable to inject custom styles into the template header. Support this mechanism in the OpenWrt 2020 theme as well. Ref: https://github.com/openwrt/luci/issues/4972 Signed-off-by: Jo-Philipp Wich --- diff --git a/themes/luci-theme-openwrt-2020/luasrc/view/themes/openwrt2020/header.htm b/themes/luci-theme-openwrt-2020/luasrc/view/themes/openwrt2020/header.htm index f6ae02c212..6370ee4d1f 100644 --- a/themes/luci-theme-openwrt-2020/luasrc/view/themes/openwrt2020/header.htm +++ b/themes/luci-theme-openwrt-2020/luasrc/view/themes/openwrt2020/header.htm @@ -28,6 +28,10 @@ <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI +<% if css then %> +<% end -%>