|
|
@@ -9,10 +9,12 @@
|
|
|
--sidebar-bg: #111;
|
|
|
--main-bg: #111;
|
|
|
--border-color: #222;
|
|
|
- --text-color: #999;
|
|
|
- --active-color: #ff4b4b;
|
|
|
- --hover-color: #eee;
|
|
|
+ --text-color: #888;
|
|
|
+ --text-hover: #ccc;
|
|
|
+ --active-color: #ff4b4b; /* Red/Orange for active item */
|
|
|
+ --header-color: #666;
|
|
|
--middle-col-bg: #161616;
|
|
|
+ --tree-line-color: #333;
|
|
|
}
|
|
|
|
|
|
body {
|
|
|
@@ -24,76 +26,124 @@
|
|
|
color: var(--text-color);
|
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
|
overflow: hidden;
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
|
|
|
|
- /* 1. LEFT SIDEBAR - NAVIGATION */
|
|
|
+ /* 1. LEFT SIDEBAR - MAIN NAVIGATION */
|
|
|
.sidebar-left {
|
|
|
- width: 240px;
|
|
|
+ width: 260px;
|
|
|
background: var(--sidebar-bg);
|
|
|
border-right: 1px solid var(--border-color);
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
overflow-y: auto;
|
|
|
flex-shrink: 0;
|
|
|
+ padding-bottom: 40px;
|
|
|
}
|
|
|
|
|
|
.logo-area {
|
|
|
- padding: 20px;
|
|
|
+ padding: 24px 20px;
|
|
|
font-size: 18px;
|
|
|
font-weight: bold;
|
|
|
color: #fff;
|
|
|
- border-bottom: 1px solid var(--border-color);
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
gap: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
}
|
|
|
.logo-circle {
|
|
|
- width: 12px;
|
|
|
- height: 12px;
|
|
|
- background: var(--active-color);
|
|
|
+ width: 10px;
|
|
|
+ height: 10px;
|
|
|
+ background: #fff;
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
|
|
|
- .nav-group {
|
|
|
- padding: 20px 0;
|
|
|
+ /* Tree Structure */
|
|
|
+ .nav-tree {
|
|
|
+ padding: 0 20px;
|
|
|
}
|
|
|
-
|
|
|
- .nav-header {
|
|
|
- padding: 0 20px 10px 20px;
|
|
|
- font-size: 12px;
|
|
|
- text-transform: uppercase;
|
|
|
- letter-spacing: 1px;
|
|
|
- color: #666;
|
|
|
+
|
|
|
+ .tree-group {
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tree-header {
|
|
|
+ padding: 8px 0;
|
|
|
+ color: var(--header-color);
|
|
|
font-weight: 600;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: color 0.2s;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tree-header:hover {
|
|
|
+ color: var(--text-hover);
|
|
|
+ }
|
|
|
+
|
|
|
+ .tree-header.active-header {
|
|
|
+ color: #e69f3c; /* Highlight parent if needed, usually just children */
|
|
|
+ }
|
|
|
+
|
|
|
+ .tree-children {
|
|
|
+ padding-left: 14px; /* Indent */
|
|
|
+ border-left: 1px solid var(--tree-line-color);
|
|
|
+ margin-left: 2px;
|
|
|
+ display: none; /* Collapsed by default */
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tree-children.expanded {
|
|
|
+ display: flex;
|
|
|
}
|
|
|
|
|
|
.nav-item {
|
|
|
display: block;
|
|
|
- padding: 8px 20px;
|
|
|
+ padding: 6px 0 6px 15px;
|
|
|
color: var(--text-color);
|
|
|
text-decoration: none;
|
|
|
- font-size: 14px;
|
|
|
cursor: pointer;
|
|
|
- transition: color 0.2s;
|
|
|
- border-left: 2px solid transparent;
|
|
|
+ transition: all 0.2s;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
.nav-item:hover {
|
|
|
- color: var(--hover-color);
|
|
|
+ color: var(--text-hover);
|
|
|
}
|
|
|
|
|
|
+ /* Active Item Style (Reference: Red text, maybe red border left overlaying the gray line?) */
|
|
|
.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;
|
|
|
+ /* Optional: Active marker on the left line */
|
|
|
+ .nav-item.active::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ left: -1px; /* Overlap the border */
|
|
|
+ top: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 2px;
|
|
|
+ background: var(--active-color);
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Search Box in sidebar */
|
|
|
+ .sidebar-search {
|
|
|
+ margin: 0 20px 20px 20px;
|
|
|
+ background: #1a1a1a;
|
|
|
+ border: 1px solid #333;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 8px 12px;
|
|
|
+ color: #fff;
|
|
|
font-size: 13px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .sidebar-search:hover {
|
|
|
+ border-color: #555;
|
|
|
}
|
|
|
|
|
|
- /* 2. MIDDLE SIDEBAR - SEARCH & CARDS */
|
|
|
+ /* 2. MIDDLE SIDEBAR */
|
|
|
.sidebar-middle {
|
|
|
width: 320px;
|
|
|
background: var(--middle-col-bg);
|
|
|
@@ -103,15 +153,14 @@
|
|
|
overflow: hidden;
|
|
|
flex-shrink: 0;
|
|
|
}
|
|
|
-
|
|
|
- #search-frame {
|
|
|
+ #middle-frame {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
border: none;
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
- /* 3. RIGHT CONTENT - EXAMPLES & DEMO */
|
|
|
+ /* 3. RIGHT CONTENT */
|
|
|
.content-right {
|
|
|
flex: 1;
|
|
|
display: flex;
|
|
|
@@ -119,7 +168,6 @@
|
|
|
background: #000;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
-
|
|
|
#content-frame {
|
|
|
flex: 1;
|
|
|
border: none;
|
|
|
@@ -138,49 +186,107 @@
|
|
|
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 class="sidebar-search" onclick="selectCategory('search.html', 'test_on_update.html', null)">
|
|
|
+ Search
|
|
|
</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-tree">
|
|
|
+ <!-- Group: Getting Started -->
|
|
|
+ <div class="tree-group">
|
|
|
+ <div class="tree-header" onclick="toggleTree(this)">Getting started</div>
|
|
|
+ <div class="tree-children">
|
|
|
+ <div class="nav-item" onclick="selectCategory('search.html', 'test_css_selector.html', this)">Installation</div>
|
|
|
+ <div class="nav-item" onclick="selectCategory('search.html', 'test_css_selector.html', this)">Module imports</div>
|
|
|
+ </div>
|
|
|
+ </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>
|
|
|
+ <!-- Group: Timer -->
|
|
|
+ <div class="tree-group">
|
|
|
+ <div class="tree-header" onclick="toggleTree(this)">Timer</div>
|
|
|
+ <div class="tree-children">
|
|
|
+ <div class="nav-item">Settings</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Group: Animation -->
|
|
|
+ <div class="tree-group">
|
|
|
+ <div class="tree-header active-header" onclick="toggleTree(this)">Animation</div>
|
|
|
+ <div class="tree-children expanded">
|
|
|
+ <div class="nav-item active" onclick="selectCategory('targets/list.html', 'targets/test_css_selector.html', this)">Targets</div>
|
|
|
+ <div class="nav-item" onclick="selectCategory('animatable_properties/list.html', 'animatable_properties/test_css_props.html', this)">Animatable properties</div>
|
|
|
+ <div class="nav-item" onclick="selectCategory('tween_value_types/list.html', 'tween_value_types/test_numerical.html', this)">Tween value types</div>
|
|
|
+ <div class="nav-item">Tween parameters</div>
|
|
|
+ <div class="nav-item">Keyframes</div>
|
|
|
+ <div class="nav-item">Playback settings</div>
|
|
|
+
|
|
|
+ <!-- Callbacks Nested? Or separate? Reference shows Callbacks under Animation -->
|
|
|
+ <div class="nav-item" onclick="selectCategory('list_callbacks.html', 'test_on_update.html', this)">Callbacks</div>
|
|
|
+
|
|
|
+ <div class="nav-item">Methods</div>
|
|
|
+ <div class="nav-item">Properties</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Group: Timeline -->
|
|
|
+ <div class="tree-group">
|
|
|
+ <div class="tree-header" onclick="toggleTree(this)">Timeline</div>
|
|
|
+ <div class="tree-children">
|
|
|
+ <div class="nav-item">Basics</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <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>
|
|
|
+ <!-- Group: Animatable -->
|
|
|
+ <div class="tree-group">
|
|
|
+ <div class="tree-header" onclick="toggleTree(this)">Animatable</div>
|
|
|
+ <div class="tree-children">
|
|
|
+ <div class="nav-item">Properties</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 2. Middle Sidebar (Static Search/Hub) -->
|
|
|
+ <!-- 2. Middle Sidebar -->
|
|
|
<div class="sidebar-middle">
|
|
|
- <iframe id="search-frame" src="search.html"></iframe>
|
|
|
+ <iframe id="middle-frame" src="targets/list.html"></iframe>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 3. Right Content (Examples & Demo) -->
|
|
|
+ <!-- 3. Right Content -->
|
|
|
<div class="content-right">
|
|
|
- <iframe id="content-frame" src="test_on_update.html"></iframe>
|
|
|
+ <iframe id="content-frame" src="targets/test_css_selector.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
|
|
|
+ function toggleTree(header) {
|
|
|
+ const children = header.nextElementSibling;
|
|
|
+ if (children) {
|
|
|
+ children.classList.toggle('expanded');
|
|
|
+
|
|
|
+ // Optional: Highlight header when expanded?
|
|
|
+ // header.classList.toggle('active-header');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function selectCategory(listUrl, defaultContentUrl, el) {
|
|
|
+ // 1. Highlight Nav Item
|
|
|
document.querySelectorAll('.nav-item').forEach(item => item.classList.remove('active'));
|
|
|
if (el) el.classList.add('active');
|
|
|
+
|
|
|
+ // 2. Load Middle Column (List)
|
|
|
+ const middleFrame = document.getElementById('middle-frame');
|
|
|
+ if (middleFrame.getAttribute('src') !== listUrl) {
|
|
|
+ middleFrame.src = listUrl;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 3. Load Right Column (Default Content)
|
|
|
+ loadContent(defaultContentUrl);
|
|
|
+ }
|
|
|
+
|
|
|
+ function loadContent(url) {
|
|
|
+ const contentFrame = document.getElementById('content-frame');
|
|
|
+ if (contentFrame.getAttribute('src') !== url) {
|
|
|
+ contentFrame.src = url;
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
</body>
|