-
{languages.map((l) => (
- {l.label} ))}
{membersLabel}
{loginLabel}
Portfolio Studio
Archive 2026
Paris · Milan · Tokyo
{promptLabel}
--- // 登录页的 en/cn 共享实现(语言由 Astro.currentLocale 运行时决定)。 // 对应页面:src/pages/{en,cn}/login.astro —— 仅做薄包装。 // 注意:本页**不走 Layout**,自带完整 文档(独立极简版式,故保留 )。 import '@/styles/global.css' import { getI18n } from '@/lib/i18n' import { href, ROUTES } from '@/lib/routes' import { config } from '@/lib/config' import { LOCALE_NAMES } from '@/lib/i18n' import { i18n } from 'astro:config/client'; import { toCodes } from 'astro:i18n'; const { locale, t, getRelativeLocaleUrl } = getI18n(Astro) const pathName = Astro.url.pathname const locales = toCodes(i18n!.locales) const pathWithoutLocale = locales.includes(pathName.split('/')[1]) ? pathName.replace(`/${locale}`, '') : pathName const languages = locales.map((l) => ({ code: l, label: LOCALE_NAMES[l].nativeName })) const loginLabel = t('login') const promptLabel = t('login prompt') const accountLabel = t('username or email') const passwordLabel = t('password') const failLabel = t('login failed') const membersLabel = t('members') const backLabel = t('back to site') const homeUrl = href(locale, ROUTES.runwayLooks) const SITE_NAME = config.siteName ?? "Xisoa" const pageTitle = `${loginLabel} — ${SITE_NAME}` const loginDesc = locale === 'cn' ? `登录 ${SITE_NAME} 以收藏造型、同步浏览历史。` : `Log in to ${SITE_NAME} to save looks and sync your view history.` const loginKeywords = locale === 'cn' ? `登录,账户,${SITE_NAME}` : `login,account,${SITE_NAME}` ---
{membersLabel}
Portfolio Studio
Archive 2026
Paris · Milan · Tokyo
{promptLabel}