GCStream commited on
Commit
e451716
·
verified ·
1 Parent(s): fa18f9a

Add tools/dataview/static/index.html

Browse files
Files changed (1) hide show
  1. tools/dataview/static/index.html +192 -0
tools/dataview/static/index.html ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>DataView</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="/static/style.css">
11
+ </head>
12
+ <body>
13
+
14
+ <!-- Folder browser panel -->
15
+ <aside id="sidebar" class="sidebar">
16
+ <div class="sidebar-head">
17
+ <span class="sidebar-label">Browse files</span>
18
+ <button id="btn-close-sidebar" class="btn-icon" aria-label="Close">&times;</button>
19
+ </div>
20
+ <div id="breadcrumb" class="breadcrumb"></div>
21
+ <div id="folder-list" class="folder-list"></div>
22
+ </aside>
23
+ <div id="sidebar-backdrop" class="backdrop"></div>
24
+
25
+ <!-- Header -->
26
+ <header class="header">
27
+ <button id="btn-browse" class="header-btn" title="Browse folders">
28
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg>
29
+ Browse
30
+ </button>
31
+ <div class="path-wrap">
32
+ <input id="file-path" type="text" placeholder="Paste a file path to open" spellcheck="false">
33
+ <button id="btn-open" class="path-open-btn">Open</button>
34
+ </div>
35
+ <span class="wordmark">data<span class="wordmark-accent">view</span></span>
36
+ </header>
37
+
38
+ <!-- Main content (hidden until file opened) -->
39
+ <main id="main" class="main hidden">
40
+
41
+ <!-- Toolbar -->
42
+ <div class="toolbar">
43
+ <div class="toolbar-left">
44
+ <span class="pill" id="pill-file"></span>
45
+ <span class="pill pill-accent" id="pill-rows"></span>
46
+ <span class="pill" id="pill-cols"></span>
47
+ </div>
48
+ <div class="toolbar-right">
49
+ <div class="search-box">
50
+ <svg class="search-icon" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="11" cy="11" r="7"/><line x1="16.5" y1="16.5" x2="21" y2="21"/></svg>
51
+ <input id="search-input" type="text" placeholder="Search prompts..." spellcheck="false">
52
+ <span id="search-count" class="search-count"></span>
53
+ </div>
54
+ <div class="view-switch">
55
+ <button class="vs-btn active" data-view="gallery" title="Gallery view">
56
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>
57
+ </button>
58
+ <button class="vs-btn" data-view="table" title="Table view">
59
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="9" y1="3" x2="9" y2="21"/></svg>
60
+ </button>
61
+ <button class="vs-btn" data-view="compare" title="Compare selected">
62
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="8" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" rx="1"/></svg>
63
+ <span id="compare-badge" class="vs-badge hidden">0</span>
64
+ </button>
65
+ </div>
66
+ </div>
67
+ </div>
68
+
69
+ <!-- Gallery view -->
70
+ <section id="view-gallery" class="view">
71
+ <div class="gallery-toolbar">
72
+ <label class="gt-label">Image
73
+ <select id="sel-img-col" class="gt-select"></select>
74
+ </label>
75
+ <label class="gt-label">Caption
76
+ <select id="sel-txt-col" class="gt-select">
77
+ <option value="">None</option>
78
+ </select>
79
+ </label>
80
+ <label class="gt-label">Size
81
+ <select id="sel-thumb-size" class="gt-select">
82
+ <option value="160">S</option>
83
+ <option value="220" selected>M</option>
84
+ <option value="320">L</option>
85
+ </select>
86
+ </label>
87
+ <span class="gt-hint">Shift+click to select for compare</span>
88
+ <span class="spacer"></span>
89
+ <span id="gallery-page" class="page-label"></span>
90
+ <button id="gallery-prev" class="page-btn" disabled>
91
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 18 9 12 15 6"/></svg>
92
+ </button>
93
+ <button id="gallery-next" class="page-btn" disabled>
94
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg>
95
+ </button>
96
+ </div>
97
+ <div id="gallery-grid" class="gallery-grid"></div>
98
+ </section>
99
+
100
+ <!-- Table view -->
101
+ <section id="view-table" class="view hidden">
102
+ <div class="gallery-toolbar">
103
+ <label class="gt-label">Rows
104
+ <select id="sel-page-size" class="gt-select">
105
+ <option value="25">25</option>
106
+ <option value="50" selected>50</option>
107
+ <option value="100">100</option>
108
+ </select>
109
+ </label>
110
+ <span class="spacer"></span>
111
+ <span id="table-page" class="page-label"></span>
112
+ <button id="table-prev" class="page-btn" disabled>
113
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 18 9 12 15 6"/></svg>
114
+ </button>
115
+ <button id="table-next" class="page-btn" disabled>
116
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg>
117
+ </button>
118
+ </div>
119
+ <div id="table-container" class="table-wrap"></div>
120
+ </section>
121
+
122
+ <!-- Compare view -->
123
+ <section id="view-compare" class="view hidden">
124
+ <div id="compare-empty" class="empty-state">
125
+ <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="3" width="8" height="18" rx="1"/><rect x="14" y="3" width="8" height="18" rx="1"/></svg>
126
+ <p>Select images to compare</p>
127
+ <p class="empty-hint">Shift+click images in the gallery, then return here</p>
128
+ </div>
129
+ <div id="compare-content" class="compare-grid hidden"></div>
130
+ </section>
131
+ </main>
132
+
133
+ <!-- Welcome -->
134
+ <div id="welcome" class="welcome">
135
+ <div class="welcome-inner">
136
+ <div class="welcome-icon">
137
+ <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>
138
+ </div>
139
+ <h2>Open a dataset</h2>
140
+ <p>Browse or paste a <code>.parquet</code> file path to begin exploring.</p>
141
+ </div>
142
+ </div>
143
+
144
+ <!-- Detail drawer -->
145
+ <aside id="drawer" class="drawer">
146
+ <div class="drawer-head">
147
+ <span id="drawer-title" class="drawer-title"></span>
148
+ <div class="drawer-head-actions">
149
+ <button id="drawer-prev" class="drawer-nav-btn" title="Previous">
150
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 18 9 12 15 6"/></svg>
151
+ </button>
152
+ <button id="drawer-next" class="drawer-nav-btn" title="Next">
153
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg>
154
+ </button>
155
+ <button id="drawer-zoom" class="drawer-nav-btn" title="Fullscreen">
156
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>
157
+ </button>
158
+ <button id="btn-close-drawer" class="drawer-close" title="Close">&times;</button>
159
+ </div>
160
+ </div>
161
+ <div class="drawer-body">
162
+ <div class="drawer-image-wrap">
163
+ <img id="drawer-img" class="drawer-image" alt="">
164
+ </div>
165
+ <div class="drawer-content">
166
+ <div class="drawer-section">
167
+ <span class="drawer-section-label">Prompt</span>
168
+ <p id="drawer-prompt" class="drawer-prompt"></p>
169
+ </div>
170
+ <div class="drawer-section" id="drawer-meta-section">
171
+ <span class="drawer-section-label">Metadata</span>
172
+ <div id="drawer-meta" class="drawer-meta"></div>
173
+ </div>
174
+ </div>
175
+ </div>
176
+ </aside>
177
+ <div id="drawer-backdrop" class="backdrop"></div>
178
+
179
+ <!-- Loading -->
180
+ <div id="loading" class="loading hidden">
181
+ <div class="spinner"></div>
182
+ </div>
183
+
184
+ <!-- Lightbox (fullscreen image) -->
185
+ <div id="lightbox" class="lightbox">
186
+ <img id="lb-img" alt="">
187
+ <button class="lb-close" aria-label="Close">&times;</button>
188
+ </div>
189
+
190
+ <script src="/static/app.js"></script>
191
+ </body>
192
+ </html>