Skip to content

Commit 206e761

Browse files
committed
Enhance navigation highlighting and styling for improved user experience
1 parent f832bca commit 206e761

File tree

3 files changed

+36
-5
lines changed

3 files changed

+36
-5
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ <h1>Jaseci: An Open-Source AI-Native Language and Runtime Stack</h1>
9393
<div class="text-block">
9494
<p>
9595
Agentic AI development is broken. Too many tools, too many languages, too much glue code.
96-
<a href="https://www.jaseci.org/" target="_blank" rel="noopener"><strong>Jaseci</strong></a> fixes this: an open-source language and runtime extending Python with native AI
96+
<strong>Jaseci</strong> fixes this: an open-source language and runtime extending Python with native AI
9797
and scaling constructs. Prompt less, smile more. No boilerplate, no DevOps, no manual prompts.
9898
</p>
9999
</div>
@@ -113,7 +113,7 @@ <h2>Tutorial Themes</h2>
113113
<div class="theme-label">Theme 1</div>
114114
<div class="theme-title">Hands-On Agentic AI Development</div>
115115
<div class="theme-audience">For developers and students</div>
116-
<div class="theme-desc">Write <a href="https://byllm.jaseci.org/" target="_blank" rel="noopener"><code class="code-hl">by llm()</code></a> and the compiler writes the prompts. Build multi-agent systems with walkers on graphs. Zero boilerplate.</div>
116+
<div class="theme-desc">Write <code class="code-hl">by llm()</code> and the compiler writes the prompts. Build multi-agent systems with walkers on graphs. Zero boilerplate.</div>
117117
<div class="theme-glow"></div>
118118
</div>
119119
<div class="theme-card theme-2">

script.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,28 @@ document.addEventListener('DOMContentLoaded', () => {
5050
sections.forEach(current => {
5151
const sectionTop = current.offsetTop - 100;
5252
const sectionId = current.getAttribute('id');
53+
54+
// Sidebar navigation
5355
const navLink = document.querySelector(`.nav-links a[href="#${sectionId}"]`);
54-
if (navLink) {
55-
if (scrollY > sectionTop && scrollY <= sectionTop + current.offsetHeight) {
56+
// On this page navigation
57+
const onThisPageLink = document.querySelector(`.on-this-page a[href="#${sectionId}"]`);
58+
59+
if (scrollY > sectionTop && scrollY <= sectionTop + current.offsetHeight) {
60+
// Update sidebar nav
61+
if (navLink) {
5662
document.querySelectorAll('.nav-links a[href^="#"]').forEach(a => a.classList.remove('active'));
5763
navLink.classList.add('active');
5864
}
65+
// Update on this page nav
66+
if (onThisPageLink) {
67+
document.querySelectorAll('.on-this-page a').forEach(a => a.classList.remove('active'));
68+
onThisPageLink.classList.add('active');
69+
}
5970
}
6071
});
6172
}
6273

6374
window.addEventListener('scroll', highlightNavigation);
75+
// Run once on load to highlight initial section
76+
highlightNavigation();
6477
});

styles.css

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,11 +945,19 @@ h2 {
945945
color: var(--text-muted);
946946
text-decoration: none;
947947
font-size: 0.88rem;
948-
transition: color 0.2s;
948+
transition: color 0.2s, border-color 0.2s;
949+
border-left: 2px solid transparent;
950+
margin-left: -2px;
949951
}
950952

951953
.on-this-page li a:hover { color: var(--primary-color); }
952954

955+
.on-this-page li a.active {
956+
color: var(--primary-color);
957+
border-left-color: var(--primary-color);
958+
font-weight: 600;
959+
}
960+
953961
/* Footer */
954962
.site-footer {
955963
padding: 40px;
@@ -958,6 +966,16 @@ h2 {
958966
border-top: 1px solid var(--border-color);
959967
}
960968

969+
.site-footer a {
970+
color: var(--primary-color);
971+
text-decoration: none;
972+
transition: opacity 0.2s;
973+
}
974+
975+
.site-footer a:hover {
976+
opacity: 0.8;
977+
}
978+
961979
/* Mobile menu */
962980
#mobile-menu-btn { display: block; margin-right: 16px; }
963981
#mobile-close-btn { display: none; }

0 commit comments

Comments
 (0)