Skip to content

Commit 509f615

Browse files
DevRohit06claude
andcommitted
Add custom landing page, logo, and favicon
- Create branded landing page with 6 sections: hero with animated graph, how-it-works strip, feature showcase tabs, terminal demo, bento grid, CTA - Add graph-network SVG logo (light/dark variants) and favicon - Configure logo and landing page in docs-config.json - Place static assets in docs/public/ for proper CLI sync Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4edde0d commit 509f615

8 files changed

Lines changed: 1794 additions & 0 deletions

File tree

docs/_landing/index.html

Lines changed: 399 additions & 0 deletions
Large diffs are not rendered by default.

docs/_landing/navbar.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<nav class="ln" id="ln">
2+
<div class="ln-inner">
3+
<a href="/" class="ln-brand">
4+
<svg width="24" height="24" viewBox="0 0 32 32" fill="none" class="ln-logo">
5+
<line x1="8" y1="8" x2="24" y2="8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
6+
<line x1="8" y1="8" x2="8" y2="24" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
7+
<line x1="24" y1="8" x2="24" y2="24" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
8+
<line x1="8" y1="24" x2="24" y2="24" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
9+
<line x1="8" y1="8" x2="24" y2="24" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity="0.4"/>
10+
<line x1="24" y1="8" x2="8" y2="24" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity="0.4"/>
11+
<circle cx="8" cy="8" r="3" fill="currentColor"/>
12+
<circle cx="24" cy="8" r="3" fill="currentColor"/>
13+
<circle cx="8" cy="24" r="3" fill="currentColor"/>
14+
<circle cx="24" cy="24" r="3" fill="currentColor"/>
15+
</svg>
16+
<span>Lito Graph</span>
17+
</a>
18+
<div class="ln-links">
19+
<a href="/introduction">Docs</a>
20+
<a href="/api/list-nodes">API</a>
21+
<a href="https://github.com/Lito-docs/cli" target="_blank" rel="noopener">GitHub</a>
22+
</div>
23+
<div class="ln-right">
24+
<a href="https://github.com/Lito-docs/cli" target="_blank" rel="noopener" class="ln-icon" aria-label="GitHub">
25+
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
26+
</a>
27+
<button id="themeToggle" type="button" class="ln-icon" aria-label="Toggle theme">
28+
<svg class="ico-sun" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>
29+
<svg class="ico-moon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
30+
</button>
31+
<a href="/getting-started/quick-start" class="ln-cta">Get Started</a>
32+
<button id="menuToggle" type="button" class="ln-menu-btn" aria-label="Toggle menu">
33+
<span></span><span></span><span></span>
34+
</button>
35+
</div>
36+
</div>
37+
<div class="ln-dropdown" id="mobileMenu">
38+
<a href="/introduction">Docs</a>
39+
<a href="/api/list-nodes">API Reference</a>
40+
<a href="https://github.com/Lito-docs/cli" target="_blank" rel="noopener">GitHub</a>
41+
<a href="/getting-started/quick-start" class="ln-drop-cta">Get Started</a>
42+
</div>
43+
</nav>

