Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"vite": "^8.0.0"
},
"dependencies": {
"@123ishatest/louter": "^0.5.0",
"@123ishatest/louter": "^0.6.0",
"@123ishatest/lui": "*",
"zod": "^4.4.3"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type { Progress } from '@123ishatest/ludiek/dist/util/progress';
import type { Progress } from '@123ishatest/ludiek';

interface Props {
progress: Progress;
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const ssr = true;
export const ssr = false;
export const prerender = true;
32 changes: 21 additions & 11 deletions apps/website/src/routes/demo/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { onMount } from 'svelte';

import { page } from '$app/state';
import LudiekLogDisplay from '$lib/components/logger/LudiekLogDisplay.svelte';
import { LuiContentHint, LuiContext } from '@123ishatest/lui';

// TODO(@Isha): Subclass game to handle this nicer?
// game.load(page.data.content)
Expand Down Expand Up @@ -59,15 +59,25 @@
});
</script>

<div class="p-4">
<p>You have {money} money</p>
<p>You have {gems} gems</p>
<p>You have planted {planted} sunflowers</p>
<LuiContext engine={game.engine}>
<div class="h-full w-full">
<div class="flex flex-col space-y-4 p-4">
<LuiContentHint id="/currency/money">
<span>You have {money} money</span>
</LuiContentHint>

<button class="btn btn-primary" onclick={() => sow()}>Sow</button>
<button class="btn btn-secondary" onclick={() => trade()}>Trade 100 money for 1 gem</button>
</div>
<LuiContentHint id="/currency/gems">
<p>You have {gems} gems</p>
</LuiContentHint>

<div class="p-4">
<LudiekLogDisplay logger={game.engine.logger} />
</div>
<LuiContentHint id="/statistic/plants-planted" kind="statistic">
<p>You have planted {planted} sunflowers</p>
</LuiContentHint>

<div class="flex flex-row space-x-2">
<button class="btn btn-primary" onclick={() => sow()}>Sow</button>
<button class="btn btn-secondary" onclick={() => trade()}>Trade 100 money for 1 gem</button>
</div>
</div>
</div>
</LuiContext>
Loading
Loading