1st commit
This commit is contained in:
commit
779e101c92
11 changed files with 1707 additions and 0 deletions
7
.env
Normal file
7
.env
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# aliases
|
||||
build(){ $(pwd)/util/xrforge.sh build; }
|
||||
|
||||
# server hook
|
||||
#test "$GITEA_ROOT_URL" = "https://xrforge.isvery.ninja/" && {
|
||||
# cp -r example/assets/* .
|
||||
#}
|
||||
6
README.md
Normal file
6
README.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
```
|
||||
$ source .env # not needed if your system has autoenv
|
||||
$ build # fast: repeatable build
|
||||
$ nix-build # slow: reproducable nix build (for experts)
|
||||
```
|
||||
59
default.nix
Normal file
59
default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
#let
|
||||
# pkgs = import ( builtins.fetchTarball {
|
||||
# name = "nixos-25.05";
|
||||
# url = "https://github.com/NixOS/nixpkgs/archive/nixos-25.05.tar.gz";
|
||||
# sha256 = "sha256:0v6bd1xk8a2aal83karlvc853x44dg1n4nk08jg3dajqyy0s98np";
|
||||
# }) {};
|
||||
#in
|
||||
{ pkgs ? import <nixpkgs> { }
|
||||
, pkgsLinux ? import <nixpkgs> { system = "x86_64-linux"; }
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "xrforge";
|
||||
version = "0.1.0";
|
||||
|
||||
# Fetch the matching cosmopolitan source tree
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jart";
|
||||
repo = "cosmopolitan";
|
||||
# We use the version that matches the pinned nixpkgs package release
|
||||
rev = pkgs.cosmopolitan.version;
|
||||
hash = pkgs.cosmopolitan.src.outputHash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gnumake
|
||||
unzip
|
||||
curl
|
||||
cosmopolitan.cosmocc
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# cosmocc knows exactly where the include/ and lib/ files are
|
||||
# from the base package. Just pass it the source and tell it to compile.
|
||||
# build once run anywhere using linux
|
||||
export CC=cosmocc
|
||||
export CXX=cosmocc
|
||||
#sed -i 's/^SHELL/#SHELL/g' Makefile
|
||||
#make -j8 #o//tool/net/redbean.o
|
||||
cosmocc -O2 -I. tool/net/redbean.c -o redbean.com
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
#mkdir -p $out/bin
|
||||
#cp redbean.com $out/bin/xrforge.com
|
||||
|
||||
## Run your local enhancement script
|
||||
#bash ${./util/xrforge.sh} $out/bin/xrforge.com
|
||||
|
||||
#chmod +x $out/bin/xrforge.com
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
14
img/folder.svg
Normal file
14
img/folder.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<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="M4 1.5C2.89543 1.5 2 2.39543 2 3.5V4.5C2 4.55666 2.00236 4.61278 2.00698 4.66825C0.838141 5.07811 0 6.19118 0 7.5V19.5C0 21.1569 1.34315 22.5 3 22.5H21C22.6569 22.5 24 21.1569 24 19.5V7.5C24 5.84315 22.6569 4.5 21 4.5H11.874C11.4299 2.77477 9.86384 1.5 8 1.5H4ZM9.73244 4.5C9.38663 3.9022 8.74028 3.5 8 3.5H4V4.5H9.73244ZM3 6.5C2.44772 6.5 2 6.94772 2 7.5V19.5C2 20.0523 2.44772 20.5 3 20.5H21C21.5523 20.5 22 20.0523 22 19.5V7.5C22 6.94772 21.5523 6.5 21 6.5H3Z"
|
||||
fill="#557"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 662 B |
1129
img/vaporgrid.svg
Normal file
1129
img/vaporgrid.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 42 KiB |
110
index.html
Normal file
110
index.html
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>XRForge - selfsovereign interoperable XR experiences</title>
|
||||
<link rel="stylesheet" href="xrforge.css"></link>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table width="100%" class="header">
|
||||
<tr>
|
||||
<td style="width:120px">
|
||||
<div class="margin1">
|
||||
<div class="logo col1">XR<div class="logo col2">f̅o̅r̅g̅e̅</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="menu">
|
||||
<div class="margin1">
|
||||
<a href="#">Experiences</a>
|
||||
<a href="#">Collections</a>
|
||||
<a href="#">About</a>
|
||||
<a href="#">Howto</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<table width="80%" class="page">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="background:linear-gradient(45deg,#0000,#0000,#F7F2,#0000,#07F2,#0000,#0000); height:120px;" class="jumbotron">
|
||||
<h1>Hi there</h1>
|
||||
This is a hosting tool for <a href="#">portable XR experiences</a>.
|
||||
</div>
|
||||
<hr style="margin-top:0">
|
||||
|
||||
<div class="btn">
|
||||
<a href="#foo">button</a>
|
||||
</div>
|
||||
|
||||
<div class="btn">
|
||||
<a href="#foo" class="btn primary">button primary ⮮</a>
|
||||
</div>
|
||||
|
||||
<div class="btn">
|
||||
<a href="https://foo.com" target="_blank" class="btn secondary">button secondary ⮩</a>
|
||||
</div>
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
<div class="grid">
|
||||
<div class="tile">
|
||||
<div class="img" style="background-image:url(https://xrforge.isvery.ninja/models/dpjnj8pt1cjc/model_files/bzjvdm7l523l.png?derivative=preview);"></div>
|
||||
<div class="text">
|
||||
<img src="img/folder.svg" class="icon"/> Item 1
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile">
|
||||
<div class="img" style="background-image:url(https://xrforge.isvery.ninja/models/dpjnj8pt1cjc/model_files/bzjvdm7l523l.png?derivative=preview);"></div>
|
||||
<div class="text">
|
||||
<img src="img/folder.svg" class="icon"/> Item 2
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile">
|
||||
<div class="img" style="background-image:url(https://xrforge.isvery.ninja/models/dpjnj8pt1cjc/model_files/bzjvdm7l523l.png?derivative=preview);"></div>
|
||||
<div class="text">
|
||||
<img src="img/folder.svg" class="icon"/> Item 3
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
|
||||
<table width="100%" class="footer">
|
||||
<tr>
|
||||
<td class="col3">footer col1</td>
|
||||
<td class="col3">footer col1</td>
|
||||
<td class="col3">footer col1</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</table>
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- JanusXR code
|
||||
|
||||
-->
|
||||
|
||||
<!-- C-code
|
||||
|
||||
|
||||
-->
|
||||
33
shell.nix
Normal file
33
shell.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ pkgs ? import <nixos-unstable> {} } :
|
||||
{
|
||||
|
||||
#pkgs = import (builtins.fetchGit {
|
||||
# name = "nixos-25.05";
|
||||
# url = "https://github.com/nixos/nixpkgs";
|
||||
# rev = "11cb3517b3af6af300dd6c055aeda73c9bf52c48";
|
||||
#}) {};
|
||||
|
||||
foo = pkgs.mkShell {
|
||||
# nativeBuildInputs is usually what you want -- tools you need to run
|
||||
nativeBuildInputs = with pkgs.buildPackages; [
|
||||
|
||||
];
|
||||
|
||||
shellHooks = ''
|
||||
export NIX_SHELL_XRFORGE=1
|
||||
|
||||
echo "available commands:"
|
||||
echo ""
|
||||
echo " # build xrforge.com binary (via default.nix)
|
||||
echo " nix-build
|
||||
echo ""
|
||||
echo " # run as docker
|
||||
echo " docker exec ...
|
||||
echo ""
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
147
ui-kit.html
Normal file
147
ui-kit.html
Normal file
File diff suppressed because one or more lines are too long
29
util/xrforge.sh
Executable file
29
util/xrforge.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
OUTDIR=result/bin
|
||||
REDBEAN_URL="https://redbean.dev/redbean-3.0.0.com"
|
||||
REDBEAN_CRC="382f1288bb96ace4bab5145e7df236846c33cc4f1be69233710682a9e71e7467 $OUTDIR/xrforge.com"
|
||||
|
||||
download(){
|
||||
|
||||
redbean(){
|
||||
test -d $OUTDIR || mkdir -p $OUTDIR
|
||||
rm $OUTDIR/*.com || true # delete old
|
||||
verify(){
|
||||
echo "$REDBEAN_CRC" > /tmp/checksum
|
||||
sha256sum -c /tmp/checksum || { echo "psuedosecurity checksum failed"; exit 1; }
|
||||
chmod +x $OUTDIR/xrforge.com
|
||||
}
|
||||
test -f /tmp/xrforge.com || wget "$REDBEAN_URL" -O /tmp/xrforge.com
|
||||
cp /tmp/xrforge.com $OUTDIR/xrforge.com
|
||||
verify
|
||||
}
|
||||
|
||||
"$@"
|
||||
}
|
||||
|
||||
build(){
|
||||
download redbean
|
||||
}
|
||||
|
||||
"$@"
|
||||
141
xrforge.css
Normal file
141
xrforge.css
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
/* Progressive enhancement
|
||||
* NetSurf and Dillo will ignore this entirely because of the modern orientation/feature query
|
||||
*/
|
||||
@import url("xrforge.max.css") supports(display: grid);
|
||||
|
||||
/* color palette */
|
||||
.col1{ color:#f3f; }
|
||||
.col2{ color:#AAD; }
|
||||
.col3{ color:#878; }
|
||||
.col4{ color:#7070ff; }
|
||||
.col5{ color:#557; }
|
||||
.col5{ color:#224; }
|
||||
.col5{ color:#112; }
|
||||
|
||||
.page{ width:640px; }
|
||||
|
||||
/* spacers */
|
||||
.margin1{ margin: 10px 20px; }
|
||||
.padding1{ padding: 10px 20px 10px 20px; }
|
||||
|
||||
|
||||
*{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
body,html {
|
||||
background:#112;
|
||||
font-family: monospace,sans-serif;
|
||||
color:#f7f7f7;
|
||||
font-size:15px;
|
||||
}
|
||||
|
||||
td,div,p{
|
||||
word-spacing: 0.2em;
|
||||
line-height:24px;
|
||||
}
|
||||
|
||||
.btn{
|
||||
display: inline-block;
|
||||
margin: 0px 10px 10px 0px;
|
||||
}
|
||||
|
||||
.btn a{
|
||||
display: inline-block;
|
||||
padding:8px 16px;
|
||||
color: #AAD;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.btn a:hover{
|
||||
color:#F7F;
|
||||
background:#000;
|
||||
}
|
||||
|
||||
a, a:active, a:visited, a:link {
|
||||
text-decoration: none;
|
||||
color:#FFF;
|
||||
border-bottom: 1px dotted #AAD;
|
||||
}
|
||||
|
||||
a:hover{
|
||||
color:#FFF;
|
||||
cursor:pointer;
|
||||
border-bottom:1px dotted #f3f;
|
||||
}
|
||||
|
||||
.primary{ color: #f3f; }
|
||||
.secondary{ color: #7070ff; }
|
||||
.btn.primary{ background: #f3F; color:#000; }
|
||||
.btn.secondary{ background: #7070ff; color:#000; }
|
||||
.btn a, .border{ border:1px dotted #AAD; }
|
||||
.border.primary{ border:1px dotted #87a; }
|
||||
.border.secondary{ border:1px dotted #7070ff; }
|
||||
|
||||
|
||||
.pad1{
|
||||
padding:20px;
|
||||
}
|
||||
.bg1{
|
||||
background:#224;
|
||||
}
|
||||
pre{
|
||||
font-family: monospace;
|
||||
line-height: 1;
|
||||
word-spacing: normal;
|
||||
color:#AAD;
|
||||
margin:0px 20px 20px 0px;
|
||||
padding:0;
|
||||
width:200px;
|
||||
}
|
||||
.ansi{
|
||||
font-size:20px;
|
||||
}
|
||||
h1,h2,h3,h4,h5{
|
||||
font-size: 16px;
|
||||
padding-top: 25px;
|
||||
padding-bottom:25px;
|
||||
}
|
||||
.sym{ font-size:100px; color:#000; }
|
||||
|
||||
|
||||
table.header td{ border-bottom: 1px solid #223; }
|
||||
.header td a{
|
||||
border:none;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
/* logo */
|
||||
.logo{ font-size:15px; display:inline-block; }
|
||||
|
||||
hr{
|
||||
margin:20px 0px;
|
||||
border-bottom:1px dotted #224;
|
||||
}
|
||||
|
||||
ul{
|
||||
list-style-position:outside;
|
||||
padding-left:0.8em;
|
||||
}
|
||||
|
||||
.menu a {
|
||||
padding-right:30px;
|
||||
}
|
||||
|
||||
.grid .tile{ border-radius:5px; }
|
||||
.grid .tile .text{ padding:3px 0px; }
|
||||
.grid .tile .img{
|
||||
border-radius:5px 5px 0px 0px;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* progressive enhancement quirks */
|
||||
@media (min-width:1px) {
|
||||
.grid .tile{
|
||||
height:unset;
|
||||
}
|
||||
.grid .tile .img{
|
||||
visibility: visible;
|
||||
}
|
||||
.page{ width:80%; }
|
||||
}
|
||||
32
xrforge.max.css
Normal file
32
xrforge.max.css
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
.grid .tile .img{
|
||||
visibility: visible;
|
||||
border:1px dotted #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;
|
||||
width:31%;
|
||||
float:left;
|
||||
background-color:#333;
|
||||
}
|
||||
.grid .tile .text{
|
||||
padding: 10px 20px 10px 20px !important;
|
||||
}
|
||||
|
||||
|
||||
.grid .tile img.icon{
|
||||
transform: translate(0,5px);
|
||||
}
|
||||
|
||||
.clear{
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.jumbotron{
|
||||
padding: 15px 20px 15px 20px;
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue