增加插件,自定义座右铭

This commit is contained in:
2025-12-20 22:47:03 +08:00
parent afab936d70
commit a7556418ae
18 changed files with 3078 additions and 122 deletions

View File

@@ -4,9 +4,10 @@ import { useTranslation } from '../i18n';
interface ClockProps {
showSeconds?: boolean;
use24HourFormat?: boolean;
motto?: string;
}
const Clock: React.FC<ClockProps> = ({ showSeconds = true, use24HourFormat = true }) => {
const Clock: React.FC<ClockProps> = ({ showSeconds = true, use24HourFormat = true, motto = '同是天涯沦落人,相逢何必曾相识' }) => {
const [time, setTime] = useState(new Date());
const { language } = useTranslation();
@@ -83,8 +84,8 @@ const Clock: React.FC<ClockProps> = ({ showSeconds = true, use24HourFormat = tru
</div>
{/* Motto */}
<div className="mt-4 text-lg md:text-xl font-light text-white/70 tracking-widest uppercase">
<div className="mt-4 text-lg md:text-xl font-light text-white/70 tracking-widest uppercase text-center max-w-2xl">
{motto}
</div>
</div>
);