feat: full width everywhere: pages put the screen on the left and the village on the right, with the open building outlined; the menu never changes width
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
488a5f2832
commit
4134a44652
|
|
@ -6,7 +6,7 @@ const year = new Date().getFullYear()
|
||||||
<!-- The legal links under the public pages. -->
|
<!-- The legal links under the public pages. -->
|
||||||
<template>
|
<template>
|
||||||
<footer class="border-t-2 border-wood-900 bg-wood-900 px-4 py-3 text-sm text-parchment-200">
|
<footer class="border-t-2 border-wood-900 bg-wood-900 px-4 py-3 text-sm text-parchment-200">
|
||||||
<div class="mx-auto flex max-w-[1100px] flex-wrap items-center gap-x-5 gap-y-1">
|
<div class="flex flex-wrap items-center gap-x-5 gap-y-1">
|
||||||
<span>© {{ year }} {{ operator }}</span>
|
<span>© {{ year }} {{ operator }}</span>
|
||||||
<NuxtLink to="/imprint" class="hover:text-gold-400">{{ $t('legal.imprint.title') }}</NuxtLink>
|
<NuxtLink to="/imprint" class="hover:text-gold-400">{{ $t('legal.imprint.title') }}</NuxtLink>
|
||||||
<NuxtLink to="/privacy" class="hover:text-gold-400">{{ $t('legal.privacy.title') }}</NuxtLink>
|
<NuxtLink to="/privacy" class="hover:text-gold-400">{{ $t('legal.privacy.title') }}</NuxtLink>
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ import type { UiIconName } from '~/components/icon/Ui.vue'
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
/** Inside a world: the world's menu (village, map, reports) and its clock. */
|
/** Inside a world: the world's menu (village, map, reports) and its clock. */
|
||||||
inWorld?: boolean
|
inWorld?: boolean
|
||||||
/** Across the whole screen, over the fullscreen village, instead of the centred column. */
|
|
||||||
wide?: boolean
|
|
||||||
}>()
|
}>()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { user, logout } = useAuth()
|
const { user, logout } = useAuth()
|
||||||
|
|
@ -102,7 +100,7 @@ watch(() => route.fullPath, () => menuKey.value++)
|
||||||
<!-- The main menu on every page: one dark bar, every section with its dropdown, the server clock and the account. -->
|
<!-- The main menu on every page: one dark bar, every section with its dropdown, the server clock and the account. -->
|
||||||
<template>
|
<template>
|
||||||
<header class="border-b-2 border-wood-950 bg-wood-900 text-sm text-parchment-100">
|
<header class="border-b-2 border-wood-950 bg-wood-900 text-sm text-parchment-100">
|
||||||
<div :key="menuKey" class="mx-auto flex h-9 items-stretch px-1 sm:px-2" :class="wide ? '' : 'max-w-[1100px]'">
|
<div :key="menuKey" class="flex h-9 items-stretch px-1 sm:px-2">
|
||||||
<NuxtLink :to="home" class="mr-1 shrink-0 items-center gap-1.5 px-1.5" :class="entries.length ? 'hidden sm:flex' : 'flex'" :title="t('app.title')">
|
<NuxtLink :to="home" class="mr-1 shrink-0 items-center gap-1.5 px-1.5" :class="entries.length ? 'hidden sm:flex' : 'flex'" :title="t('app.title')">
|
||||||
<span class="grid size-6 place-items-center border border-gold-600 bg-blood-700 text-gold-400">
|
<span class="grid size-6 place-items-center border border-gold-600 bg-blood-700 text-gold-400">
|
||||||
<IconBuilding type="headquarters" class="size-4" />
|
<IconBuilding type="headquarters" class="size-4" />
|
||||||
|
|
|
||||||
|
|
@ -151,25 +151,45 @@ useShortcuts(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Every page of the world on one stage: the village (or the map) fills the screen, the
|
Every page of the world across the full width, under the menu and the village bar: on
|
||||||
menu and the village bar run along the top, the open screen sits in a window on the
|
the overview the village fills the screen with its boxes docked on the right, the map
|
||||||
left and the boxes in a dock on the right.
|
fills it itself, and every other screen is a page with the village in a right column.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!-- A screen of its own, in the page column under the menu and the village bar. -->
|
<!--
|
||||||
|
A screen of its own, across the full width: the screen in the left column, the
|
||||||
|
village in the right one (wide screens), with the open building outlined there.
|
||||||
|
-->
|
||||||
<div v-if="page" class="min-h-dvh pb-14 md:pb-0">
|
<div v-if="page" class="min-h-dvh pb-14 md:pb-0">
|
||||||
<GameMenuBar in-world />
|
<GameMenuBar in-world />
|
||||||
<div class="mx-auto max-w-[1100px] space-y-1 px-1 pt-1 sm:px-2">
|
<div class="space-y-1 px-1 pt-1 sm:px-2">
|
||||||
<GameVillageBar v-if="v.village.value && v.resources.value" :village="v.village.value" :resources="v.resources.value" />
|
<GameVillageBar v-if="v.village.value && v.resources.value" :village="v.village.value" :resources="v.resources.value" />
|
||||||
<GameVillageNotices :village-id="villageId" />
|
<GameVillageNotices :village-id="villageId" />
|
||||||
</div>
|
</div>
|
||||||
<main class="mx-auto max-w-[1100px] px-1 pt-1.5 pb-4 sm:px-2">
|
<div class="flex items-start gap-2 px-1 pt-1.5 pb-4 sm:px-2">
|
||||||
|
<main class="min-w-0 flex-1">
|
||||||
<div class="frame @container">
|
<div class="frame @container">
|
||||||
<div v-if="pageTitle" class="panel-head"><h1 class="panel-title">{{ pageTitle }}</h1></div>
|
<div v-if="pageTitle" class="panel-head"><h1 class="panel-title">{{ pageTitle }}</h1></div>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<aside
|
||||||
|
v-if="v.village.value"
|
||||||
|
class="float sticky top-2 hidden h-[calc(100dvh-1rem)] w-[38%] max-w-176 min-w-96 shrink-0 overflow-hidden border border-wood-900 lg:block"
|
||||||
|
:aria-label="$t('village.diorama.title')"
|
||||||
|
>
|
||||||
|
<VillageDiorama
|
||||||
|
:selected="selected"
|
||||||
|
fill
|
||||||
|
:village="v.village.value"
|
||||||
|
:resources="v.resources.value"
|
||||||
|
:seconds-until="v.secondsUntil"
|
||||||
|
@update:selected="(id) => id !== null && (selected = id)"
|
||||||
|
@update:plot="(type) => (plot = type)"
|
||||||
|
/>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|
@ -191,7 +211,7 @@ useShortcuts(() => {
|
||||||
|
|
||||||
<div class="pointer-events-none fixed inset-0 z-10 flex flex-col">
|
<div class="pointer-events-none fixed inset-0 z-10 flex flex-col">
|
||||||
<div ref="topBars" class="shrink-0">
|
<div ref="topBars" class="shrink-0">
|
||||||
<div ref="menuBar"><GameMenuBar class="pointer-events-auto" in-world wide /></div>
|
<div ref="menuBar"><GameMenuBar class="pointer-events-auto" in-world /></div>
|
||||||
<div class="space-y-1 px-1 pt-1 sm:px-2">
|
<div class="space-y-1 px-1 pt-1 sm:px-2">
|
||||||
<GameVillageBar v-if="v.village.value && v.resources.value" :village="v.village.value" :resources="v.resources.value" />
|
<GameVillageBar v-if="v.village.value && v.resources.value" :village="v.village.value" :resources="v.resources.value" />
|
||||||
<div class="pointer-events-auto space-y-1 empty:hidden">
|
<div class="pointer-events-auto space-y-1 empty:hidden">
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ const villageId = computed(() => {
|
||||||
<GameVillageFrame v-if="villageId" :key="villageId" :village-id="villageId">
|
<GameVillageFrame v-if="villageId" :key="villageId" :village-id="villageId">
|
||||||
<slot />
|
<slot />
|
||||||
</GameVillageFrame>
|
</GameVillageFrame>
|
||||||
<main v-else class="mx-auto max-w-[1100px] px-1 pt-1.5 pb-4 sm:px-2">
|
<main v-else class="px-1 pt-1.5 pb-4 sm:px-2">
|
||||||
<div class="frame">
|
<div class="frame">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue