From 779e101c92d328b6bf5dc5e46160a30788265ec7 Mon Sep 17 00:00:00 2001 From: Leon van Kammen Date: Fri, 15 May 2026 13:22:33 +0200 Subject: [PATCH] 1st commit --- .env | 7 + README.md | 6 + default.nix | 59 +++ img/folder.svg | 14 + img/vaporgrid.svg | 1129 +++++++++++++++++++++++++++++++++++++++++++++ index.html | 110 +++++ shell.nix | 33 ++ ui-kit.html | 147 ++++++ util/xrforge.sh | 29 ++ xrforge.css | 141 ++++++ xrforge.max.css | 32 ++ 11 files changed, 1707 insertions(+) create mode 100644 .env create mode 100644 README.md create mode 100644 default.nix create mode 100644 img/folder.svg create mode 100644 img/vaporgrid.svg create mode 100644 index.html create mode 100644 shell.nix create mode 100644 ui-kit.html create mode 100755 util/xrforge.sh create mode 100644 xrforge.css create mode 100644 xrforge.max.css diff --git a/.env b/.env new file mode 100644 index 0000000..d085537 --- /dev/null +++ b/.env @@ -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/* . +#} diff --git a/README.md b/README.md new file mode 100644 index 0000000..f76a0c8 --- /dev/null +++ b/README.md @@ -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) +``` diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..15a9d44 --- /dev/null +++ b/default.nix @@ -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 { } + , pkgsLinux ? import { 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 + ''; +} diff --git a/img/folder.svg b/img/folder.svg new file mode 100644 index 0000000..d786efb --- /dev/null +++ b/img/folder.svg @@ -0,0 +1,14 @@ + + + diff --git a/img/vaporgrid.svg b/img/vaporgrid.svg new file mode 100644 index 0000000..e3ec92d --- /dev/null +++ b/img/vaporgrid.svg @@ -0,0 +1,1129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Created by potrace 1.15, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..8a90297 --- /dev/null +++ b/index.html @@ -0,0 +1,110 @@ + + + + + + XRForge - selfsovereign interoperable XR experiences + + + + + + + + + +
+
+ +
+
+ + + + + +
+
+ + + +
+
+

Hi there

+ This is a hosting tool for portable XR experiences. +
+
+ +
+ button +
+ + + + +
+
+
+ +
+
+
+
+  Item 1 +
+
+
+
+
+  Item 2 +
+
+
+
+
+  Item 3 +
+
+
+ +
+ +
+
+ + + + + + + + + +
+ +
+
+ + + + + + + diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..5954960 --- /dev/null +++ b/shell.nix @@ -0,0 +1,33 @@ +{ pkgs ? import {} } : +{ + + #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 "" + + ''; + }; + + +} + diff --git a/ui-kit.html b/ui-kit.html new file mode 100644 index 0000000..f4b2892 --- /dev/null +++ b/ui-kit.html @@ -0,0 +1,147 @@ + + + + + + Lorem ipsum - dolor sit + + + + + + + + + +
+
+ +
+
+ + + + + +
+
+ + + +
+

HEADER 1

+ Lorem ipsum dolor sit amter.
+ Amet puti solor fati corpus a link flap.

+
+ +
+ button +
+ + + + +
+
+ +
    +
  • foo bar
  • +
  • flop flap
  • +
+ + +
+
+
+
+┌─────────────────┐┌────────────────┐
+│  Foo     CLI    ││ Foo     Web    │
+└─────────────────┘└────────────────┘
+┌───────────────────────────────────┐
+│  Foo     Repository               │
+│ ┌────────┐ ┌────────┐ ┌─────────┐ │
+│ │  code  │ │ issues │ │ patches │ │
+│ └────────┘ └────────┘ └─────────┘ │
+├───────────────────────────────────┤
+│  Foo     Storage (Git)            │
+└───────────────────────────────────┘
+┌────────────────┐┌─────────────────┐
+│  Foo     Node  ││  Foo     HTTPD  │
+├────────────────┤├─────────────────┤
+│    NoiseXK     ││   HTTP + JSON   │
+└────────────────┘└─────────────────┘
+
+
+
+┌─────────────────┐┌────────────────┐
+│  Foo     CLI    ││ Foo     Web    │
+└─────────────────┘└────────────────┘
+┌───────────────────────────────────┐
+│  Foo     Repository               │
+│ ┌────────┐ ┌────────┐ ┌─────────┐ │
+│ │  code  │ │ issues │ │ patches │ │
+│ └────────┘ └────────┘ └─────────┘ │
+├───────────────────────────────────┤
+│  Foo     Storage (Git)            │
+└───────────────────────────────────┘
+┌────────────────┐┌─────────────────┐
+│  Foo     Node  ││  Foo     HTTPD  │
+├────────────────┤├─────────────────┤
+│    NoiseXK     ││   HTTP + JSON   │
+└────────────────┘└─────────────────┘
+
+
+
+┌─────────────────┐┌────────────────┐
+│  Foo     CLI    ││ Foo     Web    │
+└─────────────────┘└────────────────┘
+┌───────────────────────────────────┐
+│  Foo     Repository               │
+│ ┌────────┐ ┌────────┐ ┌─────────┐ │
+│ │  code  │ │ issues │ │ patches │ │
+│ └────────┘ └────────┘ └─────────┘ │
+├───────────────────────────────────┤
+│  Foo     Storage (Git)            │
+└───────────────────────────────────┘
+┌────────────────┐┌─────────────────┐
+│  Foo     Node  ││  Foo     HTTPD  │
+├────────────────┤├─────────────────┤
+│    NoiseXK     ││   HTTP + JSON   │
+└────────────────┘└─────────────────┘
+
+

hello world

+ Lorem ipsum +
+

hello world

+ Lorem ipsum +
+

hello world

+ Lorem ipsum + + +
+
+
+
+ + + + + + + diff --git a/util/xrforge.sh b/util/xrforge.sh new file mode 100755 index 0000000..3efb78b --- /dev/null +++ b/util/xrforge.sh @@ -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 +} + +"$@" diff --git a/xrforge.css b/xrforge.css new file mode 100644 index 0000000..0816fb1 --- /dev/null +++ b/xrforge.css @@ -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%; } +} diff --git a/xrforge.max.css b/xrforge.max.css new file mode 100644 index 0000000..69ac379 --- /dev/null +++ b/xrforge.max.css @@ -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; +} +