AJAYKASU commited on
Commit
538f083
·
verified ·
1 Parent(s): ab23a0d

UI Fix: Enable scrolling + Hybrid V1/V2 Metrics Layout

Browse files
Files changed (1) hide show
  1. templates/index.html +99 -47
templates/index.html CHANGED
@@ -10,7 +10,36 @@
10
  <link rel="stylesheet" href="/static/style.css">
11
  <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
12
  <style>
13
- /* Ensure new inputs match the theme */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  .input-dark {
15
  width: 100%;
16
  padding: 10px;
@@ -22,9 +51,23 @@
22
  margin-bottom: 10px;
23
  }
24
 
25
- .input-dark:focus {
26
- outline: none;
27
- border-color: var(--primary-gold);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
  </style>
30
  </head>
@@ -34,7 +77,7 @@
34
  <div class="container">
35
 
36
  <!-- SIDEBAR -->
37
- <div class="glass-panel" style="padding:20px;">
38
  <div style="display:flex; align-items:center; gap:10px; margin-bottom:20px;">
39
  <i class="fas fa-chart-line" style="color:var(--primary-gold); font-size:1.5rem;"></i>
40
  <h2 style="margin:0; font-size:1.2rem;">ECM Quant AI</h2>
@@ -42,83 +85,90 @@
42
 
43
  <div class="form-group">
44
  <label>RESEARCH QUERY</label>
45
- <textarea id="query" rows="4"
46
  placeholder="e.g. 'Analyze SaaS IPO comparables'">Analyze SaaS sector for IPO pricing: comparables, investors, signals</textarea>
47
  </div>
48
 
49
  <div class="form-group">
50
  <label>DEAL CONTEXT (OPTIONAL)</label>
51
  <input type="number" id="last-private" class="input-dark" placeholder="Last Pvt Price ($)">
52
- <select id="period" class="input-dark">
53
- <option value="6mo">Last 6 Months</option>
54
- <option value="1y">Last 1 Year</option>
55
- </select>
56
- </div>
57
-
58
- <div class="form-group">
59
- <label>SETTINGS</label>
60
- <div style="display:flex; align-items:center; gap:10px;">
61
- <input type="checkbox" checked> <span style="font-size:0.8rem; color:#888;">EXCLUDE
62
- MICRO-CAPS</span>
63
- </div>
64
  </div>
65
 
66
- <button onclick="runAnalysis()" id="analyze-btn">
 
67
  <i class="fas fa-bolt"></i> RUN ANALYSIS
68
  </button>
69
 
70
- <div id="loader" class="loader">
71
- <div class="spinner"></div>
 
 
72
  <div style="margin-top:10px; font-size:0.9rem; color:var(--primary-gold);">Running Quantum Models...
73
  </div>
74
  </div>
75
  </div>
76
 
77
  <!-- MAIN DASHBOARD -->
78
- <div id="dashboard" style="display:none; grid-template-columns: 1fr; gap:20px;">
79
 
80
- <!-- EXECUTIVE SUMMARY (Restored Original Style) -->
81
- <div class="glass-panel" style="padding:20px;">
 
82
  <h3 style="margin-top:0; color:var(--primary-gold);">Executive Summary</h3>
83
- <div id="exec-summary-content" style="line-height:1.6; color:#ccc;">
84
- <!-- Dynamic Content will be injected here by script.js -->
85
  </div>
86
  </div>
87
 
88
- <!-- METRICS GRID -->
 
89
  <div style="display:grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap:15px;">
90
- <div class="metric-card">
91
- <div class="metric-label">Implied Range</div>
92
- <div class="metric-value" id="m-price" style="color:var(--primary-gold);">--</div>
 
 
 
 
 
 
93
  </div>
94
- <div class="metric-card">
95
- <div class="metric-label">Market Status</div>
96
- <div class="metric-value" id="m-status">--</div>
 
97
  </div>
98
- <div class="metric-card">
99
- <div class="metric-label">Avg EV/Rev</div>
100
- <div class="metric-value" id="m-ev-rev">--</div>
 
 
 
 
 
101
  </div>
102
- <div class="metric-card">
103
- <div class="metric-label">Rule of 40</div>
104
- <div class="metric-value" id="m-rule-40">--</div>
 
105
  </div>
106
- <div class="metric-card">
107
- <div class="metric-label">VIX (Macro)</div>
108
- <div class="metric-value" id="m-vix">--</div>
 
109
  </div>
110
  </div>
111
 
112
- <!-- CHART -->
113
- <div class="glass-panel" style="padding:20px;">
114
  <div id="main-chart"></div>
115
  </div>
116
 
117
- <!-- TABLE -->
118
- <div class="glass-panel" style="padding:20px;">
119
  <h3 style="margin-top:0;"><i class="fas fa-table"></i> Fundamental Multiples Matrix</h3>
120
  <div style="overflow-x:auto;">
121
- <table id="comps-table" style="width:100%; border-collapse:collapse; font-size:0.9rem;">
122
  <thead>
123
  <tr style="border-bottom:1px solid #333; text-align:left;">
124
  <th style="padding:10px;">Ticker</th>
@@ -133,6 +183,8 @@
133
  </table>
134
  </div>
135
  </div>
 
 
136
  </div>
137
 
138
  </div>
 
10
  <link rel="stylesheet" href="/static/style.css">
11
  <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
12
  <style>
13
+ /* Fix Scrolling Issue */
14
+ .container {
15
+ display: flex;
16
+ /* Changed from grid to flex for better sidebar control on mobile */
17
+ height: 100vh;
18
+ overflow: hidden;
19
+ /* Container doesn't scroll, children do */
20
+ }
21
+
22
+ .sidebar {
23
+ width: 300px;
24
+ min-width: 300px;
25
+ overflow-y: auto;
26
+ border-right: 1px solid rgba(255, 255, 255, 0.1);
27
+ background: #0E1117;
28
+ padding: 20px;
29
+ }
30
+
31
+ #dashboard {
32
+ flex: 1;
33
+ overflow-y: auto;
34
+ /* ENABLE SCROLLING */
35
+ padding: 20px;
36
+ display: none;
37
+ /* Toggled by JS */
38
+ flex-direction: column;
39
+ gap: 20px;
40
+ }
41
+
42
+ /* New Inputs */
43
  .input-dark {
44
  width: 100%;
45
  padding: 10px;
 
51
  margin-bottom: 10px;
52
  }
