From ec7298cce09ea93c1b0daff01b8f6f8fa86046ae Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Fri, 25 Jul 2025 11:35:04 -0400 Subject: [PATCH] Refactor everything that's used all over into a common/ package and sync files from static/ into public/ so that public's not in the git. --- .gitignore | 1 + Makefile | 7 ++ admin/handlers.go | 11 ++- api/handlers.go | 1 + api/tools.go => common/api.go | 4 +- {zed => common}/errors.go | 2 +- {zed => common}/web.go | 7 +- go.mod | 10 ++- go.sum | 16 ++++ main.go | 1 - pages/layouts/main.html | 5 ++ public/admin/table/index.html | 63 -------------- public/alpine_test.html | 69 --------------- public/api/game/1/index.json | 3 - public/api/game/index.json | 6 -- public/api/live/index.json | 18 ---- public/api/stream/1/index.json | 22 ----- public/api/stream/index.json | 58 ------------- public/base.html | 47 ---------- public/error/index.html | 48 ----------- public/game/1/turings-tarpit/index.html | 83 ------------------ public/game/index.html | 74 ---------------- public/index.html | 110 ------------------------ public/live/index.html | 81 ----------------- public/login/index.html | 67 --------------- public/register/index.html | 69 --------------- public/stream/index.html | 68 --------------- {public => static}/blockstart.css | 0 {public => static}/color.css | 0 static/favicon.ico | Bin 0 -> 2734 bytes {public => static}/global.css | 0 {public => static}/js/alpine.js | 0 {public => static}/js/code.js | 0 static/reset.css | 54 ++++++++++++ tools/cmd/sitebuild/main.go | 4 +- views/layouts/main.html | 5 ++ 36 files changed, 112 insertions(+), 902 deletions(-) rename api/tools.go => common/api.go (97%) rename {zed => common}/errors.go (92%) rename {zed => common}/web.go (92%) delete mode 100644 public/admin/table/index.html delete mode 100644 public/alpine_test.html delete mode 100644 public/api/game/1/index.json delete mode 100644 public/api/game/index.json delete mode 100644 public/api/live/index.json delete mode 100644 public/api/stream/1/index.json delete mode 100644 public/api/stream/index.json delete mode 100644 public/base.html delete mode 100644 public/error/index.html delete mode 100644 public/game/1/turings-tarpit/index.html delete mode 100644 public/game/index.html delete mode 100644 public/index.html delete mode 100644 public/live/index.html delete mode 100644 public/login/index.html delete mode 100644 public/register/index.html delete mode 100644 public/stream/index.html rename {public => static}/blockstart.css (100%) rename {public => static}/color.css (100%) create mode 100644 static/favicon.ico rename {public => static}/global.css (100%) rename {public => static}/js/alpine.js (100%) rename {public => static}/js/code.js (100%) create mode 100644 static/reset.css diff --git a/.gitignore b/.gitignore index f8cb1f1..6ba8a20 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ coverage/* .venv *.gz config.toml +public diff --git a/Makefile b/Makefile index 7c8b664..5cadce6 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,13 @@ build: go build . site: +ifeq '$(OS)' 'Windows_NT' + powershell "mkdir public -force" + robocopy static public /nfl /ndl /njh /njs /COPY:DATSO /e +else + mkdir -p public + rsync -av static/ public/ +endif go run tools/cmd/sitebuild/main.go test: site diff --git a/admin/handlers.go b/admin/handlers.go index 9296cfc..5b8b20d 100644 --- a/admin/handlers.go +++ b/admin/handlers.go @@ -5,7 +5,7 @@ import ( "strconv" "github.com/gofiber/fiber/v2" "zedshaw.games/webapp/data" - "zedshaw.games/webapp/api" + . "zedshaw.games/webapp/common" ) func GetApiTableIndex(c *fiber.Ctx) error { @@ -25,7 +25,7 @@ func GetApiSelectAll(c *fiber.Ctx) error { type_is := data.Models()[table] result, err := SelectTable(table, type_is, 20, 0); - if err != nil { return api.IfErrNil(err, c) } + if err != nil { return IfErrNil(err, c) } return c.JSON(result) } @@ -37,12 +37,12 @@ func GetPageSelectAll(c *fiber.Ctx) error { func GetApiSelectOne(c *fiber.Ctx) error { table := c.Params("table") id, err := strconv.ParseInt(c.Params("id"), 10, 64) - if err != nil { return api.IfErrNil(err, c) } + if err != nil { return IfErrNil(err, c) } type_is := data.Models()[table] result, err := Get(table, type_is, id) - if err != nil { return api.IfErrNil(err, c) } + if err != nil { return IfErrNil(err, c) } return c.JSON(result.Interface()) } @@ -50,7 +50,7 @@ func GetApiSelectOne(c *fiber.Ctx) error { func GetPageSelectOne(c *fiber.Ctx) error { table := c.Params("table") id, err := strconv.ParseInt(c.Params("id"), 10, 64) - if err != nil { return api.IfErrNil(err, c) } + if err != nil { return IfErrNil(err, c) } return c.Render("admin/table/view", fiber.Map{ "Table": table, @@ -58,7 +58,6 @@ func GetPageSelectOne(c *fiber.Ctx) error { }) } - func PostApiUpdate(c *fiber.Ctx) error { return c.JSON(fiber.Map{}) } diff --git a/api/handlers.go b/api/handlers.go index 159f2bf..c2943f0 100644 --- a/api/handlers.go +++ b/api/handlers.go @@ -10,6 +10,7 @@ import ( "github.com/gofiber/fiber/v2/middleware/session" "zedshaw.games/webapp/data" + . "zedshaw.games/webapp/common" ) var STORE *session.Store diff --git a/api/tools.go b/common/api.go similarity index 97% rename from api/tools.go rename to common/api.go index 322aa51..79b8069 100644 --- a/api/tools.go +++ b/common/api.go @@ -1,10 +1,10 @@ -package api +package common import ( "log" "github.com/gofiber/fiber/v2" "github.com/go-playground/validator/v10" - ) +) type Failure struct { Message string `json:"message"` diff --git a/zed/errors.go b/common/errors.go similarity index 92% rename from zed/errors.go rename to common/errors.go index 773d7a3..6759947 100644 --- a/zed/errors.go +++ b/common/errors.go @@ -1,4 +1,4 @@ -package zed +package common import ( "log" diff --git a/zed/web.go b/common/web.go similarity index 92% rename from zed/web.go rename to common/web.go index 3ee1889..50c4452 100644 --- a/zed/web.go +++ b/common/web.go @@ -1,4 +1,4 @@ -package zed +package common import ( "log" @@ -37,8 +37,9 @@ func RenderPages(pages_path string, target string, layout string) { _, err := os.Stat(target_path) if os.IsNotExist(err) { - log.Println("MAKING: ", "MAKE THE DAMN PATH NO FILE") - // os.MkdirAll(target_path, 0750) + target_dir := filepath.Dir(target_path) + log.Println("MAKING: ", target_dir) + os.MkdirAll(target_dir, 0750) } // TODO: compare time stamps and skip if not newer diff --git a/go.mod b/go.mod index c824e90..f0702d5 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module zedshaw.games/webapp go 1.24.2 require ( - github.com/BurntSushi/toml v0.3.1 + github.com/BurntSushi/toml v1.4.0 github.com/Masterminds/squirrel v1.5.4 github.com/chromedp/chromedp v0.13.6 github.com/go-playground/validator/v10 v10.26.0 @@ -28,6 +28,7 @@ require ( github.com/chromedp/cdproto v0.0.0-20250611220608-a17eb1ae8ff0 // indirect github.com/chromedp/sysutil v1.1.0 // indirect github.com/coder/websocket v1.8.13 // indirect + github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect github.com/creack/pty v1.1.24 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -49,11 +50,14 @@ require ( github.com/gofiber/template v1.8.3 // indirect github.com/gofiber/utils v1.1.0 // indirect github.com/gohugoio/hugo v0.147.6 // indirect + github.com/gokrazy/rsync v0.2.10 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect github.com/google/licensecheck v0.3.1 // indirect + github.com/google/renameio/v2 v2.0.0 // indirect github.com/google/safehtml v0.0.3-0.20211026203422-d6f0e11a5516 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect @@ -62,6 +66,7 @@ require ( github.com/joho/godotenv v1.5.1 // indirect github.com/jonboulle/clockwork v0.5.0 // indirect github.com/klauspost/compress v1.18.0 // indirect + github.com/landlock-lsm/go-landlock v0.0.0-20250303204525-1544bccde3a3 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/leodido/go-urn v1.4.0 // indirect @@ -71,6 +76,7 @@ require ( github.com/mfridman/interpolate v0.0.2 // indirect github.com/mfridman/xflag v0.1.0 // indirect github.com/microsoft/go-mssqldb v1.8.0 // indirect + github.com/mmcloughlin/md4 v0.1.2 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect github.com/paulmach/orb v0.11.1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect @@ -110,6 +116,7 @@ require ( google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect howett.net/plist v1.0.1 // indirect + kernel.org/pub/linux/libs/security/libcap/psx v1.2.70 // indirect modernc.org/libc v1.65.0 // indirect modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.10.0 // indirect @@ -119,6 +126,7 @@ require ( tool ( github.com/air-verse/air + github.com/gokrazy/rsync/cmd/gokr-rsync github.com/pressly/goose/v3/cmd/goose golang.org/x/pkgsite/cmd/pkgsite golang.org/x/tools/cmd/goimports diff --git a/go.sum b/go.sum index 296513d..4e952e5 100644 --- a/go.sum +++ b/go.sum @@ -20,6 +20,8 @@ github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69 h1:+tu3HOoMXB7RX github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69/go.mod h1:L1AbZdiDllfyYH5l5OkAaZtk7VkWe89bPJFmnDBNHxg= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/ClickHouse/ch-go v0.65.1 h1:SLuxmLl5Mjj44/XbINsK2HFvzqup0s6rwKLFH347ZhU= github.com/ClickHouse/ch-go v0.65.1/go.mod h1:bsodgURwmrkvkBe5jw1qnGDgyITsYErfONKAHn05nv4= github.com/ClickHouse/clickhouse-go/v2 v2.34.0 h1:Y4rqkdrRHgExvC4o/NTbLdY5LFQ3LHS77/RNFxFX3Co= @@ -84,6 +86,8 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coder/websocket v1.8.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE= github.com/coder/websocket v1.8.13/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -182,6 +186,8 @@ github.com/gohugoio/locales v0.14.0 h1:Q0gpsZwfv7ATHMbcTNepFd59H7GoykzWJIxi113XG github.com/gohugoio/locales v0.14.0/go.mod h1:ip8cCAv/cnmVLzzXtiTpPwgJ4xhKZranqNqtoIu0b/4= github.com/gohugoio/localescompressed v1.0.1 h1:KTYMi8fCWYLswFyJAeOtuk/EkXR/KPTHHNN9OS+RTxo= github.com/gohugoio/localescompressed v1.0.1/go.mod h1:jBF6q8D7a0vaEmcWPNcAjUZLJaIVNiwvM3WlmTvooB0= +github.com/gokrazy/rsync v0.2.10 h1:9wXJmvKACwmfIq/ent6C/AiG5n+WonOfQPAKzxv5dUU= +github.com/gokrazy/rsync v0.2.10/go.mod h1:nrvfy+3qYcxt92pGtVa38uKlQ0dl2SrXEmtIaY/vCHA= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= @@ -222,8 +228,12 @@ github.com/google/licensecheck v0.3.1 h1:QoxgoDkaeC4nFrtGN1jV7IPmDCHFNIVh54e5hSt github.com/google/licensecheck v0.3.1/go.mod h1:ORkR35t/JjW+emNKtfJDII0zlciG9JgbT7SmsohlHmY= github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs= github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= +github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= github.com/google/safehtml v0.0.3-0.20211026203422-d6f0e11a5516 h1:pSEdbeokt55L2hwtWo6A2k7u5SG08rmw0LhWEyrdWgk= github.com/google/safehtml v0.0.3-0.20211026203422-d6f0e11a5516/go.mod h1:L4KWwDsUJdECRAEpZoBn3O64bQaywRscowZjJAzjHnU= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -268,6 +278,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kyokomi/emoji/v2 v2.2.13 h1:GhTfQa67venUUvmleTNFnb+bi7S3aocF7ZCXU9fSO7U= github.com/kyokomi/emoji/v2 v2.2.13/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE= +github.com/landlock-lsm/go-landlock v0.0.0-20250303204525-1544bccde3a3 h1:zcMi8R8vP0WrrXlFMNUBpDy/ydo3sTnCcUPowq1XmSc= +github.com/landlock-lsm/go-landlock v0.0.0-20250303204525-1544bccde3a3/go.mod h1:RSub3ourNF8Hf+swvw49Catm3s7HVf4hzdFxDUnEzdA= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= @@ -301,6 +313,8 @@ github.com/microsoft/go-mssqldb v1.8.0 h1:7cyZ/AT7ycDsEoWPIXibd+aVKFtteUNhDGf3ao github.com/microsoft/go-mssqldb v1.8.0/go.mod h1:6znkekS3T2vp0waiMhen4GPU1BiAsrP+iXHcE7a7rFo= github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mmcloughlin/md4 v0.1.2 h1:kGYl+iNbxhyz4u76ka9a+0TXP9KWt/LmnM0QhZwhcBo= +github.com/mmcloughlin/md4 v0.1.2/go.mod h1:AAxFX59fddW0IguqNzWlf1lazh1+rXeIt/Bj49cqDTQ= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= @@ -553,6 +567,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= howett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM= howett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= +kernel.org/pub/linux/libs/security/libcap/psx v1.2.70 h1:HsB2G/rEQiYyo1bGoQqHZ/Bvd6x1rERQTNdPr1FyWjI= +kernel.org/pub/linux/libs/security/libcap/psx v1.2.70/go.mod h1:+l6Ee2F59XiJ2I6WR5ObpC1utCQJZ/VLsEbQCD8RG24= modernc.org/cc/v4 v4.26.0 h1:QMYvbVduUGH0rrO+5mqF/PSPPRZNpRtg2CLELy7vUpA= modernc.org/cc/v4 v4.26.0/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= modernc.org/ccgo/v4 v4.26.0 h1:gVzXaDzGeBYJ2uXTOpR8FR7OlksDOe9jxnjhIKCsiTc= diff --git a/main.go b/main.go index af232cb..98d4737 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,6 @@ import ( ) func main() { - config.Load("config.toml") log.Printf("ADMIN is %s", config.Settings.Admin) diff --git a/pages/layouts/main.html b/pages/layouts/main.html index 991a3a8..b157cba 100644 --- a/pages/layouts/main.html +++ b/pages/layouts/main.html @@ -2,6 +2,11 @@ + + + + + diff --git a/public/admin/table/index.html b/public/admin/table/index.html deleted file mode 100644 index 034d290..0000000 --- a/public/admin/table/index.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - - - -

Admin Rows

- - -
    - -
-
- -
- - - - - diff --git a/public/alpine_test.html b/public/alpine_test.html deleted file mode 100644 index 5e8d66f..0000000 --- a/public/alpine_test.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - Hello - - - - - - - - - -

- - - - - - {}}"> -
- 🏑 Zed's Game Dev Website Yay -
- - - Gameplay Demo Video - - -

Title

- - - Some Image - -

Description

-
-
- - - -

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

-
- - -

Current Status

-

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

-
- - -

Planned Work

-

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

-
- - -

Read The Code

-

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

- -
- -
- - - - diff --git a/public/api/game/1/index.json b/public/api/game/1/index.json deleted file mode 100644 index dc2e6ce..0000000 --- a/public/api/game/1/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{"title": "Turing's Tarpit", - "description": "The description.", - "url": "/game/1/turings-tarpit/"} diff --git a/public/api/game/index.json b/public/api/game/index.json deleted file mode 100644 index 995f549..0000000 --- a/public/api/game/index.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - {"title": "Turing's Tarpit", "url": "/game/1/turings-tarpit/"}, - {"title": "Roguish", "url": "/game/1/turings-tarpit/"}, - {"title": "Raycaster", "url": "/game/1/turings-tarpit/"}, - {"title": "Clicker Loves You", "url": "/game/1/turings-tarpit/"} -] diff --git a/public/api/live/index.json b/public/api/live/index.json deleted file mode 100644 index 0c440bc..0000000 --- a/public/api/live/index.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "title": "Stream #34: C++ Game Dev|Retro Raycaster|No Brainrot Stream", - "description": "Some kind of stream.", - "links": [ - {"description": "A funky website", - "url": "https://test.com" - }, - {"description": "A funky website", - "url": "https://test.com" - }, - {"description": "A funky website", - "url": "https://test.com" - }, - {"description": "A funky website", - "url": "https://test.com" - } - ] -} diff --git a/public/api/stream/1/index.json b/public/api/stream/1/index.json deleted file mode 100644 index eb8d405..0000000 --- a/public/api/stream/1/index.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "title": "Stream #34: C++ Game Dev|Retro Raycaster|No Brainrot Stream", - "streamed_on": "10/10/2025", - "description": "Some kind of stream.", - "links": [ - {"description": "A funky website", - "url": "https://test.com" - }, - {"description": "A funky website", - "url": "https://test.com" - }, - {"description": "A funky website", - "url": "https://test.com" - }, - {"description": "A funky website", - "url": "https://test.com" - }, - {"description": "A funky website", - "url": "https://test.com" - } - ] -} diff --git a/public/api/stream/index.json b/public/api/stream/index.json deleted file mode 100644 index 3e1b286..0000000 --- a/public/api/stream/index.json +++ /dev/null @@ -1,58 +0,0 @@ -[ - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - }, - { "date": "12/10/2025", - "description": "A great stream.", - "url": "/stream/1/" - } -] diff --git a/public/base.html b/public/base.html deleted file mode 100644 index 2041788..0000000 --- a/public/base.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - - - - - - - - diff --git a/public/error/index.html b/public/error/index.html deleted file mode 100644 index 0e80147..0000000 --- a/public/error/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - -

ERROR

-

You have an error.

-
- - - - - diff --git a/public/game/1/turings-tarpit/index.html b/public/game/1/turings-tarpit/index.html deleted file mode 100644 index 206a072..0000000 --- a/public/game/1/turings-tarpit/index.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - - - -Gameplay Demo Video - - -

Title

- - - Some Image - -

Description

-
-
- - - -

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

-
- - -

Current Status

-

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

-
- - -

Planned Work

-

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

-
- - -

Read The Code

-

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

- -
- -
- - - - - diff --git a/public/game/index.html b/public/game/index.html deleted file mode 100644 index 4573d23..0000000 --- a/public/game/index.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - - - -

Zed's Trash Ass Games

- -

More fun than a barrel full of monkeys with syphilus. -

-
- -
- - - - - -

Planned Work

-

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

-
- - -

Read The Code

-

Polaroid retro pork belly yes plz bitters, viral chicharrones typewriter chartreuse vice Brooklyn. Adaptogen pour-over vibecession viral. Tote bag tonx DIY microdosing. Pickled selvage bespoke small batch, blue bottle twee tacos jean shorts before they sold out chicharrones solarpunk. Hoodie taiyaki poutine jianbing chambray.

- -
- -
- - - - - diff --git a/public/index.html b/public/index.html deleted file mode 100644 index e3841cd..0000000 --- a/public/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - -

Zed's Game Dev Website

- - - - - - - -

Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro. De carne lumbering animata corpora quaeritis. Summus brains sit​​, morbo vel maleficia? De apocalypsi gorger omero undead survivor dictum mauris. Hi mindless mortuis soulless creaturas, imo evil stalking monstra adventus resi dentevil vultus comedat cerebella viventium. Qui animated corpse, cricket bat max brucks terribilem incessu zomby. -

-
- - - -Left Image -
-

I stream on Twitch.

- -

I stream every day at 10AM/10PM EST time. 60% of the time it's a chill laid back stream with only programming and a bit of talking about programming. 30% of the time it's art for games I'm making. 10% of the time it's games I'm playing.

- - -
-
-
- - -

Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro. De carne lumbering animata corpora quaeritis. Summus brains sit​​, morbo vel maleficia? De apocalypsi gorger omero undead survivor dictum mauris. Hi mindless mortuis soulless creaturas, imo evil stalking monstra adventus resi dentevil vultus comedat cerebella viventium. Qui animated corpse, cricket bat max brucks terribilem incessu zomby. -

-
- - - -
-

Zed's Trash Ass Games

-

Are you a fan of retro styled half-assed but fun games? Me too, so here's my games I've made with that theme. Think "it's the late 80s and nobody knows how to make a game" when you play these and you'll enjoy every minute of it.

- - -
-Right Image -
-
- - -

Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro. De carne lumbering animata corpora quaeritis. Summus brains sit​​, morbo vel maleficia? De apocalypsi gorger omero undead survivor dictum mauris. Hi mindless mortuis soulless creaturas, imo evil stalking monstra adventus resi dentevil vultus comedat cerebella viventium. Qui animated corpse, cricket bat max brucks terribilem incessu zomby. -

-
- - - -Left Image -
-

Checkout my Git

-

I put al of my code online for people to read and study. If you're curious about the code behind my games or anything else I make then take a look at my git. It's like a buffet of half-finished genius.

- - -
-
-
- - -

Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro. De carne lumbering animata corpora quaeritis. Summus brains sit​​, morbo vel maleficia? De apocalypsi gorger omero undead survivor dictum mauris. Hi mindless mortuis soulless creaturas, imo evil stalking monstra adventus resi dentevil vultus comedat cerebella viventium. Qui animated corpse, cricket bat max brucks terribilem incessu zomby. -

-
- -
- - - - - diff --git a/public/live/index.html b/public/live/index.html deleted file mode 100644 index 8f038bc..0000000 --- a/public/live/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - - -
- - - - Stream Viewer - - - -

Links Found in Chat

-
    - -
-
- -
- - Submit a Link - - - - - - - - - -
- -
-
- - - - - diff --git a/public/login/index.html b/public/login/index.html deleted file mode 100644 index c5eb0ca..0000000 --- a/public/login/index.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - -

Login

- -
- -

Login

- - - - - - - - - - - - -
-
- -
-
- - - - - diff --git a/public/register/index.html b/public/register/index.html deleted file mode 100644 index 79e57f1..0000000 --- a/public/register/index.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - -

Login

- -
- -

Register

- - - - - - - - - - - - - - -
-
- -
-
- - - - - diff --git a/public/stream/index.html b/public/stream/index.html deleted file mode 100644 index 8251d6f..0000000 --- a/public/stream/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - ZedShaw.games - - -
- - - 🏑 - Live - Streams - Games - Register - Login - - -
- - - - - -

Past Streams

-

This is where you can checkout information we dropped in a past stream. Did I post a link and you need to remember it? Did someone in chat mention something? Here's where you find it.

-
- - - - -
- - - - - diff --git a/public/blockstart.css b/static/blockstart.css similarity index 100% rename from public/blockstart.css rename to static/blockstart.css diff --git a/public/color.css b/static/color.css similarity index 100% rename from public/color.css rename to static/color.css diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7cf06c4ce281c8c966a60cb30a18d7d6bef5749e GIT binary patch literal 2734 zcmeH}&x;&I6vyA_vh3_8I-{qFIV_8Z4Js@w1VOb6AjVnjk76OCJOo z#Edl?gd99fPcLCuB)UZoVJ_LRCPBeHm?@fp5Ji?cd6Dc;e}nH;PxX&oy$F(vkLjxV ze%`D1x_gSQ0w}?=u(VXcehU0)fYSglKcDD7p8>dqtWrtzVhNyG23W+HCA`+~qIqPE zq%-4+X_Mx{rR%V??7(}g*I@1a58?Sr4R*F}!RF@;IP=!qP(Ah>MBo1g3opM0A72aM z(W7^ucmIi*{CjAuEzyMNqd2aNC44}9C`1@Sf|a_7o`|sFH!W7G9EQShN;Jtr-f|e3 zG*sYj7OvFD@}an&=W5R65m+~u1|vqqhb~%?t7B5`p)Z!jJZetL4@7*RWudN8`*LqA z^g(=t4>WQq$A=2|b_?P4#%ge~Iy^woB)ypvwEUon$cU8I) z)y#F*_57yix^>U<{ImpPtVw{HL)?%AGh1Oq(fIS5I1$bA8Dt)&N+@gOIpU^|PPB|; z2AV>X(9+u(CAWhG2sd)P$!xgie{It%#XO%lhU1lnD>ajZ`-Ib~IBmo{L_Py7oC`+> zP(}7tmfDWU0oj|hm}(SLWS;+Il>3bRKYR*rfcBYryjJkC`wZZoWbN=ibFu!3*=s7t zUod+N?Jxhdx7Zxif9s&(&cVKP9Q<%`zT!CNNHb^FXzn;I)NQtsNZvh5I%E?!=QF5r z)lS@;cU$2%tkq8aycM2}qW)$YP>yy5>o+njb|cZx5=@Ey7grav0%g%}w^)=WEaN^F zg`#5#iC3*|? zhNsR6$9Y#cXVx#7iqqaYe(q@ZyJ9p+vbr}*x=Y@5^F1-{E=kt_qj|kf(HO9n({-FO zo9Nr?Nrs7=^Jz*3ka(%>qRbS5qAd7|BEJ@%#+cSQt>t;V>^g7Y*jj#_cfR`-@@FbK zOI7hqWzSN7caE}ocG)Hm8~DfLGTWJ>BS7c2N1f>0=@`BB@I*xVqlY^`Qor@ni`4h- v$Xe20Ing!xy!-|GdmH$teTMyN5Cqh_?&=0|5x5(lQZEA2P8xe3|F-`NoX+Fg literal 0 HcmV?d00001 diff --git a/public/global.css b/static/global.css similarity index 100% rename from public/global.css rename to static/global.css diff --git a/public/js/alpine.js b/static/js/alpine.js similarity index 100% rename from public/js/alpine.js rename to static/js/alpine.js diff --git a/public/js/code.js b/static/js/code.js similarity index 100% rename from public/js/code.js rename to static/js/code.js diff --git a/static/reset.css b/static/reset.css new file mode 100644 index 0000000..0761796 --- /dev/null +++ b/static/reset.css @@ -0,0 +1,54 @@ +/* 1. Use a more-intuitive box-sizing model */ +*, *::before, *::after { + box-sizing: border-box; +} + +/* 2. Remove default margin */ +* { + margin: 0; +} + +/* 3. Enable keyword animations */ +@media (prefers-reduced-motion: no-preference) { + html { + interpolate-size: allow-keywords; + } +} + +body { + /* 4. Add accessible line-height */ + line-height: 1.5; + /* 5. Improve text rendering */ + -webkit-font-smoothing: antialiased; +} + +/* 6. Improve media defaults */ +img, picture, video, canvas, svg { + display: block; + max-width: 100%; +} + +/* 7. Inherit fonts for form controls */ +input, button, textarea, select { + font: inherit; +} + +/* 8. Avoid text overflows */ +p, h1, h2, h3, h4, h5, h6 { + overflow-wrap: break-word; +} + +/* 9. Improve line wrapping */ +p { + text-wrap: pretty; +} +h1, h2, h3, h4, h5, h6 { + text-wrap: balance; +} + +/* + 10. Create a root stacking context +*/ +#root, #__next { + isolation: isolate; +} diff --git a/tools/cmd/sitebuild/main.go b/tools/cmd/sitebuild/main.go index 5c2449e..38b7e17 100644 --- a/tools/cmd/sitebuild/main.go +++ b/tools/cmd/sitebuild/main.go @@ -3,7 +3,7 @@ package main import ( "log" "flag" - "zedshaw.games/webapp/zed" + "zedshaw.games/webapp/common" ) type config struct { @@ -21,5 +21,5 @@ func main() { log.Println("Generating site from pages to public.") - zed.RenderPages(cfg.source, cfg.target, cfg.layouts) + common.RenderPages(cfg.source, cfg.target, cfg.layouts) } diff --git a/views/layouts/main.html b/views/layouts/main.html index 4e87332..49ee0b1 100644 --- a/views/layouts/main.html +++ b/views/layouts/main.html @@ -2,6 +2,11 @@ + + + + +