diff --git a/src/.args b/src/.args index fcc4b4b..8ba1cb2 100644 --- a/src/.args +++ b/src/.args @@ -1,7 +1,7 @@ -H Access-Control-Allow-Origin: * -H -Access-Control-Allow-Method: GET, POST, OPTIONS +Access-Control-Allow-Method: GET, OPTIONS -H Allow: GET, POST, OPTIONS -D diff --git a/src/.lua/config.lua b/src/.lua/config.lua index 12a8140..e506aec 100644 --- a/src/.lua/config.lua +++ b/src/.lua/config.lua @@ -5,9 +5,9 @@ return function(app) local config = { -- default name = "XRForge", baseurl="/", - title="Your XR Forge", + title="your.xr.forge", subtitle="Portable XR experiences for Phone, VRheadset & desktop.", - admin_title = "XRForge Admin", + admin_title = "xrforge admin panel", admin_subtitle = "Manage your XR experiences here", } diff --git a/src/.lua/util.lua b/src/.lua/util.lua index 32829b0..30ce7a5 100644 --- a/src/.lua/util.lua +++ b/src/.lua/util.lua @@ -84,12 +84,13 @@ end util.template = function(content,data) local mdata = util.merge(data or app,{}) mdata = util.merge(mdata, {opts = app.opts}) + -- set fallback vars + mdata.urlpath = GetPath() + mdata.url = mdata.url or util.getURL() mdata.title = mdata.title or app.opts.subtitle mdata.header_include = mdata.header_include or '' mdata.header = app.tpl( LoadAsset('page/header.html'), mdata ) mdata.footer = app.tpl( LoadAsset('page/footer.html'), mdata ) - -- set view url - mdata.url = mdata.url or util.getURL() return app.tpl( content, mdata ) end diff --git a/src/cmd/server.lua b/src/cmd/server.lua index 1db732c..facb2f6 100644 --- a/src/cmd/server.lua +++ b/src/cmd/server.lua @@ -2,5 +2,7 @@ return function(app,argv) print("starting server") if arg[1] == 'admin' then LaunchBrowser('/admin') + else + LaunchBrowser('/') end end diff --git a/src/css/xrforge.css b/src/css/xrforge.css index 9fa1a77..8ad8d85 100644 --- a/src/css/xrforge.css +++ b/src/css/xrforge.css @@ -1,17 +1,11 @@ /* Progressive enhancment * NetSurf and Dillo will ignore this entirely because of the modern orientation/feature query */ -body{ - background:#000000; -} - -.max{ - display:none; -} - @import url("xrforge.max.css") supports(display: grid); /* color palette */ + +.col0{ color:#fff; } .col1{ color:#f3f; } .col12{ color:#83f; } .col2{ color:#AAD; } @@ -45,6 +39,7 @@ body,html { } body{ + background:#000; margin:20px; } @@ -120,6 +115,9 @@ a:hover, cursor:pointer; border-bottom:1px dotted #f3f; } +.tile a{ + border:none; +} table{ table-layout: fixed; @@ -182,13 +180,12 @@ h1{ .header td a{ border:none; - font-weight:bold; } /* logo */ .logo *{ font-size:15px; - display:inline-block; + display:inline; } .logo .cube{ font-size: 27px; @@ -226,7 +223,7 @@ ul{ .grid .tile{ border-radius:5px; } .grid .tile .text{ padding:3px 0px; } .grid .tile .img{ - border-radius:5px 5px 0px 0px; + border-radius:20px; visibility: hidden; } @@ -291,6 +288,13 @@ blockquote{ display: inline-block; } +table.footer tr td { + line-height:35px; +} +table.footer tr td a{ + color:#878; +} + /* progressive enhancement quirks */ .spectrum{ display:none } diff --git a/src/css/xrforge.max.css b/src/css/xrforge.max.css index 69d6350..8e54bcc 100644 --- a/src/css/xrforge.max.css +++ b/src/css/xrforge.max.css @@ -1,15 +1,24 @@ +hr{ + display:none !important; +} + +body{ + background: linear-gradient(0deg,black,#0000,#0000), linear-gradient(180deg,#0000,#aa77FF22,#0000,#0000), linear-gradient(0deg,black,black) !important; + margin: 20px; + min-height: 100%; +} .grid .tile .img{ + background: linear-gradient(45deg,#114,#224,#114,#3367,#424,#224); visibility: visible; border:1px solid #223; background-size:cover; background-position:center; background-repeat: no-repeat; - border-radius:5px 5px 0px 0px; height:33vh; } .grid .tile{ - margin: 0px 15px 15px 0px; + margin: 0px 20px 20px 0px; width:31%; float:left; background-color:#2230; @@ -45,22 +54,29 @@ font-size:14px; } -.grid .tile img.icon.folder{ - transform: translate(0,-2px); +.grid .tile img.icon.list-tree{ + filter: invert(1); } .grid .tile img.icon.play{ filter: invert(1); transform: translate(0,-1px); } +.icon { + display:inline; +} +.menu .icon{ + filter: invert(1); + padding-right: 9px; + opacity: 0.6; +} + .clear{ clear:both; } .jumbotron{ padding:20px 20px; - background:linear-gradient(45deg,#0000,#0000,#F7F2,#0000,#07F2,#0000,#0000); - background:url(./../img/backdrop.jpg); background-size: cover; background-position: bottom; background-repeat: no-repeat; @@ -74,6 +90,7 @@ img.icon{ } #viewer{ + z-index:1000; position: absolute; width: 100%; height: calc( 99.7vh - 59px); @@ -163,19 +180,10 @@ u span{ .spectrum > div, .ruler{ - margin:3px 0px; + margin:1px 0px 0px 0px; clear:both; background:linear-gradient(90deg, #F07, #77F, #F07); - height:2px; -} - -#spectrumheader{ - position: absolute; - top: 57px; - z-index: 1000; - left: 0px; - height: 5px; - width: 100%; + height:1px; } /* css tabs */ @@ -262,6 +270,7 @@ div.tab-frame > input#info:checked ~ .info{ } #popup .icon.close{ + display:inline-block; cursor:pointer; width: 40px; filter: invert(1); @@ -269,3 +278,4 @@ div.tab-frame > input#info:checked ~ .info{ right: 20px; top: 20px; } + diff --git a/src/img/list-tree.svg b/src/img/list-tree.svg new file mode 100644 index 0000000..33e72c6 --- /dev/null +++ b/src/img/list-tree.svg @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/myverse/tronverse/tron/README.md b/src/myverse/tronverse/tron/README.md new file mode 100644 index 0000000..ac93bdd --- /dev/null +++ b/src/myverse/tronverse/tron/README.md @@ -0,0 +1,7 @@ +# Tron World 1 + +This is a test + +> This is a blockquote + +And [this](https://xrfragment.org) is an URL. diff --git a/src/page/about.html b/src/page/about.html index 8393cbf..e40d7cb 100644 --- a/src/page/about.html +++ b/src/page/about.html @@ -6,7 +6,7 @@ header h2{ font-weight: normal; } header{ - background: url(/img/backdrop.jpg); + background: url(/myverse/tronverse/tron/tron.png); background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; @@ -72,6 +72,10 @@ div#xrecosystem{     +
diff --git a/src/page/admin/index.html b/src/page/admin/index.html index 89b65b6..1d2b3c8 100644 --- a/src/page/admin/index.html +++ b/src/page/admin/index.html @@ -1,9 +1,6 @@ ${header} -
-

${opts.admin_title}

- ${opts.admin_subtitle} -
+

${notification} diff --git a/src/page/admin/index.lua b/src/page/admin/index.lua index 9781d51..cb5a3cf 100644 --- a/src/page/admin/index.lua +++ b/src/page/admin/index.lua @@ -84,5 +84,5 @@ local html = util.template( LoadAsset("page/admin/index.html"),data) SetStatus(200) -SetHeader('Content-Type', 'text/html; charset=utf-8') +SetHeader('Content-Type', 'text/html') Write( html ) diff --git a/src/page/dir.html b/src/page/dir.html index 4074a44..510f847 100644 --- a/src/page/dir.html +++ b/src/page/dir.html @@ -2,17 +2,18 @@ ${header} {if parent ~= nil and parent.parent == nil then print([[ -
-

${opts.title}

- ${opts.subtitle} +
+

${opts.title}

+
+
${opts.subtitle}
-
+
]]) end} {if parent ~= nil and parent.parent ~= nil then print([[ -

${parent.name}

+

// ${parent.name}

]]) end} @@ -20,14 +21,16 @@ end} {if items then for i=1,#items do local item = items[i] - local icon = 'folder' + local icon = 'list-tree' + local thumbnail = '' + if #item.thumbnail > 0 then thumbnail = 'style="background-image: url(' .. item.thumbnail .. ');"' end if item.view3D or item.portal3D == false then icon = 'play' end print([[
diff --git a/src/page/dir.lua b/src/page/dir.lua index 8572bd7..be66ec0 100644 --- a/src/page/dir.lua +++ b/src/page/dir.lua @@ -42,9 +42,6 @@ return { local parent = app.cache.items[ v.parent.id ] res.items[ v.id ] = v res.parent = parent - if v.thumbnail then - print_r(v.name .. " => " .. v.thumbnail) - end end end @@ -79,7 +76,7 @@ return { next() else res.status(200) - res.header('content-type','text/html; charset=utf-8') + res.header('content-type','text/html') res.body( app.cache.url[ urlpath ] ) next() end diff --git a/src/page/footer.html b/src/page/footer.html index 047296a..4e25a13 100644 --- a/src/page/footer.html +++ b/src/page/footer.html @@ -1,8 +1,13 @@
+
+
+
+
+
+
+
-
-
diff --git a/src/page/header.html b/src/page/header.html index d3144c1..28ee93d 100644 --- a/src/page/header.html +++ b/src/page/header.html @@ -1,4 +1,3 @@ - @@ -6,25 +5,28 @@ ${title} - + ${header_include} -
+ @@ -32,15 +34,11 @@
-
-
-
-
diff --git a/src/page/index.html b/src/page/index.html index 8ba85ec..c95c5c9 100644 --- a/src/page/index.html +++ b/src/page/index.html @@ -1,14 +1,20 @@ ${header} +
+
+
{if item and item.parent and item.parent.info then print([[ ]])