docs/_landing/script.js

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
// Lito Graph Landing Page Scripts
2+
(function () {
3+
// ---- Theme: respect system preference on first visit ----
4+
var stored = localStorage.getItem('theme');
5+
if (!stored) {
6+
var prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
7+
document.documentElement.classList.toggle('dark', prefersDark);
8+
document.documentElement.classList.toggle('light', !prefersDark);
9+
}
10+
11+
// ---- Navbar scroll ----
12+
var nav = document.getElementById('ln');
13+
var hero = document.querySelector('.hero');
14+
15+
function updateNav() {
16+
if (!hero || !nav) return;
17+
nav.classList.toggle('scrolled', window.scrollY > hero.offsetHeight - 80);
18+
}
19+
20+
window.addEventListener('scroll', updateNav, { passive: true });
21+
updateNav();
22+
23+
// ---- Mobile menu ----
24+
var menuBtn = document.getElementById('menuToggle');
25+
var mobileMenu = document.getElementById('mobileMenu');
26+
27+
if (menuBtn && mobileMenu) {
28+
menuBtn.addEventListener('click', function () {
29+
var open = mobileMenu.classList.toggle('open');
30+
menuBtn.classList.toggle('active', open);
31+
menuBtn.setAttribute('aria-expanded', open);
32+
});
33+
}
34+
35+
// ---- Theme toggle ----
36+
var themeBtn = document.getElementById('themeToggle');
37+
if (themeBtn) {
38+
themeBtn.addEventListener('click', function () {
39+
var isDark = document.documentElement.classList.toggle('dark');
40+
document.documentElement.classList.toggle('light', !isDark);
41+
localStorage.setItem('theme', isDark ? 'dark' : 'light');
42+
});
43+
}
44+
45+
// ---- Scroll reveals ----
46+
var els = document.querySelectorAll('[data-reveal]');
47+
var revealEls = [];
48+
for (var i = 0; i < els.length; i++) {
49+
if (!els[i].closest('.hero')) revealEls.push(els[i]);
50+
}
51+
52+
if (revealEls.length && 'IntersectionObserver' in window) {
53+
var obs = new IntersectionObserver(function (entries) {
54+
entries.forEach(function (e) {
55+
if (!e.isIntersecting) return;
56+
var el = e.target;
57+
var parent = el.parentElement;
58+
var siblings = parent
59+
? Array.prototype.filter.call(parent.children, function (c) { return c.hasAttribute('data-reveal'); })
60+
: [el];
61+
var idx = siblings.indexOf(el);
62+
setTimeout(function () { el.classList.add('revealed'); }, idx * 80);
63+
obs.unobserve(el);
64+
});
65+
}, { threshold: 0.1, rootMargin: '0px 0px -40px 0px' });
66+
67+
revealEls.forEach(function (el) { obs.observe(el); });
68+
} else {
69+
for (var j = 0; j < els.length; j++) els[j].classList.add('revealed');
70+
}
71+
72+
// ---- Showcase tabs ----
73+
var tabs = document.querySelectorAll('.sc-tab');
74+
var panels = document.querySelectorAll('.sc-panel');
75+
76+
tabs.forEach(function (tab) {
77+
tab.addEventListener('click', function () {
78+
var target = tab.getAttribute('data-tab');
79+
tabs.forEach(function (t) { t.classList.remove('active'); });
80+
panels.forEach(function (p) { p.classList.remove('active'); });
81+
tab.classList.add('active');
82+
var panel = document.querySelector('[data-panel="' + target + '"]');
83+
if (panel) panel.classList.add('active');
84+
});
85+
});
86+
87+
// ---- Terminal typing (left panel) ----
88+
var cmd = 'npx @litodocs/graph https://docs.example.com/graph.json';
89+
var typedEl = document.getElementById('typed');
90+
var cursorEl = document.getElementById('cursor');
91+
var ci = 0;
92+
93+
function typeNext() {
94+
if (!typedEl) return;
95+
if (ci < cmd.length) {
96+
typedEl.textContent += cmd[ci];
97+
ci++;
98+
setTimeout(typeNext, 40 + Math.random() * 30);
99+
} else {
100+
setTimeout(function () {
101+
if (cursorEl) cursorEl.style.display = 'none';
102+
showOut();
103+
}, 500);
104+
}
105+
}
106+
107+
function showOut() {
108+
['o1', 'o2', 'o3'].forEach(function (id, i) {
109+
setTimeout(function () {
110+
var el = document.getElementById(id);
111+
if (!el) return;
112+
el.style.display = 'flex';
113+
void el.offsetHeight;
114+
el.classList.add('show');
115+
}, i * 600);
116+
});
117+
// Show right panel agent output after left finishes
118+
setTimeout(showAgent, 2200);
119+
}
120+
121+
// ---- Agent panel typing ----
122+
function showAgent() {
123+
['a1', 'a2', 'a3', 'a4', 'a5', 'a6'].forEach(function (id, i) {
124+
setTimeout(function () {
125+
var el = document.getElementById(id);
126+
if (!el) return;
127+
el.style.display = 'block';
128+
void el.offsetHeight;
129+
el.classList.add('show');
130+
}, i * 300);
131+
});
132+
}
133+
134+
setTimeout(typeNext, 900);
135+
})();

0 commit comments

Comments
 (0)