feat(CF): 现已支持部署到CloudFlare-Workers
This commit is contained in:
@@ -35,7 +35,7 @@ function AppContent() {
|
||||
<div className="app">
|
||||
<FloatingHeader />
|
||||
|
||||
<main className="app-main" style={{ paddingTop: '5rem' }}>
|
||||
<main className="app-main" style={{ paddingTop: '8rem' }}>
|
||||
<p className="app-description">
|
||||
{t('从全球各地测试到任意IP地址或域名的网络延迟', 'Test network latency from global locations to any IP address or domain')}
|
||||
</p>
|
||||
@@ -53,7 +53,7 @@ function AppContent() {
|
||||
</main>
|
||||
|
||||
<footer className="app-footer">
|
||||
<p>{t('© 2024 延迟测试。由 GlobalPing 提供支持。', '© 2024 Latency Test. Powered by GlobalPing.')}</p>
|
||||
<p>{t('© 2025 全球延迟测试。由 GlobalPing 提供服务支持。', '© 2025 Global Latency Test. Powered by GlobalPing.')}</p>
|
||||
</footer>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.floating-header {
|
||||
position: fixed;
|
||||
top: 1.25rem;
|
||||
top: 1rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 100;
|
||||
@@ -8,7 +8,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 1.25rem 3rem;
|
||||
padding: 0.75rem 2rem;
|
||||
|
||||
background: var(--card-bg);
|
||||
backdrop-filter: var(--glass-blur);
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.1);
|
||||
transition: opacity var(--transition-smooth);
|
||||
width: calc(100% - 2rem);
|
||||
width: 80%;
|
||||
max-width: 1100px;
|
||||
}
|
||||
|
||||
@@ -58,8 +58,9 @@
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.floating-header {
|
||||
top: 1rem;
|
||||
top: 0.75rem;
|
||||
gap: 1rem;
|
||||
padding: 0.5rem 1rem;
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
||||
const [theme, setTheme] = useState<Theme>(() => {
|
||||
const saved = localStorage.getItem('theme') as Theme
|
||||
if (saved) return saved
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
||||
return 'dark'
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user