mirror of
https://github.com/olehomelchenko/astrolabe-nvc.git
synced 2025-12-21 21:22:23 +00:00
Implement Phase 1: Complete static HTML structure with enhanced UI elements
This commit is contained in:
@@ -51,17 +51,25 @@ Astrolabe is a focused tool for managing, editing, and previewing Vega-Lite visu
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### **Phase 1: Static HTML Structure**
|
### **Phase 1: Static HTML Structure** ✅ **COMPLETE**
|
||||||
**Goal**: Basic three-panel layout with placeholder content
|
**Goal**: Basic three-panel layout with placeholder content
|
||||||
|
|
||||||
- [ ] Create `index.html` with basic structure
|
- [x] Create `index.html` with basic structure
|
||||||
- [ ] Add minimal CSS for three-column flexbox layout
|
- [x] Add minimal CSS for three-column flexbox layout
|
||||||
- [ ] Add placeholder divs for: snippet list, editor, preview
|
- [x] Add placeholder divs for: snippet list, editor, preview
|
||||||
- [ ] Add vertical toggle button strip on far right (3 buttons)
|
- [x] Add vertical toggle button strip (moved to left side with emoji icons)
|
||||||
- [ ] Test that layout renders at correct proportions
|
- [x] Test that layout renders at correct proportions
|
||||||
|
|
||||||
**Deliverable**: Static page with three visible sections + toggle buttons
|
**Deliverable**: Static page with three visible sections + toggle buttons
|
||||||
|
|
||||||
|
**Additional Enhancements Made**:
|
||||||
|
- Added header with site branding (🔭 Astrolabe) and quick action links
|
||||||
|
- Applied retro Windows 2000 aesthetic with square edges and classic colors
|
||||||
|
- Implemented basic toggle functionality for show/hide panels
|
||||||
|
- Added snippet selection highlighting
|
||||||
|
- Used emoji icons for better UX (📄 ✏️ 👁️)
|
||||||
|
- Optimized font sizes for better readability
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### **Phase 2: Resizable Panels**
|
### **Phase 2: Resizable Panels**
|
||||||
@@ -260,5 +268,5 @@ Astrolabe is a focused tool for managing, editing, and previewing Vega-Lite visu
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Current Phase**: Phase 1 - Static HTML Structure
|
**Current Phase**: Phase 2 - Resizable Panels
|
||||||
**Status**: Ready to begin implementation
|
**Status**: Ready to begin implementation
|
||||||
149
index.html
Normal file
149
index.html
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Astrolabe - Vega-Lite Snippet Manager</title>
|
||||||
|
<link rel="stylesheet" href="src/styles.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!-- Header -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="header-left">
|
||||||
|
<span class="header-icon">🔭</span>
|
||||||
|
<span class="header-title">Astrolabe</span>
|
||||||
|
</div>
|
||||||
|
<div class="header-links">
|
||||||
|
<span class="header-link">New</span>
|
||||||
|
<span class="header-link">Import</span>
|
||||||
|
<span class="header-link">Export</span>
|
||||||
|
<span class="header-link">Help</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- Toggle Button Strip -->
|
||||||
|
<div class="toggle-strip">
|
||||||
|
<button class="toggle-btn active" id="toggle-snippets" title="Toggle Snippets Panel">
|
||||||
|
📄
|
||||||
|
</button>
|
||||||
|
<button class="toggle-btn active" id="toggle-editor" title="Toggle Editor Panel">
|
||||||
|
✏️
|
||||||
|
</button>
|
||||||
|
<button class="toggle-btn active" id="toggle-preview" title="Toggle Preview Panel">
|
||||||
|
👁️
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main-panels">
|
||||||
|
<!-- Snippet Library Panel -->
|
||||||
|
<div class="panel snippet-panel" id="snippet-panel">
|
||||||
|
<div class="panel-header">
|
||||||
|
Snippets
|
||||||
|
</div>
|
||||||
|
<div class="panel-content">
|
||||||
|
<ul class="snippet-list">
|
||||||
|
<li class="snippet-item">
|
||||||
|
<div class="snippet-name">2025-10-13_14-23-45</div>
|
||||||
|
<div class="snippet-date">Oct 13, 2:23 PM</div>
|
||||||
|
</li>
|
||||||
|
<li class="snippet-item">
|
||||||
|
<div class="snippet-name">2025-10-12_09-15-30</div>
|
||||||
|
<div class="snippet-date">Oct 12, 9:15 AM</div>
|
||||||
|
</li>
|
||||||
|
<li class="snippet-item">
|
||||||
|
<div class="snippet-name">2025-10-11_16-42-18</div>
|
||||||
|
<div class="snippet-date">Oct 11, 4:42 PM</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="placeholder">
|
||||||
|
Click to select a snippet
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Editor Panel -->
|
||||||
|
<div class="panel editor-panel" id="editor-panel">
|
||||||
|
<div class="panel-header">
|
||||||
|
Editor
|
||||||
|
</div>
|
||||||
|
<div class="panel-content">
|
||||||
|
<div class="editor-placeholder">
|
||||||
|
<div class="placeholder">
|
||||||
|
Monaco Editor will load here
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 8px; font-size: 12px; color: #adb5bd;">
|
||||||
|
JSON schema validation • Autocomplete • Syntax highlighting
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Preview Panel -->
|
||||||
|
<div class="panel preview-panel" id="preview-panel">
|
||||||
|
<div class="panel-header">
|
||||||
|
Preview
|
||||||
|
</div>
|
||||||
|
<div class="panel-content">
|
||||||
|
<div class="preview-placeholder">
|
||||||
|
<div class="placeholder">
|
||||||
|
Vega-Lite visualization will render here
|
||||||
|
</div>
|
||||||
|
<div style="margin-top: 8px; font-size: 12px; color: #adb5bd;">
|
||||||
|
Live preview • Auto-refresh • Error display
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Basic toggle functionality (placeholder)
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const toggleButtons = document.querySelectorAll('.toggle-btn');
|
||||||
|
const panels = {
|
||||||
|
'toggle-snippets': document.getElementById('snippet-panel'),
|
||||||
|
'toggle-editor': document.getElementById('editor-panel'),
|
||||||
|
'toggle-preview': document.getElementById('preview-panel')
|
||||||
|
};
|
||||||
|
|
||||||
|
toggleButtons.forEach(button => {
|
||||||
|
button.addEventListener('click', function () {
|
||||||
|
const panelId = this.id;
|
||||||
|
const panel = panels[panelId];
|
||||||
|
|
||||||
|
if (panel.style.display === 'none') {
|
||||||
|
panel.style.display = 'flex';
|
||||||
|
this.classList.add('active');
|
||||||
|
} else {
|
||||||
|
panel.style.display = 'none';
|
||||||
|
this.classList.remove('active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Basic snippet selection
|
||||||
|
const snippetItems = document.querySelectorAll('.snippet-item');
|
||||||
|
snippetItems.forEach(item => {
|
||||||
|
item.addEventListener('click', function () {
|
||||||
|
snippetItems.forEach(i => i.classList.remove('selected'));
|
||||||
|
this.classList.add('selected');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Header link handlers (placeholder)
|
||||||
|
const headerLinks = document.querySelectorAll('.header-link');
|
||||||
|
headerLinks.forEach(link => {
|
||||||
|
link.addEventListener('click', function () {
|
||||||
|
console.log('Header link clicked:', this.textContent);
|
||||||
|
// TODO: Implement actual functionality in future phases
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
212
src/styles.css
Normal file
212
src/styles.css
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'MS Sans Serif', Tahoma, sans-serif;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #c0c0c0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
background: #c0c0c0;
|
||||||
|
border-bottom: 2px solid #808080;
|
||||||
|
padding: 6px 12px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 36px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-icon {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-links {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-link {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #000000;
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-link:hover {
|
||||||
|
background: #316ac5;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-container {
|
||||||
|
display: flex;
|
||||||
|
height: calc(100vh - 36px);
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-strip {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background: #c0c0c0;
|
||||||
|
width: 32px;
|
||||||
|
border-right: 2px solid #808080;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-panels {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-right: 2px solid #808080;
|
||||||
|
background: #c0c0c0;
|
||||||
|
min-width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel:last-child {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-header {
|
||||||
|
padding: 8px 12px;
|
||||||
|
background: #c0c0c0;
|
||||||
|
border-bottom: 2px solid #808080;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-content {
|
||||||
|
flex: 1;
|
||||||
|
padding: 8px;
|
||||||
|
overflow: auto;
|
||||||
|
background: #ffffff;
|
||||||
|
border: 1px inset #c0c0c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Panel sizing */
|
||||||
|
.snippet-panel {
|
||||||
|
flex: 0 0 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-panel {
|
||||||
|
flex: 0 0 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-panel {
|
||||||
|
flex: 0 0 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Toggle buttons */
|
||||||
|
.toggle-btn {
|
||||||
|
background: #c0c0c0;
|
||||||
|
border: 2px outset #c0c0c0;
|
||||||
|
color: #000000;
|
||||||
|
padding: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
height: 32px;
|
||||||
|
width: 32px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-btn:hover {
|
||||||
|
background: #d4d0c8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-btn:active {
|
||||||
|
border: 2px inset #c0c0c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-btn.active {
|
||||||
|
background: #d4d0c8;
|
||||||
|
border: 2px inset #c0c0c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Placeholder content styling */
|
||||||
|
.placeholder {
|
||||||
|
color: #808080;
|
||||||
|
font-style: italic;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 40px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.snippet-list {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.snippet-item {
|
||||||
|
padding: 4px 8px;
|
||||||
|
border: 1px solid #808080;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.snippet-item:hover {
|
||||||
|
background: #316ac5;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.snippet-item.selected {
|
||||||
|
background: #316ac5;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.snippet-name {
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.snippet-date {
|
||||||
|
font-size: 11px;
|
||||||
|
color: inherit;
|
||||||
|
margin-top: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-placeholder {
|
||||||
|
background: #ffffff;
|
||||||
|
border: 2px inset #c0c0c0;
|
||||||
|
height: 300px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-placeholder {
|
||||||
|
background: #ffffff;
|
||||||
|
border: 2px inset #c0c0c0;
|
||||||
|
height: 300px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 8px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user