diff --git a/src/.lua/util.lua b/src/.lua/util.lua index 475296a..bd64fe4 100644 --- a/src/.lua/util.lua +++ b/src/.lua/util.lua @@ -90,6 +90,9 @@ util.template = function(content,data) mdata.title = mdata.title or app.opts.subtitle mdata.header_include = mdata.header_include or '' mdata.header = app.tpl( LoadAsset('page/header.html'), mdata ) + if not mdata.footer_janusxr then + mdata.footer_janusxr = app.tpl( LoadAsset('page/footer.janusxr.html'), mdata ) + end mdata.footer = app.tpl( LoadAsset('page/footer.html'), mdata ) return app.tpl( content, mdata ) end diff --git a/src/page/dir.lua b/src/page/dir.lua index 700d324..6819ddd 100644 --- a/src/page/dir.lua +++ b/src/page/dir.lua @@ -59,9 +59,14 @@ return { if v.view3D then data.item = v data.title = data.item.title + data.parent = v.parent local port = ':' .. GetPort() if port == 80 then port = '' end data.url = GetScheme() .. '://' .. GetHost() .. port .. v.url + if v.janusxr then + -- what to do here? no generated portals? + data.footer_janusxr = app.tpl( util.readfile(v.path), data ) + end end end) if data.item then diff --git a/src/page/footer.html b/src/page/footer.html index 8f8cf67..d515275 100644 --- a/src/page/footer.html +++ b/src/page/footer.html @@ -38,34 +38,7 @@ - - - - {if items and #items > 1 then - for i,v in pairs(items) do - print('\t') - end - end} - - - - - {if item then - print('\t') - end} - {if items and #items > 1 then - for i,v in pairs(items) do - local width = 3.2 - local center = -((#items*width)/1.3) + (i*width) - print('\t\t') - print('\t\t ') - print('\t\t ') - print('\t\t ') - print('\t\t') - end - end} - - +${footer_janusxr}