Skip to content

Commit b6eed42

Browse files
Optimize name size hierarchy for English and Chinese versions
1 parent b6f5783 commit b6eed42

3 files changed

Lines changed: 42 additions & 3 deletions

File tree

index-zh.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet" />
1111
<link rel="stylesheet" href="style.css" />
1212
</head>
13-
<body>
13+
<body class="lang-zh">
1414

1515
<!-- 粒子帆布背景 -->
1616
<canvas id="bgCanvas"></canvas>

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet" />
1111
<link rel="stylesheet" href="style.css" />
1212
</head>
13-
<body>
13+
<body class="lang-en">
1414

1515
<!-- Particle Canvas Background -->
1616
<canvas id="bgCanvas"></canvas>
@@ -50,8 +50,8 @@
5050
<div class="hero-content">
5151
<div class="hero-badge">⚡ Electrical Engineer · Project Manager · New Energy Expert</div>
5252
<h1 class="hero-title">
53-
<span class="name-cn">张 森 烨</span>
5453
<span class="name-en">Senye Zhang</span>
54+
<span class="name-cn">张 森 烨</span>
5555
</h1>
5656
<p class="hero-subtitle">High-Voltage Grid · Substation Commissioning · Photovoltaic & New Energy</p>
5757
<div class="hero-stats">

style.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,45 @@ body {
255255
color: var(--text-secondary);
256256
}
257257

258+
/* Language-specific Hierarchies */
259+
.lang-en .name-en {
260+
font-size: clamp(2.5rem, 8vw, 5.5rem);
261+
font-weight: 900;
262+
letter-spacing: 0.05em;
263+
background: linear-gradient(135deg, #ffffff 0%, var(--accent-glow) 50%, var(--accent3) 100%);
264+
-webkit-background-clip: text;
265+
-webkit-text-fill-color: transparent;
266+
background-clip: text;
267+
line-height: 1.1;
268+
}
269+
270+
.lang-en .name-cn {
271+
font-size: clamp(1rem, 3vw, 1.8rem);
272+
font-weight: 400;
273+
letter-spacing: 0.3em;
274+
background: none;
275+
-webkit-text-fill-color: var(--text-secondary);
276+
color: var(--text-secondary);
277+
order: 2; /* Move it below the English name if needed */
278+
}
279+
280+
.lang-zh .name-cn {
281+
order: 1;
282+
}
283+
284+
.lang-zh .name-en {
285+
order: 2;
286+
}
287+
288+
.hero-title {
289+
display: flex;
290+
flex-direction: column;
291+
align-items: center;
292+
gap: 4px;
293+
margin-bottom: 1rem;
294+
animation: fadeInDown 0.7s ease 0.1s both;
295+
}
296+
258297
.hero-subtitle {
259298
font-size: clamp(0.9rem, 2vw, 1.1rem);
260299
color: var(--text-secondary);

0 commit comments

Comments
 (0)