|
14 | 14 | rel="stylesheet" |
15 | 15 | /> |
16 | 16 | <link rel="stylesheet" href="style.css" /> |
| 17 | + <link rel="stylesheet" href="control-sidebar.css" /> |
17 | 18 | </head> |
18 | 19 | <body> |
19 | 20 | <div |
@@ -59,167 +60,24 @@ <h1 id="desktop-only-title">Cities for Children</h1> |
59 | 60 |
|
60 | 61 | <div id="map"></div> |
61 | 62 |
|
62 | | - <div id="controls"> |
63 | | - <div class="panel-header"> |
64 | | - <h2>Cities for Children</h2> |
65 | | - <span class="subtitle">Accessibility Explorer</span> |
66 | | - <button id="info-btn" class="info-btn" title="About this map"> |
67 | | - <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"> |
68 | | - <circle cx="12" cy="5" r="2.5"></circle> |
69 | | - <rect x="9.5" y="10" width="5" height="12" rx="1"></rect> |
70 | | - </svg> |
71 | | - </button> |
72 | | - </div> |
73 | | - |
74 | | - <div class="section mode-section"> |
75 | | - <div class="section-title">Analysis</div> |
76 | | - <div class="mode-toggle" id="mode-toggle"> |
77 | | - <button class="mode-opt active" data-mode="house"> |
78 | | - <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12l9-8 9 8"/><path d="M5 10v10h14V10"/></svg> |
79 | | - <span>Building</span> |
80 | | - </button> |
81 | | - <button class="mode-opt" data-mode="neighborhood"> |
82 | | - <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> |
83 | | - <span>Neighborhood</span> |
84 | | - </button> |
85 | | - <button class="mode-opt" data-mode="citywide"> |
86 | | - <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="1" y="6" width="5" height="14"/><rect x="7" y="3" width="5" height="17"/><rect x="13" y="8" width="5" height="12"/><rect x="19" y="5" width="4" height="15"/></svg> |
87 | | - <span>City</span> |
88 | | - </button> |
89 | | - </div> |
90 | | - </div> |
91 | | - |
92 | | - <div class="controls-row"> |
93 | | - <div class="section" id="amenity-filter-section"> |
94 | | - <div class="section-title">Filter only</div> |
95 | | - <div class="filter-dropdown"> |
96 | | - <button id="filter-btn" class="filter-btn"> |
97 | | - <span class="filter-btn-label-wrap"> |
98 | | - <span class="filter-label-prefix">Filter Only:</span> |
99 | | - <span id="filter-label">All types</span> |
100 | | - </span> |
101 | | - <svg width="12" height="12" viewBox="0 0 12 12"><path fill="currentColor" d="M2 4l4 4 4-4"/></svg> |
102 | | - </button> |
103 | | - <div id="filter-popup" class="filter-popup"> |
104 | | - <div id="filter-items"></div> |
105 | | - </div> |
106 | | - </div> |
107 | | - </div> |
108 | | - |
109 | | - <div class="section" id="radius-section"> |
110 | | - <div class="section-title">Walking Time</div> |
111 | | - <div class="radius-toggle" id="radius-toggle"> |
112 | | - <button class="radius-opt active" data-minutes="5">5 min</button> |
113 | | - <button class="radius-opt" data-minutes="10">10 min</button> |
114 | | - <button class="radius-opt" data-minutes="15">15 min</button> |
| 63 | + <aside id="control-sidebar" class="control-sidebar" aria-label="Map controls"> |
| 64 | + <div class="control-sidebar-inner"> |
| 65 | + <header class="control-sidebar-header"> |
| 66 | + <div class="control-sidebar-heading"> |
| 67 | + <h2>Cities for Children</h2> |
| 68 | + <p>Accessibility Explorer</p> |
115 | 69 | </div> |
116 | | - <div class="hint" id="mode-hint">Click map to analyze nearest building</div> |
117 | | - </div> |
118 | | - </div> |
119 | | - |
120 | | - <div class="section" id="points-visibility-section"> |
121 | | - <div class="section-title" id="points-visibility-section-title">Layers</div> |
122 | | - <div class="layers-control" id="points-visibility-layers-control"> |
123 | | - <button id="layers-btn" class="layers-btn" type="button" aria-expanded="false" aria-controls="layers-popup"> |
124 | | - <span class="layers-btn-text"> |
125 | | - <span class="layers-btn-title">Layer controls</span> |
126 | | - <span class="layers-btn-meta" id="layers-btn-meta">2 of 6 enabled</span> |
127 | | - </span> |
128 | | - <svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><path fill="currentColor" d="M2 4l4 4 4-4"/></svg> |
| 70 | + <button id="info-btn" class="info-btn" title="About this map" aria-label="About this map"> |
| 71 | + <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"> |
| 72 | + <circle cx="12" cy="5" r="2.5"></circle> |
| 73 | + <rect x="9.5" y="10" width="5" height="12" rx="1"></rect> |
| 74 | + </svg> |
129 | 75 | </button> |
130 | | - <div id="layers-popup" class="layers-popup" role="dialog" aria-label="Layer controls"> |
131 | | - <div class="layers-popup-header"> |
132 | | - <strong>Map Layers</strong> |
133 | | - <div class="layers-popup-actions"> |
134 | | - <button type="button" id="layers-select-all" class="layers-action-btn">Select all</button> |
135 | | - <button type="button" id="layers-deselect-all" class="layers-action-btn">Deselect all</button> |
136 | | - </div> |
137 | | - </div> |
138 | | - <div class="detail-point-toggles layers-grid" id="urban95-point-toggles"> |
139 | | - <label class="toggle toggle-with-icon"> |
140 | | - <input type="checkbox" id="show-urban-nature-toggle" /> |
141 | | - <span class="toggle-slider"></span> |
142 | | - <span class="toggle-icon" aria-hidden="true"><img src="./icons/park-alt1.svg" alt="" /></span> |
143 | | - <span class="toggle-label">Urban nature</span> |
144 | | - </label> |
145 | | - <label class="toggle toggle-with-icon"> |
146 | | - <input type="checkbox" id="show-trees-toggle" checked /> |
147 | | - <span class="toggle-slider"></span> |
148 | | - <span class="toggle-icon" aria-hidden="true"><img src="./icons/park-alt1.svg" alt="" /></span> |
149 | | - <span class="toggle-label">Trees</span> |
150 | | - </label> |
151 | | - <label class="toggle toggle-with-icon"> |
152 | | - <input type="checkbox" id="show-lights-toggle" /> |
153 | | - <span class="toggle-slider"></span> |
154 | | - <span class="toggle-icon" aria-hidden="true"><img src="./icons/lighthouse.svg" alt="" /></span> |
155 | | - <span class="toggle-label">Lights</span> |
156 | | - </label> |
157 | | - <label class="toggle toggle-with-icon" id="school-points-toggle-wrap"> |
158 | | - <input type="checkbox" id="show-schools-toggle" checked /> |
159 | | - <span class="toggle-slider"></span> |
160 | | - <span class="toggle-icon" aria-hidden="true"><img src="./icons/town-hall.svg" alt="" /></span> |
161 | | - <span class="toggle-label">Schools</span> |
162 | | - </label> |
163 | | - <label class="toggle"> |
164 | | - <input type="checkbox" id="show-heatmap-toggle" checked /> |
165 | | - <span class="toggle-slider"></span> |
166 | | - <span class="toggle-label">Heatmap</span> |
167 | | - </label> |
168 | | - <label class="toggle"> |
169 | | - <input type="checkbox" id="show-kids-population-toggle" /> |
170 | | - <span class="toggle-slider"></span> |
171 | | - <span class="toggle-label">Pop. Kids</span> |
172 | | - </label> |
173 | | - <label class="toggle"> |
174 | | - <input type="checkbox" id="show-socioeconomic-toggle" /> |
175 | | - <span class="toggle-slider"></span> |
176 | | - <span class="toggle-label">SES Clusters</span> |
177 | | - </label> |
178 | | - <label class="toggle"> |
179 | | - <input type="checkbox" id="show-roads-toggle" /> |
180 | | - <span class="toggle-slider"></span> |
181 | | - <span class="toggle-label">Roads</span> |
182 | | - </label> |
183 | | - <label class="toggle" id="amenity-points-toggle-wrap"> |
184 | | - <input type="checkbox" id="show-amenity-points-toggle" checked /> |
185 | | - <span class="toggle-slider"></span> |
186 | | - <span class="toggle-label">Amenities</span> |
187 | | - </label> |
188 | | - </div> |
189 | | - </div> |
190 | | - </div> |
191 | | - <div class="radius-toggle basemap-toggle" id="basemap-toggle" role="radiogroup" aria-label="Basemap"> |
192 | | - <button type="button" class="radius-opt active" data-basemap="street">Map</button> |
193 | | - <button type="button" class="radius-opt" data-basemap="satellite">Satellite</button> |
194 | | - </div> |
195 | | - </div> |
196 | | - |
197 | | - <div class="section"> |
198 | | - <div class="section-title">Building score</div> |
199 | | - <div class="metric-options segmented-options" id="score-model-toggle" role="radiogroup" aria-label="Building score"> |
200 | | - <label class="radio-option"> |
201 | | - <input type="radio" name="score-model" value="weighted" checked /> |
202 | | - <span>Urban95</span> |
203 | | - </label> |
204 | | - <label class="radio-option"> |
205 | | - <input type="radio" name="score-model" value="expanded" /> |
206 | | - <span>Amenities Focus</span> |
207 | | - </label> |
208 | | - </div> |
209 | | - </div> |
210 | | - |
211 | | - <div class="section legend-section"> |
212 | | - <div class="section-title">Accessibility (0-100)</div> |
213 | | - <div class="legend-gradient"></div> |
214 | | - <div id="legend-labels" class="legend-labels"> |
215 | | - <span>0</span> |
216 | | - <span>25</span> |
217 | | - <span>50</span> |
218 | | - <span>75</span> |
219 | | - <span>100</span> |
220 | | - </div> |
| 76 | + </header> |
| 77 | + <div id="control-sidebar-body" class="control-sidebar-body"></div> |
| 78 | + <footer id="control-legend" class="control-sidebar-legend"></footer> |
221 | 79 | </div> |
222 | | - </div> |
| 80 | + </aside> |
223 | 81 |
|
224 | 82 | <div id="radius-info"></div> |
225 | 83 |
|
@@ -282,7 +140,6 @@ <h2>Cities for Children</h2> |
282 | 140 | <div id="tooltip"></div> |
283 | 141 |
|
284 | 142 | <div id="filter-backdrop" class="filter-backdrop"></div> |
285 | | - <div id="layers-backdrop" class="layers-backdrop"></div> |
286 | 143 |
|
287 | 144 | <div id="citywide-modal" class="modal"> |
288 | 145 | <div class="modal-content citywide-content"> |
@@ -361,8 +218,8 @@ <h2 id="info-modal-title">Cities for Children</h2> |
361 | 218 | <li> |
362 | 219 | <strong>Walking time & filter</strong> |
363 | 220 | <p> |
364 | | - Choose <em>5</em>, <em>10</em>, or <em>15</em> minutes in <em>Amenities Focus</em>. |
365 | | - In <em>Urban95</em>, walking-time and amenity filtering controls are hidden because Urban95 uses a fixed methodology that is not driven directly by those UI controls. |
| 221 | + Choose <em>5</em>, <em>10</em>, or <em>15</em> minutes in <em>Amenities Focus</em>. |
| 222 | + In <em>Urban95</em>, walking-time and amenity filtering controls are hidden because Urban95 uses a fixed methodology. |
366 | 223 | </p> |
367 | 224 | </li> |
368 | 225 | <li> |
@@ -433,14 +290,24 @@ <h2 id="info-modal-title">Cities for Children</h2> |
433 | 290 | <script src="./js/core/appState.js"></script> |
434 | 291 | <script src="./js/scoring/scoreModel.js"></script> |
435 | 292 | <script src="./js/scoring/scoreContext.js"></script> |
| 293 | + <script src="./js/scoring/weightedIndicatorIcons.js"></script> |
436 | 294 | <script src="./js/scoring/scoreExplain.js"></script> |
437 | 295 | <script src="./js/ui/scoreSidebarChrome.js"></script> |
438 | 296 | <script src="./js/ui/sidebarChromeBindings.js"></script> |
439 | 297 | <script src="./js/ui/amenityMode.js"></script> |
440 | 298 | <script src="./js/ui/controlActions.js"></script> |
| 299 | + <script src="./js/ui/controlSidebarMarkup.js"></script> |
| 300 | + <script src="./js/ui/weightedMetricShowRegistry.js"></script> |
| 301 | + <script src="./js/ui/controlSidebarShow.js"></script> |
| 302 | + <script src="./js/ui/controlSidebarFilters.js"></script> |
| 303 | + <script src="./js/ui/controlSidebarIndicators.js"></script> |
| 304 | + <script src="./js/ui/controlSidebarSections.js"></script> |
| 305 | + <script src="./js/ui/controlSidebarAdapter.js"></script> |
441 | 306 | <script src="./js/map/mapLayers.js"></script> |
442 | 307 | <script src="./js/map/mapShell.js"></script> |
443 | 308 | <script src="./js/map/neighborhoodScores.js"></script> |
| 309 | + <script src="./js/map/renderState.js"></script> |
| 310 | + <script src="./js/ui/overlayVisibility.js"></script> |
444 | 311 | <script src="./js/map/iconLoader.js"></script> |
445 | 312 | <script src="./js/map/mapRenderers.js"></script> |
446 | 313 | <script src="./js/map/selection.js"></script> |
|
0 commit comments