Updated the css themes to remove specific stuff from chartDisplay

added $components alias to svelte.config.js
This commit is contained in:
2025-12-08 23:36:32 -06:00
parent a1349f9cd1
commit 06c157d4af
13 changed files with 100 additions and 121 deletions

View File

@@ -1,15 +1,12 @@
<script>
import { goto } from '$app/navigation';
import { xAxes, yAxes } from '$lib';
import ChartDisplay from '$lib/components/chartDisplay.svelte';
import DiceRoller from '$lib/components/diceRoller.svelte';
import ThemeSelector from '$lib/components/themeSelector.svelte';
import Toggle from '$lib/components/toggle.svelte';
import ChartDisplay from '$components/chartDisplay.svelte';
import DiceRoller from '$components/diceRoller.svelte';
let currentTheme = 'win95';
let adultMode = false;
let currentChart = null;
let diceRoll = null;
let { data } = $props();
let adultMode = $state(false);
let currentChart = $state({ x: [''], y: [''] });
let diceRoll = $state({ x: 0, y: 0 });
function generateChart() {
const availableXAxes = adultMode ? xAxes : xAxes.filter((axis) => !axis.adult);
@@ -30,35 +27,16 @@
y: Math.floor(Math.random() * 10) + 1
};
}
function goHome() {
goto('/');
}
</script>
<div class="container theme-{currentTheme}">
<div class="container theme-{data.currentTheme}">
<div class="window">
<div class="title-bar">
<button class="home-button" on:click={goHome}> Home</button>
<span>On the Spectrum - Party Game</span>
</div>
<div class="window-body">
<fieldset>
<legend>Theme Selector</legend>
<ThemeSelector bind:currentTheme />
</fieldset>
<fieldset>
<legend>Adult Mode (18+)</legend>
<Toggle bind:checked={adultMode} />
</fieldset>
<fieldset>
<legend>Chart Generator</legend>
<ChartDisplay chart={currentChart} />
<div class="button-row">
<button on:click={generateChart}>Generate</button>
<button onclick={generateChart}>Generate</button>
</div>
</fieldset>
@@ -66,7 +44,7 @@
<legend>Position Roller</legend>
<DiceRoller roll={diceRoll} />
<div class="button-row">
<button on:click={rollDice}>Roll Dice</button>
<button onclick={rollDice}>Roll Dice</button>
</div>
</fieldset>
</div>