 <%#
	luci-theme-opentopd
    Copyright 2019-2021 sirpdboy <sirpdboy@qq.com>

	https://github.com/sirpdboy/luci-theme-opentopd/issues

	luci-theme-material: 
	Copyright 2015 Lutty Yang <lutty@wcan.in>
	Licensed to the public under the Apache License 2.0
-%>

<%
	local ver = require "luci.version"
	local disp = require "luci.dispatcher"
	local request  = disp.context.path
	local category = request[1]
	local tree = disp.node()
	local categories = disp.node_childs(tree)
%>
                </div>
                <footer class="mobile-hide">

		<a class="luci-link" href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %>
			(<%= ver.luciversion %>)</a> /
		<a href="https://github.com/sirpdboy/luci-theme-opentopd">OpentopdTheme <%# vPKG_VERSION %></a> /
		<%= ver.distversion %>
                    <% if #categories > 1 then %>
                    <ul class="breadcrumb pull-right" id="modemenu">
                        <% for i, r in ipairs(categories) do %>
                        <li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
                        <% end %>
                    </ul>
                    <% end %>

                </footer>
            </div>
        </div>

    <script>
        // thanks for Jo-Philipp Wich <jow@openwrt.org>
        var luciLocation = <%= luci.http.write_json(luci.dispatcher.context.path) %>;
	var winHeight = $(window).height();
	$(window).resize(function () {
		var winWidth = $(window).width()
		if(winWidth < 600){
			var newHeight = $(this).height();
			var keyboradHeight = newHeight - winHeight;
			$(".ftc").css("bottom", keyboradHeight + 30);
		}
	})
    </script>
    
    <script src="<%=media%>/js/script.js?v=<%=math.random(1,100000)%>"></script>
</body>
</html>

