Skip to content

Commit a941e20

Browse files
committed
style(ui): 优化全局背景与组件视觉样式
- 移除 Geist 字体依赖,简化布局 - 将背景点阵图案改为模糊半透明效果,提升视觉层次 - 为输入框、选择器、按钮等组件添加毛玻璃背景和柔和阴影 - 调整焦点环颜色与边框透明度,增强整体现代感
1 parent 7f2dae1 commit a941e20

3 files changed

Lines changed: 21 additions & 24 deletions

File tree

src/app/globals.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
@import "tailwindcss";
22

33
body {
4-
@apply bg-zinc-50 text-zinc-900;
4+
@apply bg-zinc-100 text-zinc-900 relative;
55
min-height: 100vh;
6-
/* subtle dot pattern for a modern look */
7-
background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
6+
}
7+
8+
body::before {
9+
content: "";
10+
position: absolute;
11+
inset: 0;
12+
z-index: -1;
13+
/* Darker dots */
14+
background-image: radial-gradient(#9ca3af 1.5px, transparent 1.5px);
815
background-size: 24px 24px;
16+
/* Apply blur to the background dots */
17+
filter: blur(1px);
18+
opacity: 0.6;
919
}

src/app/layout.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
import type { Metadata, Viewport } from "next";
2-
import { Geist, Geist_Mono } from "next/font/google";
32
import "./globals.css";
43

5-
const geistSans = Geist({
6-
variable: "--font-geist-sans",
7-
subsets: ["latin"],
8-
});
9-
10-
const geistMono = Geist_Mono({
11-
variable: "--font-geist-mono",
12-
subsets: ["latin"],
13-
});
14-
154
export const metadata: Metadata = {
165
title: "Secure DoH Proxy | Fast & Privacy-First DNS",
176
description: "High-performance, multi-upstream DNS over HTTPS proxy deployed on Cloudflare Edge. Support for Cloudflare, Google, AliDNS, DNSPod, and custom providers.",
@@ -35,9 +24,7 @@ export default function RootLayout({
3524
}>) {
3625
return (
3726
<html lang="en">
38-
<body
39-
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
40-
>
27+
<body className="antialiased">
4128
{children}
4229
</body>
4330
</html>

src/components/DnsTester.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default function DnsTester() {
8888
type="text"
8989
value={domain}
9090
onChange={(e) => setDomain(e.target.value)}
91-
className="w-full px-4 py-2.5 rounded-xl border border-zinc-200 focus:ring-2 focus:ring-zinc-900 focus:border-transparent outline-none transition-all bg-white/50"
91+
className="w-full px-4 py-2.5 rounded-xl border border-white/50 focus:ring-2 focus:ring-zinc-400 focus:border-transparent outline-none transition-all bg-white/40 backdrop-blur-sm shadow-sm"
9292
placeholder="example.com"
9393
required
9494
/>
@@ -99,7 +99,7 @@ export default function DnsTester() {
9999
<select
100100
value={type}
101101
onChange={(e) => setType(e.target.value)}
102-
className="w-full px-4 py-2.5 rounded-xl border border-zinc-200 focus:ring-2 focus:ring-zinc-900 focus:border-transparent outline-none transition-all bg-white/50"
102+
className="w-full px-4 py-2.5 rounded-xl border border-white/50 focus:ring-2 focus:ring-zinc-400 focus:border-transparent outline-none transition-all bg-white/40 backdrop-blur-sm shadow-sm"
103103
>
104104
{recordTypes.map((t) => (
105105
<option key={t} value={t}>{t}</option>
@@ -117,10 +117,10 @@ export default function DnsTester() {
117117
type="button"
118118
onClick={() => setProviderId(p.id)}
119119
className={clsx(
120-
"px-4 py-2 rounded-full text-sm font-medium transition-all border",
120+
"px-4 py-2 rounded-full text-sm font-medium transition-all border backdrop-blur-md",
121121
providerId === p.id
122-
? "bg-zinc-900 text-white border-zinc-900 shadow-sm"
123-
: "bg-white/50 text-zinc-500 border-zinc-200 hover:border-zinc-300 hover:text-zinc-800"
122+
? "bg-zinc-900/80 text-white border-zinc-700/50 shadow-md"
123+
: "bg-white/40 text-zinc-600 border-white/50 hover:bg-white/60 hover:text-zinc-900 shadow-sm"
124124
)}
125125
>
126126
{p.name}
@@ -136,7 +136,7 @@ export default function DnsTester() {
136136
type="url"
137137
value={manualUrl}
138138
onChange={(e) => setManualUrl(e.target.value)}
139-
className="w-full px-4 py-2.5 rounded-xl border border-zinc-200 focus:ring-2 focus:ring-zinc-900 focus:border-transparent outline-none transition-all bg-white/50"
139+
className="w-full px-4 py-2.5 rounded-xl border border-white/50 focus:ring-2 focus:ring-zinc-400 focus:border-transparent outline-none transition-all bg-white/40 backdrop-blur-sm shadow-sm"
140140
placeholder="https://example.com/dns-query"
141141
required
142142
/>
@@ -149,7 +149,7 @@ export default function DnsTester() {
149149
<button
150150
type="submit"
151151
disabled={loading}
152-
className="w-full py-3 mt-2 bg-zinc-900 text-white font-medium rounded-xl shadow-sm hover:bg-zinc-800 transition-all disabled:opacity-70 disabled:hover:bg-zinc-900 flex items-center justify-center space-x-2"
152+
className="w-full py-3 mt-2 bg-zinc-900/80 backdrop-blur-md text-white font-medium rounded-xl shadow-md border border-zinc-700/50 hover:bg-zinc-800/90 transition-all disabled:opacity-70 disabled:hover:bg-zinc-900/80 flex items-center justify-center space-x-2"
153153
>
154154
{loading ? (
155155
<>

0 commit comments

Comments
 (0)