From 08b48e6415758cbfa9bc58211f87be6623bba884 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Wed, 28 Oct 2026 19:04:20 +0100 Subject: [PATCH] feat: inline SVG icons and small UI pieces Co-Authored-By: Claude Opus 5.5 --- app/components/icon/Building.vue | 66 ++++++++++++++++++++++++++++ app/components/icon/BuildingTile.vue | 12 +++++ app/components/icon/Resource.vue | 38 ++++++++++++++++ app/components/icon/Ui.vue | 49 +++++++++++++++++++++ app/components/ui/Bar.vue | 21 +++++++++ app/components/ui/Cost.vue | 26 +++++++++++ app/utils/palette.ts | 20 +++++++++ 7 files changed, 232 insertions(+) create mode 100644 app/components/icon/Building.vue create mode 100644 app/components/icon/BuildingTile.vue create mode 100644 app/components/icon/Resource.vue create mode 100644 app/components/icon/Ui.vue create mode 100644 app/components/ui/Bar.vue create mode 100644 app/components/ui/Cost.vue create mode 100644 app/utils/palette.ts diff --git a/app/components/icon/Building.vue b/app/components/icon/Building.vue new file mode 100644 index 0000000..938cde4 --- /dev/null +++ b/app/components/icon/Building.vue @@ -0,0 +1,66 @@ + + + + diff --git a/app/components/icon/BuildingTile.vue b/app/components/icon/BuildingTile.vue new file mode 100644 index 0000000..a60f168 --- /dev/null +++ b/app/components/icon/BuildingTile.vue @@ -0,0 +1,12 @@ + + + + diff --git a/app/components/icon/Resource.vue b/app/components/icon/Resource.vue new file mode 100644 index 0000000..a81b7d6 --- /dev/null +++ b/app/components/icon/Resource.vue @@ -0,0 +1,38 @@ + + + + diff --git a/app/components/icon/Ui.vue b/app/components/icon/Ui.vue new file mode 100644 index 0000000..05eafcc --- /dev/null +++ b/app/components/icon/Ui.vue @@ -0,0 +1,49 @@ + + + + diff --git a/app/components/ui/Bar.vue b/app/components/ui/Bar.vue new file mode 100644 index 0000000..a7b930a --- /dev/null +++ b/app/components/ui/Bar.vue @@ -0,0 +1,21 @@ + + + + diff --git a/app/components/ui/Cost.vue b/app/components/ui/Cost.vue new file mode 100644 index 0000000..7aca835 --- /dev/null +++ b/app/components/ui/Cost.vue @@ -0,0 +1,26 @@ + + + diff --git a/app/utils/palette.ts b/app/utils/palette.ts new file mode 100644 index 0000000..daff6c6 --- /dev/null +++ b/app/utils/palette.ts @@ -0,0 +1,20 @@ +import type { BuildingType } from '~/types/game' + +/** Tile colours per building type: a soft fill and a darker line for border and glyph. */ +export const BUILDING_COLORS: Record = { + headquarters: { fill: '#f6e3bf', line: '#a8661b' }, + storage: { fill: '#ece0cb', line: '#80603f' }, + farm: { fill: '#eef2cf', line: '#76892a' }, + timber_camp: { fill: '#dfecd5', line: '#3f7a37' }, + clay_pit: { fill: '#f6dccd', line: '#b0502a' }, + iron_mine: { fill: '#e3e7ed', line: '#55606f' }, + hiding_place: { fill: '#ebe3f2', line: '#6e5390' }, + wall: { fill: '#e7e3dc', line: '#6a6257' }, + rally_point: { fill: '#f6dfdf', line: '#a63a3a' }, +} + +export const buildingTileStyle = (type: BuildingType) => ({ + backgroundColor: BUILDING_COLORS[type].fill, + borderColor: BUILDING_COLORS[type].line, + color: BUILDING_COLORS[type].line, +})