diff --git a/src/.init.lua b/src/.init.lua index ddc2415..1b37043 100644 --- a/src/.init.lua +++ b/src/.init.lua @@ -83,6 +83,7 @@ app.plugin.pubnix = app.addPlugin('plugin/pubnix') app.plugin.diskscan = app.addPlugin('plugin/diskscan') app.plugin.convert = app.addPlugin('plugin/convert') app.plugin.moderation = app.addPlugin('plugin/moderation') +app.plugin.desktopfile = app.addPlugin('plugin/desktopfile') app.plugin.xrfragments = app.addPlugin('plugin/xrfragments') app.plugin.janusxr = app.addPlugin('plugin/janusxr') app.plugin.clouddrive = app.addPlugin('plugin/clouddrive') diff --git a/src/css/xrforge.css b/src/css/xrforge.css index 774edca..2faa0ce 100644 --- a/src/css/xrforge.css +++ b/src/css/xrforge.css @@ -87,6 +87,7 @@ textarea{ input[type=submit]{ display: inline-block; margin: 0 15px 0px 0px; + border: 1px dotted } .btn a, @@ -205,7 +206,7 @@ h1{ h1 a, h2 a, -center a{ +.jumbotron center a{ text-decoration:none; border:none !important; } @@ -219,14 +220,6 @@ table.header tr td { border:none; } -.btn.XR{ - line-height:10px; - display: inline-block; - position: absolute; - top: 20px; - right: 2px; -} - /* logo */ .logo *{ font-size:15px; diff --git a/src/css/xrforge.max.css b/src/css/xrforge.max.css index 481f7a2..bf49173 100644 --- a/src/css/xrforge.max.css +++ b/src/css/xrforge.max.css @@ -1,3 +1,7 @@ +:root{ + --gradient-1: #114,#224,#114,#3367,#424,#224; +} + hr{ display:none !important; } diff --git a/src/myverse/icosa-gallery.png b/src/myverse/icosa-gallery.png new file mode 100644 index 0000000..5775ffc Binary files /dev/null and b/src/myverse/icosa-gallery.png differ diff --git a/src/myverse/icosa-gallery/README.md b/src/myverse/icosa-gallery/README.md new file mode 100644 index 0000000..1d9118c --- /dev/null +++ b/src/myverse/icosa-gallery/README.md @@ -0,0 +1,61 @@ +

Hi there! 👋

+Welcome to this XR experience.
+
+
+ +
+ + +
+ +Here's a demo to surf icosa-gallery immersively (without launching the website, OpenBrush or OpenBlocks).
+This is possible thanks to icosa-gallery supporting the XR Fragments microformat. +
+> NOTE: most example assets are not optimized regarding scale/position/floor (but can be done in OpenBrush, OpenBlocks or Blender) + diff --git a/src/myverse/icosa-gallery/icosa-gallery.desktop b/src/myverse/icosa-gallery/icosa-gallery.desktop new file mode 100644 index 0000000..57f7ea8 --- /dev/null +++ b/src/myverse/icosa-gallery/icosa-gallery.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Link +Name=icosa gallery +URL=https://icosa.gallery/collections diff --git a/src/page/dir.html b/src/page/dir.html index 72c00cb..6219169 100644 --- a/src/page/dir.html +++ b/src/page/dir.html @@ -2,7 +2,7 @@ ${header} {if parent ~= nil and parent.parent == nil then print([[ -
+

${opts.plugin_global_title}


@@ -24,6 +24,17 @@ ${header} ]]) end} +{if isroot or url:match("/dir$") then + local url = urlpath:gsub("/dir$","") + print("
") + if app.arg[1] == "generate" then + print([[ ]]) + else + print([[ ]]) + end + print("

") +end} + {if parent ~= nil and parent.parent ~= nil then print([[

// ${parent.name} @@ -66,7 +77,7 @@ end} local icon = false local url = item.markup and item.parent.url or item.url local thumbnail = item.markup and (item.parent.thumbnail or '') or '' - if #item.thumbnail > 0 then thumbnail = 'style="background-image: url(' .. EscapeFragment( util.stripPath(item.thumbnail) ) .. ');"' end + if #item.thumbnail > 0 then thumbnail = 'style="background-image: url(' .. EscapeFragment( util.stripPath(item.thumbnail) ) .. '), linear-gradient(45deg,var(--gradient-1));"' end if item.view3D or (item.janusxr and item.janusxr.room) or (item.redirect) @@ -75,20 +86,20 @@ end} url = url .. '?view=3D' icon = 'play' if #item.thumbnail > 0 then - thumbnail = 'style="background-image: url(./img/playcover.svg), url(' .. EscapeFragment( util.stripPath(item.thumbnail) ) .. ');"' + thumbnail = 'style="background-image: url(./img/playcover.svg), url(' .. EscapeFragment( util.stripPath(item.thumbnail) ) .. '), linear-gradient(45deg,var(--gradient-1));"' else - thumbnail = 'style="background-image: url(./img/playcover.svg);"' + thumbnail = 'style="background-image: url(./img/playcover.svg), linear-gradient(45deg,var(--gradient-1));"' end end print([[
- +
]] .. ( icon and '' or '') .. [[]] .. item.title .. [[ ]] .. - ( (not playable or (playable and #item.children > 1)) and + ( ((#item.children > 0 and not playable) or (playable and #item.children > 1)) and [[ []] .. #item.children .. [[] ]] or '' diff --git a/src/page/dir.lua b/src/page/dir.lua index 9f73699..bd34817 100644 --- a/src/page/dir.lua +++ b/src/page/dir.lua @@ -91,18 +91,26 @@ return { -- *TODO* modularize this logic into plugins better -- prioritize markup experience above binary 3D files as experience containers - if data.item == nil or (isMarkupExperience(v) and not isMarkupExperience(data.item)) then + local notinroot = v.parent.parent ~= nil + if notinroot and data.item == nil + or (isMarkupExperience(v) + and not isMarkupExperience(data.item)) + then -- update referrer url data.referrer = util.baseURLify(v.view3D and (v.parent.parent and v.parent.parent.url) or v.parent.url) data.item = v data.title = data.item.title data.parent = v.parent -- *TODO* modularize this logic into plugins better - data.janusurl = (v.janusxr and v.janusxr.wrap) and app.opts.baseurl .. util.stripPath(v.url) - -- if parent has redirect to item set, use parent url - if not data.janusurl or v.parent.redirect == v.url then - data.janusurl = app.opts.baseurl .. util.stripPath(v.parent.redirect or v.parent.url) + data.janusurl = v.url + if not data.janusurl:match("://") then + data.janusurl = (v.janusxr and v.janusxr.wrap) and app.opts.baseurl .. util.stripPath(v.url) + -- if parent has redirect to item set, use parent url + if not data.janusurl or v.parent.redirect == v.url then + data.janusurl = app.opts.baseurl .. util.stripPath(v.parent.redirect or v.parent.url) + end end + if v.janusxr and v.janusxr.wrap and v.janusxr.wrap.file then -- what to do here? no generated portals? data.janusxr = app.tpl( util.readfile(v.path), data ) diff --git a/src/page/header.html b/src/page/header.html index 2695e06..c2fa925 100644 --- a/src/page/header.html +++ b/src/page/header.html @@ -63,13 +63,6 @@ -- janusweb workaround (it does not support '/' url somehow) urlpath = urlpath .. app.opts.plugin_diskscan_dirname end - if not urlpath:match('/dir$') then - if app.arg[1] == "generate" then - print([[ ]]) - else - print([[ ]]) - end - end end} {if template == "page/index.html" or defined(item) then print([[ diff --git a/src/page/index.html b/src/page/index.html index f0f0d08..a2a8e6d 100644 --- a/src/page/index.html +++ b/src/page/index.html @@ -13,6 +13,10 @@ else description = opts.plugin_global_popup_instructions end} +{if true then + playable = itemdir.view3D or (itemdir.janusxr and itemdir.janusxr.room) or (itemdir.redirect) +end} +