From f438634b4e066fefe6913a12d6d4b7cf7dfd67b7 Mon Sep 17 00:00:00 2001 From: hided62 Date: Sat, 25 Jul 2026 11:44:35 +0000 Subject: [PATCH] feat(frontend): restore legacy gateway and hall styling --- app/game-frontend/src/assets/main.css | 71 +++- .../src/components/ui/PanelCard.vue | 34 +- app/game-frontend/src/env.d.ts | 1 + .../src/views/HallOfFameView.vue | 302 ++++++++++---- app/game-frontend/src/views/LoginView.vue | 42 +- .../src/components/MapPreview.vue | 36 +- app/gateway-frontend/src/env.d.ts | 1 + .../src/layouts/DefaultLayout.vue | 190 +++++++-- app/gateway-frontend/src/views/HomeView.vue | 386 +++++++++++++----- 9 files changed, 832 insertions(+), 231 deletions(-) diff --git a/app/game-frontend/src/assets/main.css b/app/game-frontend/src/assets/main.css index ee1697a..6e03e3b 100644 --- a/app/game-frontend/src/assets/main.css +++ b/app/game-frontend/src/assets/main.css @@ -1,12 +1,73 @@ @import 'tailwindcss'; @theme { - --color-sammo-ink: #101010; - --color-sammo-parchment: #e8ddc4; - --color-sammo-gold: #c9a45a; + --color-sammo-ink: #000; + --color-sammo-parchment: #fff; + --color-sammo-gold: #f39c12; +} + +html { + color-scheme: dark; } body { - @apply bg-sammo-ink text-sammo-parchment; - font-family: 'Galmuri11', 'Noto Serif KR', 'Malgun Gothic', serif; + min-width: 320px; + margin: 0; + background: #000; + color: #fff; + font-family: Pretendard, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif; + font-size: 14px; + line-height: 1.3; +} + +button, +input, +select, +textarea { + font: inherit; +} + +.legacy-bg0 { + background-color: #302016; + background-image: url('/image/game/back_walnut.jpg'); +} + +.legacy-bg1 { + background-color: #14241b; + background-image: url('/image/game/back_green.jpg'); +} + +.legacy-bg2 { + background-color: #172a52; + background-image: url('/image/game/back_blue.jpg'); +} + +.legacy-button { + display: inline-block; + border: 1px solid #12195b; + border-radius: 3px; + background: #141c65; + color: #fff; + padding: 5px 10px; + font-weight: 700; + line-height: 1.5; + cursor: pointer; +} + +.legacy-button:hover, +.legacy-button:focus, +.legacy-button:active { + border-color: #0f154c; + background: #101651; + color: #fff; +} + +.legacy-button:focus-visible { + outline: 2px solid #f39c12; + outline-offset: 1px; +} + +.legacy-button:disabled { + cursor: default; + opacity: 0.65; } diff --git a/app/game-frontend/src/components/ui/PanelCard.vue b/app/game-frontend/src/components/ui/PanelCard.vue index 4fc4f76..b8891ce 100644 --- a/app/game-frontend/src/components/ui/PanelCard.vue +++ b/app/game-frontend/src/components/ui/PanelCard.vue @@ -26,32 +26,33 @@ defineProps(); diff --git a/app/game-frontend/src/env.d.ts b/app/game-frontend/src/env.d.ts index 2be9cd0..2818d84 100644 --- a/app/game-frontend/src/env.d.ts +++ b/app/game-frontend/src/env.d.ts @@ -13,6 +13,7 @@ interface ImportMetaEnv { readonly VITE_GAME_SSE_URL?: string; readonly VITE_GAME_ASSET_URL?: string; readonly VITE_GAME_PROFILE?: string; + readonly VITE_GATEWAY_WEB_URL?: string; } interface ImportMeta { diff --git a/app/game-frontend/src/views/HallOfFameView.vue b/app/game-frontend/src/views/HallOfFameView.vue index 49e22e7..3ea0afa 100644 --- a/app/game-frontend/src/views/HallOfFameView.vue +++ b/app/game-frontend/src/views/HallOfFameView.vue @@ -1,5 +1,7 @@ + + diff --git a/app/game-frontend/src/views/LoginView.vue b/app/game-frontend/src/views/LoginView.vue index 23937d6..8bd53ff 100644 --- a/app/game-frontend/src/views/LoginView.vue +++ b/app/game-frontend/src/views/LoginView.vue @@ -1,8 +1,42 @@ - + + + diff --git a/app/gateway-frontend/src/components/MapPreview.vue b/app/gateway-frontend/src/components/MapPreview.vue index 71a749f..e7e1d6a 100644 --- a/app/gateway-frontend/src/components/MapPreview.vue +++ b/app/gateway-frontend/src/components/MapPreview.vue @@ -39,10 +39,22 @@ const props = defineProps<{ const BASE_MAP_WIDTH = 700; const BASE_MAP_HEIGHT = 500; -const MAP_SCALE = 0.45; -const mapWidth = computed(() => `${BASE_MAP_WIDTH * MAP_SCALE}px`); -const mapHeight = computed(() => `${BASE_MAP_HEIGHT * MAP_SCALE}px`); +const assetBase = computed(() => (import.meta.env.VITE_GAME_ASSET_URL ?? '/image').replace(/\/+$/, '')); +const season = computed(() => { + if (props.mapData.month <= 3) return 'spring'; + if (props.mapData.month <= 6) return 'summer'; + if (props.mapData.month <= 9) return 'fall'; + return 'winter'; +}); +const mapBackground = computed(() => { + const theme = props.mapLayout.mapName; + if (theme === 'ludo_rathowm') return `${assetBase.value}/game/map/ludo_rathowm/back.jpg`; + if (theme === 'chess') return `${assetBase.value}/game/map/chess/chessboard.png`; + if (theme === 'pokemon_v1') return `${assetBase.value}/game/map/pokemon_v1/back_pal8.png`; + if (theme === 'cr') return `${assetBase.value}/game/map/cr/bg-fs8.png`; + return `${assetBase.value}/game/map/che/bg_${season.value}.jpg`; +}); const nationById = computed(() => { const map = new Map(); @@ -74,8 +86,8 @@ const cityDots = computed(() => { return { id: layoutCity.id, name: layoutCity.name, - x: layoutCity.x * MAP_SCALE, - y: layoutCity.y * MAP_SCALE, + x: (layoutCity.x / BASE_MAP_WIDTH) * 100, + y: (layoutCity.y / BASE_MAP_HEIGHT) * 100, color: nation?.color ?? '#666666', isCapital: nation?.capitalCityId === layoutCity.id, }; @@ -89,14 +101,14 @@ const cityDots = computed(() => { {{ props.mapLayout.mapName }} {{ props.mapData.year }}년 {{ props.mapData.month }}월 -
+
@@ -105,6 +117,7 @@ const cityDots = computed(() => { diff --git a/app/gateway-frontend/src/views/HomeView.vue b/app/gateway-frontend/src/views/HomeView.vue index 6aeebec..10e53c5 100644 --- a/app/gateway-frontend/src/views/HomeView.vue +++ b/app/gateway-frontend/src/views/HomeView.vue @@ -1,130 +1,330 @@