feat: redesign MainMenu to minimalist edge layout, zero overlay, pure video backdrop
This commit is contained in:
@@ -21,19 +21,23 @@ const { t } = useI18n()
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="main-menu-overlay">
|
<div class="main-menu-overlay">
|
||||||
<div class="main-menu">
|
<div class="menu-center" v-if="isGameEnd">
|
||||||
<h1 v-if="isGameEnd" class="menu-title">{{ t('ui.gameEnd') }}</h1>
|
<div class="brand-title">天书 TianShu</div>
|
||||||
|
<div class="brand-slogan">剧本由你执笔,命运自有分岔</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button class="menu-btn primary" @click="emit('start')">{{ t('ui.start') }}</button>
|
<div class="menu-bottom">
|
||||||
|
<div class="bottom-left">
|
||||||
|
<button v-if="showStory" class="sub-btn" @click="emit('story')">{{ t('ui.story') }}</button>
|
||||||
|
<span v-if="showStory && showAchievements" class="sub-sep">·</span>
|
||||||
|
<button v-if="showAchievements" class="sub-btn" @click="emit('achievements')">{{ t('ui.achievements') }}</button>
|
||||||
|
<span v-if="(showStory || showAchievements)" class="sub-sep">·</span>
|
||||||
|
<button class="sub-btn" @click="emit('settings')">{{ t('ui.settings') }}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button v-if="showResume" class="menu-btn secondary" @click="emit('resume')">{{ t('ui.resume') }}</button>
|
<div class="bottom-right">
|
||||||
|
<button class="action-btn" @click="emit('start')">{{ t('ui.start') }}</button>
|
||||||
<div class="menu-sub-row">
|
<button v-if="showResume" class="action-btn secondary" @click="emit('resume')">{{ t('ui.resume') }}</button>
|
||||||
<button v-if="showStory" class="menu-sub" @click="emit('story')">{{ t('ui.story') }}</button>
|
|
||||||
<span v-if="showStory" class="sub-sep">·</span>
|
|
||||||
<button v-if="showAchievements" class="menu-sub" @click="emit('achievements')">{{ t('ui.achievements') }}</button>
|
|
||||||
<span v-if="showAchievements" class="sub-sep">·</span>
|
|
||||||
<button class="menu-sub" @click="emit('settings')">{{ t('ui.settings') }}</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,100 +47,109 @@ const { t } = useI18n()
|
|||||||
.main-menu-overlay {
|
.main-menu-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: rgba(0, 0, 0, 0.45);
|
|
||||||
backdrop-filter: blur(6px);
|
|
||||||
-webkit-backdrop-filter: blur(6px);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-menu {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
justify-content: flex-end;
|
||||||
gap: 14px;
|
z-index: 100;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-title {
|
.main-menu-overlay > * {
|
||||||
font-size: 36px;
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-center {
|
||||||
|
position: absolute;
|
||||||
|
top: 28%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
text-align: center;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-title {
|
||||||
|
font-size: 22px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
letter-spacing: 6px;
|
color: rgba(201, 168, 76, 0.5);
|
||||||
color: #ddd;
|
letter-spacing: 10px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-btn {
|
.brand-slogan {
|
||||||
padding: 16px 56px;
|
font-size: 12px;
|
||||||
font-size: 18px;
|
color: rgba(255, 255, 255, 0.18);
|
||||||
color: #fff;
|
letter-spacing: 4px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
letter-spacing: 3px;
|
|
||||||
transition: background 0.2s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-btn:hover {
|
.menu-bottom {
|
||||||
background: rgba(255, 255, 255, 0.12);
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20px 28px 32px;
|
||||||
|
background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-btn:focus-visible,
|
.bottom-left {
|
||||||
.menu-sub:focus-visible {
|
|
||||||
outline: 2px solid #c9a84c;
|
|
||||||
outline-offset: 2px;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-btn.primary {
|
|
||||||
background: rgba(201, 168, 76, 0.15);
|
|
||||||
border-color: rgba(201, 168, 76, 0.3);
|
|
||||||
padding: 20px 72px;
|
|
||||||
font-size: 24px;
|
|
||||||
letter-spacing: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-btn.primary:hover {
|
|
||||||
background: rgba(201, 168, 76, 0.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-btn.secondary {
|
|
||||||
background: rgba(201, 168, 76, 0.06);
|
|
||||||
border-color: rgba(201, 168, 76, 0.15);
|
|
||||||
color: #c9a84c;
|
|
||||||
font-size: 14px;
|
|
||||||
padding: 12px 40px;
|
|
||||||
letter-spacing: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-btn.secondary:hover {
|
|
||||||
background: rgba(201, 168, 76, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-sub-row {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 4px;
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-sub {
|
.sub-btn {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: #999;
|
color: rgba(255, 255, 255, 0.35);
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 4px 8px;
|
padding: 6px 10px;
|
||||||
transition: color 0.15s;
|
transition: color 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-sub:hover {
|
.sub-btn:hover {
|
||||||
color: #ccc;
|
color: rgba(255, 255, 255, 0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-sep {
|
.sub-sep {
|
||||||
color: #444;
|
color: rgba(255, 255, 255, 0.12);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn {
|
||||||
|
padding: 8px 32px;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #c9a84c;
|
||||||
|
background: rgba(201, 168, 76, 0.08);
|
||||||
|
border: 1px solid rgba(201, 168, 76, 0.2);
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn:hover {
|
||||||
|
background: rgba(201, 168, 76, 0.2);
|
||||||
|
border-color: rgba(201, 168, 76, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn.secondary {
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 6px 24px;
|
||||||
|
color: rgba(201, 168, 76, 0.6);
|
||||||
|
background: rgba(201, 168, 76, 0.03);
|
||||||
|
border-color: rgba(201, 168, 76, 0.1);
|
||||||
|
letter-spacing: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn.secondary:hover {
|
||||||
|
background: rgba(201, 168, 76, 0.1);
|
||||||
|
color: #c9a84c;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user