53
 
54
+ /* Responsive */
55
+ @media (max-width: 768px) {
56
+ .container {
57
+ flex-direction: column;
58
+ }
59
+
60
+ .sidebar {
61
+ width: 100%;
62
+ min-width: 0;
63
+ height: auto;
64
+ border-right: none;
65
+ border-bottom: 1px solid #333;
66
+ }
67
+
68
+ #dashboard {
69
+ height: 100%;
70
+ }
71
  }
72
  </style>
73
  </head>
 
77
  <div class="container">
78
 
79
  <!-- SIDEBAR -->
80
+ <div class="sidebar">
81
  <div style="display:flex; align-items:center; gap:10px; margin-bottom:20px;">
82
  <i class="fas fa-chart-line" style="color:var(--primary-gold); font-size:1.5rem;"></i>
83
  <h2 style="margin:0; font-size:1.2rem;">ECM Quant AI</h2>
 
85
 
86
  <div class="form-group">
87
  <label>RESEARCH QUERY</label>
88
+ <textarea id="query" class="input-dark" rows="4"
89
  placeholder="e.g. 'Analyze SaaS IPO comparables'">Analyze SaaS sector for IPO pricing: comparables, investors, signals</textarea>
90
  </div>
91
 
92
  <div class="form-group">
93
  <label>DEAL CONTEXT (OPTIONAL)</label>
94
  <input type="number" id="last-private" class="input-dark" placeholder="Last Pvt Price ($)">
 
 
 
 
 
 
 
 
 
 
 
 
95
  </div>
96
 
97
+ <button onclick="runAnalysis()" id="analyze-btn"
98
+ style="width:100%; padding:12px; background:var(--primary-gold); border:none; border-radius:4px; font-weight:bold; cursor:pointer;">
99
  <i class="fas fa-bolt"></i> RUN ANALYSIS
100
  </button>
101
 
102
+ <div id="loader" class="loader" style="display:none; text-align:center; margin-top:20px;">
103
+ <div class="spinner"
104
+ style="border: 4px solid #333; border-top: 4px solid var(--primary-gold); border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 0 auto;">
105
+ </div>
106
  <div style="margin-top:10px; font-size:0.9rem; color:var(--primary-gold);">Running Quantum Models...
