fix(i18n): fix curly quotes in Home.vue and remove unused dark theme from LanguageSwitcher

This commit is contained in:
ghostubborn 2026-04-01 16:23:52 +08:00
parent f75c6487b3
commit ffe6369c52
2 changed files with 9 additions and 38 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="language-switcher" :class="{ dark: dark }" ref="switcherRef"> <div class="language-switcher" ref="switcherRef">
<button class="switcher-trigger" @click="toggleDropdown"> <button class="switcher-trigger" @click="toggleDropdown">
{{ currentLabel }} {{ currentLabel }}
<span class="caret">{{ open ? '▲' : '▼' }}</span> <span class="caret">{{ open ? '▲' : '▼' }}</span>
@ -23,13 +23,6 @@ import { ref, computed, onMounted, onUnmounted } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { availableLocales } from '@/i18n/index.js' import { availableLocales } from '@/i18n/index.js'
const props = defineProps({
dark: {
type: Boolean,
default: false
}
})
const { locale } = useI18n() const { locale } = useI18n()
const open = ref(false) const open = ref(false)
const switcherRef = ref(null) const switcherRef = ref(null)
@ -127,27 +120,5 @@ onUnmounted(() => {
color: var(--orange, #FF4500); color: var(--orange, #FF4500);
} }
/* Dark theme (for dark navbar backgrounds) */
.dark .switcher-trigger {
color: var(--white, #FFFFFF);
border-color: rgba(255, 255, 255, 0.3);
}
.dark .switcher-trigger:hover {
border-color: rgba(255, 255, 255, 0.6);
}
.dark .switcher-dropdown {
background: var(--black, #000000);
border-color: rgba(255, 255, 255, 0.2);
box-shadow: none;
}
.dark .switcher-option {
color: var(--white, #FFFFFF);
}
.dark .switcher-option:hover {
background: rgba(255, 255, 255, 0.1);
}
</style> </style>

View File

@ -4,7 +4,7 @@
<nav class="navbar"> <nav class="navbar">
<div class="nav-brand">MIROFISH</div> <div class="nav-brand">MIROFISH</div>
<div class="nav-links"> <div class="nav-links">
<LanguageSwitcher dark /> <LanguageSwitcher />
<a href="https://github.com/666ghj/MiroFish" target="_blank" class="github-link"> <a href="https://github.com/666ghj/MiroFish" target="_blank" class="github-link">
{{ $t('nav.visitGithub') }} <span class="arrow"></span> {{ $t('nav.visitGithub') }} <span class="arrow"></span>
</a> </a>
@ -25,16 +25,16 @@
<span class="gradient-text">{{ $t('home.heroTitle2') }}</span> <span class="gradient-text">{{ $t('home.heroTitle2') }}</span>
</h1> </h1>
<div class=hero-desc> <div class="hero-desc">
<p> <p>
<i18n-t keypath=home.heroDesc tag=span> <i18n-t keypath="home.heroDesc" tag="span">
<template #brand><span class=highlight-bold>{{ $t('home.heroDescBrand') }}</span></template> <template #brand><span class="highlight-bold">{{ $t('home.heroDescBrand') }}</span></template>
<template #agentScale><span class=highlight-orange>{{ $t('home.heroDescAgentScale') }}</span></template> <template #agentScale><span class="highlight-orange">{{ $t('home.heroDescAgentScale') }}</span></template>
<template #optimalSolution><span class=highlight-code>{{ $t('home.heroDescOptimalSolution') }}</span></template> <template #optimalSolution><span class="highlight-code">{{ $t('home.heroDescOptimalSolution') }}</span></template>
</i18n-t> </i18n-t>
</p> </p>
<p class=slogan-text> <p class="slogan-text">
{{ $t('home.slogan') }}<span class=blinking-cursor>_</span> {{ $t('home.slogan') }}<span class="blinking-cursor">_</span>
</p> </p>
</div> </div>