From 6137c9ff332e8cee4f72485b1e7bbcd20c53dec6 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 9 Apr 2021 14:25:51 +0200 Subject: [PATCH] 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 (cherry picked from commit c5ff3244e92f267e3b7410b3196615f5fec75051) --- .../luasrc/view/themes/openwrt2020/header.htm | 4 ++++ 1 file changed, 4 insertions(+) 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 fb0842df04..457703d764 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 -%>