107
  </div>
108
  </div>
109
  </div>
110
 
111
  <!-- MAIN DASHBOARD -->
112
+ <div id="dashboard">
113
 
114
+ <!-- 1. EXECUTIVE ADVISORY (New Intelligence) -->
115
+ <div class="glass-panel"
116
+ style="padding:20px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px;">
117
  <h3 style="margin-top:0; color:var(--primary-gold);">Executive Summary</h3>
118
+ <div id="exec-summary-content" style="line-height:1.6; color:#e0e0e0; font-size:1.05rem;">
119
+ <!-- Dynamic -->
120
  </div>
121
  </div>
122
 
123
+ <!-- 2. HYBRID METRICS GRID (Old + New) -->
124
+ <!-- Row 1: The Classics (Momentum/Beta/Price) -->
125
  <div style="display:grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap:15px;">
126
+ <div class="metric-card"
127
+ style="background:#1E1E1E; padding:15px; border-radius:8px; text-align:center;">
128
+ <div style="font-size:0.8rem; color:#888;">Implied Range</div>
129
+ <div id="m-price" style="font-size:1.4rem; color:var(--primary-gold); font-weight:600;">--</div>
130
+ </div>
131
+ <div class="metric-card"
132
+ style="background:#1E1E1E; padding:15px; border-radius:8px; text-align:center;">
133
+ <div style="font-size:0.8rem; color:#888;">Sector Momentum</div>
134
+ <div id="m-momentum" style="font-size:1.4rem; color:white; font-weight:600;">--</div>
135
  </div>
136
+ <div class="metric-card"
137
+ style="background:#1E1E1E; padding:15px; border-radius:8px; text-align:center;">
138
+ <div style="font-size:0.8rem; color:#888;">Mean Beta</div>
139
+ <div id="m-beta" style="font-size:1.4rem; color:white; font-weight:600;">--</div>
140
  </div>
141
+ </div>
142
+
143
+ <!-- Row 2: The New Intelligence (VIX/Rule 40/Status) -->
144
+ <div style="display:grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap:15px;">
145
+ <div class="metric-card"
146
+ style="background:#1E1E1E; padding:15px; border-radius:8px; text-align:center;">
147
+ <div style="font-size:0.8rem; color:#888;">Market Window</div>
148
+ <div id="m-status" style="font-size:1.2rem; color:white; font-weight:600;">--</div>
149
  </div>
150
+ <div class="metric-card"
151
+ style="background:#1E1E1E; padding:15px; border-radius:8px; text-align:center;">
152
+ <div style="font-size:0.8rem; color:#888;">Rule of 40 (Avg)</div>
153
+ <div id="m-rule-40" style="font-size:1.4rem; color:white; font-weight:600;">--</div>
154
  </div>
155
+ <div class="metric-card"
156
+ style="background:#1E1E1E; padding:15px; border-radius:8px; text-align:center;">
157
+ <div style="font-size:0.8rem; color:#888;">Macro VIX</div>
158
+ <div id="m-vix" style="font-size:1.4rem; color:white; font-weight:600;">--</div>
159
  </div>
160
  </div>
161
 
162
+ <!-- 3. CHART -->
163
+ <div class="glass-panel" style="padding:20px; background: rgba(255,255,255,0.03); border-radius: 8px;">
164
  <div id="main-chart"></div>
165
  </div>
166
 
167
+ <!-- 4. TABLE -->
168
+ <div class="glass-panel" style="padding:20px; background: rgba(255,255,255,0.03); border-radius: 8px;">
169
  <h3 style="margin-top:0;"><i class="fas fa-table"></i> Fundamental Multiples Matrix</h3>
170
  <div style="overflow-x:auto;">
171
+ <table id="comps-table" style="width:100%; border-collapse:collapse; font-size:0.9rem; color:#ccc;">
172
  <thead>
173
  <tr style="border-bottom:1px solid #333; text-align:left;">
174
  <th style="padding:10px;">Ticker</th>
 
183
  </table>
184
  </div>
185
  </div>
186
+
187
+ <div style="height: 50px;"></div> <!-- Spacer -->
188
  </div>
189
 
190
  </div>