works I guess?

This commit is contained in:
2025-08-11 23:41:48 -04:00
parent bfb4fd3a63
commit 01d1571b0e
8 changed files with 817 additions and 405 deletions

View File

@@ -9,10 +9,14 @@
"dependencies": { "dependencies": {
"@elysiajs/eden": "^1.3.2", "@elysiajs/eden": "^1.3.2",
"@solidjs/router": "^0.15.3", "@solidjs/router": "^0.15.3",
"solid-js": "^1.9.5", "object-hash": "^3.0.0",
"object-hash": "^3.0.0" "solid-js": "^1.9.5"
}, },
"devDependencies": { "devDependencies": {
"@iconify-json/solar": "^1.2.4",
"@unocss/preset-icons": "^66.4.2",
"@unocss/preset-wind4": "^66.4.2",
"unocss": "^66.4.2",
"vite": "^4.4.9", "vite": "^4.4.9",
"vite-plugin-solid": "^2.11.8" "vite-plugin-solid": "^2.11.8"
} }

View File

@@ -4,21 +4,13 @@ import { lazy, Suspense } from "solid-js";
import pkg from "../package.json"; import pkg from "../package.json";
import { render } from "solid-js/web"; import { render } from "solid-js/web";
import Root from "./routes/index"; import Root from "./routes/index";
import "virtual:uno.css";
const Version = () => ( const Version = () => (
<div class="full free clear"> <>
<span <span class="fixed br m-2 font-mono text-xs">v{pkg.version}</span>
style={{ <div class="i-solar-user-circle-bold fixed s-10 top-0 right-0 m-2 cursor-pointer" />
margin: "5px", </>
"font-size": "0.8rem",
"font-family": "monospace",
"pointer-events": "all",
}}
class="fixed-br"
>
v{pkg.version}
</span>
</div>
); );
const App = () => ( const App = () => (

View File

@@ -10,16 +10,17 @@ export default () => {
<Game instanceId={params.instance} /> <Game instanceId={params.instance} />
<A <A
href={`/${params.game}`} href={`/${params.game}`}
style={{ // style={{
position: "absolute", // position: "absolute",
padding: "10px", // padding: "10px",
top: "0", // top: "0",
left: "0", // left: "0",
margin: "20px", // margin: "20px",
"background-color": "white", // "background-color": "white",
"border-radius": "8px", // "border-radius": "8px",
border: "2px solid black", // border: "2px solid black",
}} // }}
class="fixed tl m-4 px-2 py-1.5 button"
> >
Back Back
</A> </A>

View File

@@ -14,8 +14,9 @@ export default () => {
return ( return (
<Suspense> <Suspense>
<div style={{ padding: "20px" }}> <div style={{ padding: "20px" }}>
<h1 style={{ margin: 0 }}>{param.game}</h1> <p class="text-[40px]">{param.game}</p>
<button <button
class="px-2 py-1.5 m-4 button rounded"
onClick={() => onClick={() =>
api.simple.newGame api.simple.newGame
.post({ .post({

View File

@@ -12,17 +12,30 @@ body {
body::before { body::before {
z-index: -1; z-index: -1;
content: ""; content: "";
font-size: 28px;
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
a { /* a {
color: rgb(18, 229, 113); color: rgb(18, 229, 113);
} }
a:visited { a:visited {
color: rgb(23, 138, 125); color: rgb(23, 138, 125);
} */
.button {
cursor: pointer;
background-color: white;
color: black;
box-shadow: 0px 5px 10px black;
border-radius: 10%;
transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.button:hover {
background-color: rgb(23, 138, 125);
color: white;
transform: scale(1.1);
} }
#app { #app {

View File

@@ -0,0 +1,25 @@
import presetWind4 from "@unocss/preset-wind4";
import { defineConfig } from "unocss";
import { presetIcons } from "unocss";
import {} from "@iconify-json/solar";
export default defineConfig({
presets: [
presetWind4(),
presetIcons({
collections: {
solar: () =>
import("@iconify-json/solar/icons.json").then(
(i) => i.default as any
),
},
}),
],
shortcuts: [[/^s-(\d+)$/, ([, d]) => `w-${d} h-${d}`]],
rules: [
["tl", { top: 0, left: 0 }],
["tr", { top: 0, right: 0 }],
["bl", { bottom: 0, left: 0 }],
["br", { bottom: 0, right: 0 }],
],
});

View File

@@ -1,8 +1,9 @@
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import solidPlugin from "vite-plugin-solid"; import solidPlugin from "vite-plugin-solid";
import UnoCSS from "unocss/vite";
export default defineConfig({ export default defineConfig({
plugins: [solidPlugin()], plugins: [solidPlugin(), UnoCSS()],
build: { build: {
outDir: "../server/public", outDir: "../server/public",
emptyOutDir: true, emptyOutDir: true,

1127
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff