index.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Animal.js Documentation</title>
  7. <style>
  8. :root {
  9. --sidebar-bg: #111;
  10. --main-bg: #111;
  11. --border-color: #222;
  12. --text-color: #999;
  13. --active-color: #ff4b4b;
  14. --hover-color: #eee;
  15. --middle-col-bg: #161616;
  16. }
  17. body {
  18. margin: 0;
  19. padding: 0;
  20. height: 100vh;
  21. display: flex;
  22. background: var(--main-bg);
  23. color: var(--text-color);
  24. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  25. overflow: hidden;
  26. }
  27. /* 1. LEFT SIDEBAR - NAVIGATION */
  28. .sidebar-left {
  29. width: 240px;
  30. background: var(--sidebar-bg);
  31. border-right: 1px solid var(--border-color);
  32. display: flex;
  33. flex-direction: column;
  34. overflow-y: auto;
  35. flex-shrink: 0;
  36. }
  37. .logo-area {
  38. padding: 20px;
  39. font-size: 18px;
  40. font-weight: bold;
  41. color: #fff;
  42. border-bottom: 1px solid var(--border-color);
  43. display: flex;
  44. align-items: center;
  45. gap: 10px;
  46. }
  47. .logo-circle {
  48. width: 12px;
  49. height: 12px;
  50. background: var(--active-color);
  51. border-radius: 50%;
  52. }
  53. .nav-group {
  54. padding: 20px 0;
  55. }
  56. .nav-header {
  57. padding: 0 20px 10px 20px;
  58. font-size: 12px;
  59. text-transform: uppercase;
  60. letter-spacing: 1px;
  61. color: #666;
  62. font-weight: 600;
  63. }
  64. .nav-item {
  65. display: block;
  66. padding: 8px 20px;
  67. color: var(--text-color);
  68. text-decoration: none;
  69. font-size: 14px;
  70. cursor: pointer;
  71. transition: color 0.2s;
  72. border-left: 2px solid transparent;
  73. }
  74. .nav-item:hover {
  75. color: var(--hover-color);
  76. }
  77. .nav-item.active {
  78. color: var(--active-color);
  79. border-left-color: var(--active-color);
  80. background: rgba(255, 75, 75, 0.05);
  81. }
  82. .nav-sub {
  83. padding-left: 35px;
  84. font-size: 13px;
  85. }
  86. /* 2. MIDDLE SIDEBAR - SEARCH & CARDS */
  87. .sidebar-middle {
  88. width: 320px;
  89. background: var(--middle-col-bg);
  90. border-right: 1px solid var(--border-color);
  91. display: flex;
  92. flex-direction: column;
  93. overflow: hidden;
  94. flex-shrink: 0;
  95. }
  96. #search-frame {
  97. width: 100%;
  98. height: 100%;
  99. border: none;
  100. background: transparent;
  101. }
  102. /* 3. RIGHT CONTENT - EXAMPLES & DEMO */
  103. .content-right {
  104. flex: 1;
  105. display: flex;
  106. flex-direction: column;
  107. background: #000;
  108. overflow: hidden;
  109. }
  110. #content-frame {
  111. flex: 1;
  112. border: none;
  113. width: 100%;
  114. height: 100%;
  115. }
  116. </style>
  117. </head>
  118. <body>
  119. <!-- 1. Left Sidebar -->
  120. <div class="sidebar-left">
  121. <div class="logo-area">
  122. <div class="logo-circle"></div>
  123. Animal.js
  124. </div>
  125. <div class="nav-group">
  126. <div class="nav-item" onclick="loadContent('test_on_update.html')" style="padding-left: 20px; font-weight: 500;">Search</div>
  127. </div>
  128. <div class="nav-group">
  129. <div class="nav-header">Getting Started</div>
  130. <a class="nav-item">Installation</a>
  131. <a class="nav-item">Module imports</a>
  132. </div>
  133. <div class="nav-group">
  134. <div class="nav-header">Animation</div>
  135. <div class="nav-item">Targets</div>
  136. <a class="nav-item nav-sub" onclick="loadContent('test_css_selector.html', this)">CSS Selector</a>
  137. <a class="nav-item nav-sub" onclick="loadContent('test_css_selector.html', this)">DOM Elements</a>
  138. <a class="nav-item nav-sub" onclick="loadContent('test_css_selector.html', this)">JavaScript Objects</a>
  139. <div class="nav-item" style="margin-top: 10px;">Callbacks</div>
  140. <a class="nav-item nav-sub active" onclick="loadContent('test_on_update.html', this)">onUpdate</a>
  141. <a class="nav-item nav-sub">onBegin</a>
  142. <a class="nav-item nav-sub">onComplete</a>
  143. </div>
  144. </div>
  145. <!-- 2. Middle Sidebar (Static Search/Hub) -->
  146. <div class="sidebar-middle">
  147. <iframe id="search-frame" src="search.html"></iframe>
  148. </div>
  149. <!-- 3. Right Content (Examples & Demo) -->
  150. <div class="content-right">
  151. <iframe id="content-frame" src="test_on_update.html"></iframe>
  152. </div>
  153. <script>
  154. // Update Right Content directly from Nav
  155. // AND Middle column stays fixed as 'search.html' per user request
  156. function loadContent(url, el) {
  157. document.getElementById('content-frame').src = url;
  158. // Update active state
  159. document.querySelectorAll('.nav-item').forEach(item => item.classList.remove('active'));
  160. if (el) el.classList.add('active');
  161. }
  162. </script>
  163. </body>
  164. </html>