Skip to content

Commit 8bdaf4e

Browse files
authored
Make the website mobile friendly (#15396)
Initial Render <img width="386" height="839" alt="Screenshot 2025-10-27 at 1 58 14 PM" src="https://github.com/user-attachments/assets/8bf8305e-fca9-4793-b29c-8bafd4f076a8" /> Click on hamburger <img width="388" height="820" alt="Screenshot 2025-10-27 at 1 58 20 PM" src="https://github.com/user-attachments/assets/55940c52-f0a6-4eef-90ae-69a10796a5b9" />
1 parent cd6f2e2 commit 8bdaf4e

File tree

2 files changed

+235
-13
lines changed

2 files changed

+235
-13
lines changed

website/index.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html lang="en">
44
<head>
55
<meta charset="UTF-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
77
<title>ExecuTorch - On-Device AI Inference Powered by PyTorch</title>
88
<meta name="description" content="ExecuTorch is PyTorch's unified solution for deploying AI models on-device—from smartphones to microcontrollers. Deploy LLMs, vision, speech, and multimodal models with the same PyTorch APIs.">
99
<link rel="icon" type="image/svg+xml" href="https://raw.githubusercontent.com/dbort/executorch-logos/main/img/executorch-chip-logo.svg">
@@ -29,17 +29,18 @@
2929
<img src="https://raw.githubusercontent.com/dbort/executorch-logos/main/img/executorch-chip-logo.svg" alt="ExecuTorch Logo" height="40">
3030
<span style="color:#e0f2fe;">ExecuTorch</span>
3131
</div>
32-
<ul class="nav-links">
32+
<ul class="nav-links" id="navLinks">
3333
<li><a href="#why-ondevice">Why On-Device</a></li>
3434
<li><a href="#challenges">Challenges</a></li>
3535
<li><a href="#features">Solution</a></li>
36-
<li><a href="#performance">Performance</a></li>
36+
<li><a href="#performance">Backends</a></li>
3737
<li><a href="#partners">Partners</a></li>
3838
<li><a href="https://github.com/pytorch/executorch" target="_blank">GitHub</a></li>
3939
</ul>
4040
<form class="nav-search" action="https://docs.pytorch.org/executorch/1.0/search.html" method="get">
4141
<input type="text" placeholder="Search docs…" name="q" style="padding: 0.5rem 1rem; border-radius: 6px; border: 1px solid #e2e8f0;">
4242
</form>
43+
<button class="nav-toggle" onclick="toggleNav()" aria-label="Toggle navigation"></button>
4344
</div>
4445
</div>
4546
</nav>
@@ -1055,13 +1056,19 @@ <h2 class="cta-title">Ready to Deploy AI at the Edge?</h2>
10551056
navLinks.classList.toggle('open');
10561057
}
10571058

1058-
// Highlight active nav link on click
1059+
// Highlight active nav link on click and close menu on mobile
10591060
document.querySelectorAll('.nav-links a').forEach(function(link) {
10601061
link.addEventListener('click', function() {
10611062
document.querySelectorAll('.nav-links a').forEach(function(l) {
10621063
l.classList.remove('active');
10631064
});
10641065
this.classList.add('active');
1066+
1067+
// Close mobile menu when clicking a link
1068+
var navLinks = document.getElementById('navLinks');
1069+
if (navLinks.classList.contains('open')) {
1070+
navLinks.classList.remove('open');
1071+
}
10651072
});
10661073
});
10671074
</script>

0 commit comments

Comments
 (0)