xrforge-v2/src/page/dir.html

64 lines
2.1 KiB
HTML

${header}
{if parent ~= nil and parent.parent == nil then
print([[
<div style="height:90px;" class="jumbotron">
<h1 style="display:none">${opts.title}</h1>
<br>
<center class="col3">${opts.plugin_global_subtitle} </center>
</div>
<hr style="margin-top:0"/>
]])
end}
{if parent ~= nil and parent.parent ~= nil then
print([[
<h2><span class="col1">//</span> ${parent.name}</h2>
]])
end}
<div class="grid">
{if items then
for i=1,#items do
local item = items[i]
local visible = item.view2D == nil or (item.view2D ~= nil and item.view2D ~= false)
if visible then
local icon = 'list-tree'
local thumbnail = ''
if #item.thumbnail > 0 then thumbnail = 'style="background-image: url(' .. EscapeFragment( util.stripPath(item.thumbnail) ) .. ');"' end
if item.view3D or item.portal3D == false then icon = 'play' end
print([[
<div class="tile">
<a href="]] .. util.stripPath(item.url) .. [[">
<div class="img" ]] .. util.stripPath(thumbnail) .. [[></div>
<div class="text">
<img src="img/]] .. icon .. [[.svg" class="icon ]] .. icon .. [["/>&nbsp;<a href="]] .. util.stripPath(item.url) .. [[">]] .. item.title .. [[</a>
</div>
</a>
</div>
]])
end
end
end}
{if itemsremote then
for i=1,#itemsremote do
local item = itemsremote[i]
local icon = 'link'
local thumbnail = ''
if #item.thumbnail > 0 then thumbnail = 'style="background-image: url(' .. EscapeFragment( util.stripPath(item.thumbnail) ) .. ');"' end
if item.view3D or item.portal3D == false then icon = 'play' end
print([[
<div class="tile">
<a href="]] .. util.stripPath(item.url) .. [[">
<div class="img" ]] .. util.stripPath(thumbnail) .. [[></div>
<div class="text">
<img src="img/]] .. icon .. [[.svg" class="icon ]] .. icon .. [["/>&nbsp;<a href="]] .. util.stripPath(item.url) .. [[">]] .. item.title .. [[</a>
</div>
</a>
</div>
]])
end
end}
</div>
${footer}