| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Animal.js Documentation</title>
- <style>
- :root {
- --sidebar-bg: #111;
- --main-bg: #111;
- --border-color: #222;
- --text-color: #999;
- --active-color: #ff4b4b;
- --hover-color: #eee;
- --middle-col-bg: #161616;
- }
-
- body {
- margin: 0;
- padding: 0;
- height: 100vh;
- display: flex;
- background: var(--main-bg);
- color: var(--text-color);
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
- overflow: hidden;
- }
- /* 1. LEFT SIDEBAR - NAVIGATION */
- .sidebar-left {
- width: 240px;
- background: var(--sidebar-bg);
- border-right: 1px solid var(--border-color);
- display: flex;
- flex-direction: column;
- overflow-y: auto;
- flex-shrink: 0;
- }
- .logo-area {
- padding: 20px;
- font-size: 18px;
- font-weight: bold;
- color: #fff;
- border-bottom: 1px solid var(--border-color);
- display: flex;
- align-items: center;
- gap: 10px;
- }
- .logo-circle {
- width: 12px;
- height: 12px;
- background: var(--active-color);
- border-radius: 50%;
- }
- .nav-group {
- padding: 20px 0;
- }
-
- .nav-header {
- padding: 0 20px 10px 20px;
- font-size: 12px;
- text-transform: uppercase;
- letter-spacing: 1px;
- color: #666;
- font-weight: 600;
- }
- .nav-item {
- display: block;
- padding: 8px 20px;
- color: var(--text-color);
- text-decoration: none;
- font-size: 14px;
- cursor: pointer;
- transition: color 0.2s;
- border-left: 2px solid transparent;
- }
- .nav-item:hover {
- color: var(--hover-color);
- }
- .nav-item.active {
- color: var(--active-color);
- border-left-color: var(--active-color);
- background: rgba(255, 75, 75, 0.05);
- }
-
- .nav-sub {
- padding-left: 35px;
- font-size: 13px;
- }
- /* 2. MIDDLE SIDEBAR - SEARCH & CARDS */
- .sidebar-middle {
- width: 320px;
- background: var(--middle-col-bg);
- border-right: 1px solid var(--border-color);
- display: flex;
- flex-direction: column;
- overflow: hidden;
- flex-shrink: 0;
- }
-
- #search-frame {
- width: 100%;
- height: 100%;
- border: none;
- background: transparent;
- }
- /* 3. RIGHT CONTENT - EXAMPLES & DEMO */
- .content-right {
- flex: 1;
- display: flex;
- flex-direction: column;
- background: #000;
- overflow: hidden;
- }
-
- #content-frame {
- flex: 1;
- border: none;
- width: 100%;
- height: 100%;
- }
- </style>
- </head>
- <body>
- <!-- 1. Left Sidebar -->
- <div class="sidebar-left">
- <div class="logo-area">
- <div class="logo-circle"></div>
- Animal.js
- </div>
-
- <div class="nav-group">
- <div class="nav-item" onclick="loadContent('test_on_update.html')" style="padding-left: 20px; font-weight: 500;">Search</div>
- </div>
-
- <div class="nav-group">
- <div class="nav-header">Getting Started</div>
- <a class="nav-item">Installation</a>
- <a class="nav-item">Module imports</a>
- </div>
- <div class="nav-group">
- <div class="nav-header">Animation</div>
- <div class="nav-item">Targets</div>
- <a class="nav-item nav-sub" onclick="loadContent('test_css_selector.html', this)">CSS Selector</a>
- <a class="nav-item nav-sub" onclick="loadContent('test_css_selector.html', this)">DOM Elements</a>
- <a class="nav-item nav-sub" onclick="loadContent('test_css_selector.html', this)">JavaScript Objects</a>
-
- <div class="nav-item" style="margin-top: 10px;">Callbacks</div>
- <a class="nav-item nav-sub active" onclick="loadContent('test_on_update.html', this)">onUpdate</a>
- <a class="nav-item nav-sub">onBegin</a>
- <a class="nav-item nav-sub">onComplete</a>
- </div>
- </div>
- <!-- 2. Middle Sidebar (Static Search/Hub) -->
- <div class="sidebar-middle">
- <iframe id="search-frame" src="search.html"></iframe>
- </div>
- <!-- 3. Right Content (Examples & Demo) -->
- <div class="content-right">
- <iframe id="content-frame" src="test_on_update.html"></iframe>
- </div>
- <script>
- // Update Right Content directly from Nav
- // AND Middle column stays fixed as 'search.html' per user request
- function loadContent(url, el) {
- document.getElementById('content-frame').src = url;
-
- // Update active state
- document.querySelectorAll('.nav-item').forEach(item => item.classList.remove('active'));
- if (el) el.classList.add('active');
- }
- </script>
- </body>
- </html>
|