From c5ff3244e92f267e3b7410b3196615f5fec75051 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 9 Apr 2021 14:25:51 +0200 Subject: 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 --- .../luci-theme-openwrt-2020/luasrc/view/themes/openwrt2020/header.htm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'themes/luci-theme-openwrt-2020/luasrc') 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 -%> -- cgit v1.2.3