applications: add freifunk widgets app to customize the index page
[project/luci.git] / applications / luci-freifunk-widgets / luasrc / view / freifunk / widgets / iframe / main.htm
1 <%
2 local url = data['url']
3 local title = data['title'] or "No title set"
4 local height = data['height'] or "400px"
5 if type(height) == "number" then
6 height = height .. "px"
7 end
8 local width = data['width'] or "100%"
9 if type(width) == "number" then
10 width = width .. "px"
11 end
12
13 %>
14
15 <div id="<%=name%>" style="width:<%=width%>;float:left;">
16 <h2><%=title%></h2>
17
18 <% if not url then %>
19
20 <%:No url set.%>
21
22 <% else %>
23 <div style="height:<%=height%>;min-height:<%=height%>">
24 <object type="text/html" data="<%=url%>" width="100%" height="<%=height%>" name="widget_<%=name%>" id="widget_<%=name%>">
25 <param name="src" value="<%=url%>" />
26 <%:Sorry, your browser doesn't support the object tag and cannot display this page:%><br />
27 <a href="<%=url%>"><%=url%></a>
28 </object>
29 </div>
30 </div>
31 <%end%>