wip
This commit is contained in:
parent
1ff1b819ba
commit
8eaa30a8ec
8 changed files with 50 additions and 11 deletions
|
|
@ -20,6 +20,10 @@
|
||||||
.margin1{ margin: 10px 20px; }
|
.margin1{ margin: 10px 20px; }
|
||||||
.padding1{ padding: 10px 20px 10px 20px; }
|
.padding1{ padding: 10px 20px 10px 20px; }
|
||||||
|
|
||||||
|
.content{
|
||||||
|
font-family: sans-serif;
|
||||||
|
letter-spacing: 0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
*{
|
*{
|
||||||
margin:0;
|
margin:0;
|
||||||
|
|
@ -197,6 +201,8 @@ ul{
|
||||||
.menu a {
|
.menu a {
|
||||||
padding-right:30px;
|
padding-right:30px;
|
||||||
color:#FFF;
|
color:#FFF;
|
||||||
|
font-weight:normal !important;
|
||||||
|
font-family:sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid .tile{ border-radius:5px; }
|
.grid .tile{ border-radius:5px; }
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ body{
|
||||||
|
|
||||||
.grid .tile .img{
|
.grid .tile .img{
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
border:1px dotted #223;
|
border:1px solid #223;
|
||||||
background-size:cover;
|
background-size:cover;
|
||||||
background-position:center;
|
background-position:center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
@ -15,7 +15,7 @@ body{
|
||||||
margin: 0px 15px 15px 0px;
|
margin: 0px 15px 15px 0px;
|
||||||
width:31%;
|
width:31%;
|
||||||
float:left;
|
float:left;
|
||||||
background-color:#333;
|
background-color:#2230;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 890px){
|
@media (max-width: 890px){
|
||||||
|
|
@ -48,8 +48,12 @@ body{
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid .tile img.icon{
|
.grid .tile img.icon.folder{
|
||||||
transform: translate(0,-3px);
|
transform: translate(0,-2px);
|
||||||
|
}
|
||||||
|
.grid .tile img.icon.play{
|
||||||
|
filter: invert(1);
|
||||||
|
transform: translate(0,-1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.clear{
|
.clear{
|
||||||
|
|
|
||||||
15
src/img/play.svg
Normal file
15
src/img/play.svg
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="M19 3H5C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3ZM5 1C2.79086 1 1 2.79086 1 5V19C1 21.2091 2.79086 23 5 23H19C21.2091 23 23 21.2091 23 19V5C23 2.79086 21.2091 1 19 1H5Z"
|
||||||
|
fill="currentColor"
|
||||||
|
/>
|
||||||
|
<path d="M16 12L10 16.3301V7.66987L16 12Z" fill="currentColor" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 514 B |
|
|
@ -17,7 +17,23 @@ end}
|
||||||
end}
|
end}
|
||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
${html_items}
|
{if items then
|
||||||
|
for i=1,#items do
|
||||||
|
local item = items[i]
|
||||||
|
local icon = 'folder'
|
||||||
|
if item.view3D or item.portal3D == false then icon = 'play' end
|
||||||
|
print([[
|
||||||
|
<div class="tile">
|
||||||
|
<a href="]] .. item.url .. [[">
|
||||||
|
<div class="img" style="background-image: url(]] .. item.thumbnail .. [[);"></div>
|
||||||
|
<div class="text">
|
||||||
|
<img src="img/]] .. icon .. [[.svg" class="icon ]] .. icon .. [["/> ]] .. item.title .. [[
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
]])
|
||||||
|
end
|
||||||
|
end}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
${footer}
|
${footer}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ local util = require("util")
|
||||||
return {
|
return {
|
||||||
|
|
||||||
middleware = function(req,res,next)
|
middleware = function(req,res,next)
|
||||||
local tile = require('page/partial/tile')
|
|
||||||
local rootpath = "/" .. app.opts.plugin_diskscan_dirname
|
local rootpath = "/" .. app.opts.plugin_diskscan_dirname
|
||||||
local urlpath = GetPath()
|
local urlpath = GetPath()
|
||||||
res.items = {}
|
res.items = {}
|
||||||
|
|
@ -55,7 +54,6 @@ return {
|
||||||
items = {},
|
items = {},
|
||||||
parent=res.parent
|
parent=res.parent
|
||||||
},{ opts = app.opts })
|
},{ opts = app.opts })
|
||||||
data.tile = tile
|
|
||||||
local i = 0
|
local i = 0
|
||||||
foreach( res.items, function(k,v)
|
foreach( res.items, function(k,v)
|
||||||
-- position items for janusxr JML (dir.html)
|
-- position items for janusxr JML (dir.html)
|
||||||
|
|
@ -67,8 +65,6 @@ return {
|
||||||
local port = ':' .. GetPort()
|
local port = ':' .. GetPort()
|
||||||
if port == 80 then port = '' end
|
if port == 80 then port = '' end
|
||||||
data.url = GetScheme() .. '://' .. GetHost() .. port .. v.url
|
data.url = GetScheme() .. '://' .. GetHost() .. port .. v.url
|
||||||
else
|
|
||||||
data.html_items = data.html_items .. tile({item=v})
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
if data.item then
|
if data.item then
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ ${header}
|
||||||
|
|
||||||
{if item and item.parent and item.parent.info then
|
{if item and item.parent and item.parent.info then
|
||||||
print([[
|
print([[
|
||||||
<div id="popup">
|
<div id="popup" class="content">
|
||||||
<img src="/img/close.svg" class="icon close" onclick="document.querySelector('#popup').style.display = 'none'"/>
|
<img src="/img/close.svg" class="icon close" onclick="document.querySelector('#popup').style.display = 'none'"/>
|
||||||
<div class="spectrum span">
|
<div class="spectrum span">
|
||||||
<div></div>
|
<div></div>
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,8 @@ return {
|
||||||
and not me.shouldHideFile(name) then
|
and not me.shouldHideFile(name) then
|
||||||
seen[ino] = experience -- prevent recursion with symlinks
|
seen[ino] = experience -- prevent recursion with symlinks
|
||||||
print("✅ ".. fullpath .. " " ..ino)
|
print("✅ ".. fullpath .. " " ..ino)
|
||||||
experience.dir = true
|
experience.dir = true
|
||||||
|
experience.portal3D = true -- can be viewed as 3d portal
|
||||||
app.pub("scan_experience", nil, experience)
|
app.pub("scan_experience", nil, experience)
|
||||||
app.cache.items[ino] = experience
|
app.cache.items[ino] = experience
|
||||||
me.scanDir(fullpath,experience,seen,symlinks)
|
me.scanDir(fullpath,experience,seen,symlinks)
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ app.on('scan_experience_file', function(exp)
|
||||||
if util.fileExist( sfile ) then
|
if util.fileExist( sfile ) then
|
||||||
exp.sidecarfile[ sidecarExt ] = "/" .. util.stripPath(sfile)
|
exp.sidecarfile[ sidecarExt ] = "/" .. util.stripPath(sfile)
|
||||||
exp.view3D = true
|
exp.view3D = true
|
||||||
|
exp.parent.portal3D = false
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
-- set thumbnail if any
|
-- set thumbnail if any
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue