From 745920eb08b63944ea03cb140dbe4033d7467973 Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Mon, 17 Sep 2012 14:20:36 +0000 Subject: applications: add freifunk widgets app to customize the index page --- .../luasrc/view/freifunk/widgets/html/main.htm | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 applications/luci-freifunk-widgets/luasrc/view/freifunk/widgets/html/main.htm (limited to 'applications/luci-freifunk-widgets/luasrc/view/freifunk/widgets/html/main.htm') diff --git a/applications/luci-freifunk-widgets/luasrc/view/freifunk/widgets/html/main.htm b/applications/luci-freifunk-widgets/luasrc/view/freifunk/widgets/html/main.htm new file mode 100644 index 0000000000..f59a9302d3 --- /dev/null +++ b/applications/luci-freifunk-widgets/luasrc/view/freifunk/widgets/html/main.htm @@ -0,0 +1,28 @@ +<% +--local utl = require "luci.util" +local fs = require "luci.fs" +local title = data.title +local file = "/usr/share/customtext/" .. name .. ".html" +local text = fs.readfile(file) +local width = data.width or "100%" +local pr = data.paddingright or "0" +if type(width) == "number" then + width = width .. "px" +end + +%> + +
+
+ <% if title then %> +

<%=title%>

+ <% end %> + <% if text then %> + <%=text%> + <%else%> + <%:Could not load the custom text from%> "<%=file%>!" + <%end%> + + <%=data.text%> +
+
-- cgit v1.2.3