From 1d806d8754a287ff0f70ea6f293278d6ae4ebd6b Mon Sep 17 00:00:00 2001 From: sverben <59171289+sverben@users.noreply.github.com> Date: Wed, 22 May 2024 17:30:48 +0200 Subject: [PATCH] feat: add save icons --- src/lib/components/start/RobotSelector.svelte | 87 +---------- src/lib/components/start/Tile.svelte | 140 ++++++++++++++++++ 2 files changed, 144 insertions(+), 83 deletions(-) create mode 100644 src/lib/components/start/Tile.svelte diff --git a/src/lib/components/start/RobotSelector.svelte b/src/lib/components/start/RobotSelector.svelte index cd989c1..6b44541 100644 --- a/src/lib/components/start/RobotSelector.svelte +++ b/src/lib/components/start/RobotSelector.svelte @@ -1,8 +1,6 @@
{#each robots as row}
- {#each row as robot} - + {#each row as robot (robot.id)} + {/each}
{/each} @@ -72,51 +40,4 @@ function select(type: Robot) { justify-content: center; gap: 24px; } - - .robot { - width: 12vw; - max-width: 180px; - cursor: pointer; - - border: none; - background: none; - - transition: 0.1s ease; - color: var(--on-background); - } - - .robot.selected, - .robot:hover { - scale: 1.03; - } - - .icon { - display: flex; - justify-content: center; - align-items: center; - - box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); - border: solid 1px var(--background-tint); - background: var(--robot); - aspect-ratio: 1/1; - width: 100%; - border-radius: 0.375rem; - - transition: 0.1s ease; - margin-bottom: 1vh; - } - - .robot.selected .icon, - .robot:hover .icon { - border: 3px solid var(--primary) !important; - } - - .image { - max-width: 90%; - max-height: 90%; - } - - .name { - font-size: 1rem; - } diff --git a/src/lib/components/start/Tile.svelte b/src/lib/components/start/Tile.svelte new file mode 100644 index 0000000..c2c38ab --- /dev/null +++ b/src/lib/components/start/Tile.svelte @@ -0,0 +1,140 @@ + + + + +