Skip to content

Commit 5e0b6e1

Browse files
Fix bugs, improve UX and SEO
- Fix undefined CSS variable var(--text) → var(--text-primary) in about section - Add rel="noopener noreferrer" to all external LinkedIn links - Add Certs nav link pointing to existing certifications section - Add hamburger menu open/close X animation on mobile - Add Open Graph and Twitter Card meta tags for social sharing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c539158 commit 5e0b6e1

3 files changed

Lines changed: 28 additions & 5 deletions

File tree

app.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@
139139
const links = document.querySelector('.nav-links');
140140
if (toggle) {
141141
toggle.addEventListener('click', () => {
142-
const isOpen = links.style.display === 'flex';
142+
const isOpen = toggle.classList.contains('open');
143+
toggle.classList.toggle('open', !isOpen);
143144
links.style.cssText = isOpen
144145
? ''
145146
: 'display:flex;flex-direction:column;position:absolute;top:70px;left:0;right:0;background:rgba(5,13,26,0.98);padding:1.5rem;gap:1.5rem;border-bottom:1px solid rgba(60,139,255,0.2)';
@@ -149,7 +150,10 @@
149150
// Close mobile menu on link click
150151
document.querySelectorAll('.nav-links a').forEach(link => {
151152
link.addEventListener('click', () => {
152-
if (links.style.display === 'flex') links.style.cssText = '';
153+
if (toggle.classList.contains('open')) {
154+
toggle.classList.remove('open');
155+
links.style.cssText = '';
156+
}
153157
});
154158
});
155159
})();

index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Senye Zhang | Electrical Engineer</title>
77
<meta name="description" content="Senye Zhang — Electrical Engineer with 15+ years specializing in high-voltage distribution systems, substation commissioning, and customer-side power access." />
8+
<meta property="og:title" content="Senye Zhang | Electrical Engineer" />
9+
<meta property="og:description" content="15+ years · 1,500+ HV Projects · Substation Commissioning · PV & New Energy · Now in Canada" />
10+
<meta property="og:type" content="website" />
11+
<meta property="og:url" content="https://isparkyou-github.github.io" />
12+
<meta name="twitter:card" content="summary" />
13+
<meta name="twitter:title" content="Senye Zhang | Electrical Engineer" />
14+
<meta name="twitter:description" content="15+ years · 1,500+ HV Projects · Substation Commissioning · PV & New Energy · Now in Canada" />
815
<link rel="preconnect" href="https://fonts.googleapis.com" />
916
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1017
<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" />
@@ -33,6 +40,7 @@
3340
<li><a href="#education">Education</a></li>
3441
<li><a href="#skills">Skills</a></li>
3542
<li><a href="#hobbies">Hobbies</a></li>
43+
<li><a href="#certs">Certs</a></li>
3644
<li><a href="#contact">Contact</a></li>
3745
<li><a href="index-zh.html" class="lang-btn">🇨🇳 中文</a></li>
3846
</ul>
@@ -154,7 +162,7 @@ <h2 class="section-title">Connecting Power, <span class="highlight">Energizing I
154162
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 13a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 2.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 9.91a16 16 0 0 0 6.16 6.16l.91-.91a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"/></svg>
155163
(672) 866-1836
156164
</a>
157-
<a href="https://www.linkedin.com/in/zhangsenye" class="about-link" id="linkedinLink" target="_blank">
165+
<a href="https://www.linkedin.com/in/zhangsenye" class="about-link" id="linkedinLink" target="_blank" rel="noopener noreferrer">
158166
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect x="2" y="9" width="4" height="12"/><circle cx="4" cy="4" r="2"/></svg>
159167
linkedin.com/in/zhangsenye
160168
</a>
@@ -764,7 +772,7 @@ <h2 class="section-title">Let's <span class="highlight">Connect</span></h2>
764772
<div class="contact-label">Phone</div>
765773
<div class="contact-value">(672) 866-1836</div>
766774
</a>
767-
<a href="https://www.linkedin.com/in/zhangsenye" class="contact-card" id="contactLinkedIn" target="_blank">
775+
<a href="https://www.linkedin.com/in/zhangsenye" class="contact-card" id="contactLinkedIn" target="_blank" rel="noopener noreferrer">
768776
<div class="contact-icon">
769777
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect x="2" y="9" width="4" height="12"/><circle cx="4" cy="4" r="2"/></svg>
770778
</div>

style.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@ body {
130130
transition: all 0.3s ease;
131131
}
132132

133+
.nav-toggle.open span:nth-child(1) {
134+
transform: translateY(7px) rotate(45deg);
135+
}
136+
.nav-toggle.open span:nth-child(2) {
137+
opacity: 0;
138+
transform: scaleX(0);
139+
}
140+
.nav-toggle.open span:nth-child(3) {
141+
transform: translateY(-7px) rotate(-45deg);
142+
}
143+
133144
/* ===== HERO SECTION ===== */
134145
.lang-btn {
135146
display: inline-flex;
@@ -528,7 +539,7 @@ section {
528539
.about-intro {
529540
font-size: 1.15rem;
530541
line-height: 1.6;
531-
color: var(--text);
542+
color: var(--text-primary);
532543
margin-bottom: 1.5rem;
533544
}
534545

0 commit comments

Comments
 (0)