mirror of
https://github.com/remvze/moodist.git
synced 2025-12-18 17:34:17 +00:00
## 主要功能 - 实现完整的中英文双语支持系统 - 添加语言切换器和路由配置 - 创建统一的翻译文件和hooks ## 核心组件 - 新增语言切换器组件 - 实现中英文页面路由 - 添加翻译系统核心文件 ## 翻译修复 - 修复所有声音名称的dataI18n映射 - 解决重复翻译键冲突问题 - 完善所有分类的声音翻译 ## 声音分类优化 - 修复雨声分类的重复翻译键问题 - 清理跨分类翻译键冲突 - 优化声音分类归属 ## UI优化 - 移除页面底部开源模块 - 完善顶部捐赠文本翻译 - 优化所有菜单项的翻译显示
119 lines
No EOL
2.7 KiB
Text
119 lines
No EOL
2.7 KiB
Text
---
|
|
import { Container } from '@/components/container';
|
|
import { count as soundCount } from '@/lib/sounds';
|
|
import { getTranslation } from '@/data/i18n';
|
|
|
|
// Get language from URL path
|
|
const url = Astro.url;
|
|
const pathname = url.pathname;
|
|
const isZhPage = pathname === '/zh' || pathname.startsWith('/zh/');
|
|
const lang = isZhPage ? 'zh-CN' : 'en';
|
|
const t = getTranslation(lang);
|
|
const count = soundCount();
|
|
---
|
|
|
|
<section class="about">
|
|
<div class="effect"></div>
|
|
|
|
<Container tight>
|
|
</Container>
|
|
</section>
|
|
|
|
<style>
|
|
.about {
|
|
padding-top: 10px;
|
|
|
|
& .effect {
|
|
position: sticky;
|
|
top: 0;
|
|
height: 80px;
|
|
background: linear-gradient(var(--color-neutral-50), transparent);
|
|
}
|
|
|
|
& .paragraph {
|
|
padding: 30px 0;
|
|
background: linear-gradient(
|
|
transparent,
|
|
var(--color-neutral-50) 10%,
|
|
var(--color-neutral-50) 90%,
|
|
transparent
|
|
);
|
|
|
|
&:last-of-type {
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
& .counter {
|
|
width: max-content;
|
|
padding: 6px 16px;
|
|
margin-bottom: 16px;
|
|
font-size: var(--font-xsm);
|
|
color: var(--color-foreground-subtle);
|
|
background: linear-gradient(var(--color-neutral-100), transparent);
|
|
border: 1px solid var(--color-neutral-300);
|
|
border-radius: 20px 20px 20px 8px;
|
|
|
|
& span {
|
|
font-weight: 500;
|
|
color: var(--color-foreground);
|
|
}
|
|
}
|
|
|
|
& .title {
|
|
margin-bottom: 8px;
|
|
font-family: var(--font-heading);
|
|
font-size: var(--font-md);
|
|
font-weight: 600;
|
|
}
|
|
|
|
& .body {
|
|
line-height: 1.6;
|
|
color: var(--color-foreground-subtle);
|
|
}
|
|
}
|
|
|
|
.button {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 10px 16px;
|
|
margin-top: 20px;
|
|
font-size: var(--font-xsm);
|
|
font-weight: 500;
|
|
color: var(--color-foreground);
|
|
cursor: pointer;
|
|
background-color: transparent;
|
|
border: 1px solid var(--color-neutral-200);
|
|
border-radius: 50px;
|
|
outline: none;
|
|
transition: 0.2s;
|
|
|
|
&::before {
|
|
position: absolute;
|
|
top: -1px;
|
|
left: 50%;
|
|
width: 70%;
|
|
height: 1px;
|
|
content: '';
|
|
background: linear-gradient(
|
|
90deg,
|
|
transparent,
|
|
var(--color-neutral-300),
|
|
transparent
|
|
);
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
&:hover,
|
|
&:focus-visible {
|
|
background-color: var(--color-neutral-100);
|
|
}
|
|
|
|
&:focus-visible {
|
|
outline: 2px solid var(--color-neutral-400);
|
|
outline-offset: 2px;
|
|
}
|
|
}
|
|
}
|
|
</style> |