|
5 | 5 | import { cubicOut } from 'svelte/easing'; |
6 | 6 | import Icon from '$lib/components/icons/Icon.svelte'; |
7 | 7 | import { PATHVIEW_VERSION, EXTRACTED_VERSIONS } from '$lib/constants/dependencies'; |
| 8 | + import { startGuidedTour, type TourId } from '$lib/tours'; |
8 | 9 |
|
9 | 10 | interface Example { |
10 | 11 | name: string; |
|
51 | 52 | onClose(); |
52 | 53 | } |
53 | 54 |
|
| 55 | + function handleStartTour(id: TourId) { |
| 56 | + onClose(); |
| 57 | + // Wait for the banner's slide-out so highlights aren't covered |
| 58 | + setTimeout(() => startGuidedTour(id), 350); |
| 59 | + } |
| 60 | +
|
54 | 61 | function handleKeydown(e: KeyboardEvent) { |
55 | 62 | if (e.key === 'Escape') { |
56 | 63 | onClose(); |
|
132 | 139 |
|
133 | 140 | <div class="separator"></div> |
134 | 141 |
|
| 142 | + <div class="tour-section"> |
| 143 | + <div class="tour-text"> |
| 144 | + <strong>Guided Tours</strong> |
| 145 | + <span>Step-by-step walkthroughs that highlight the editor's main areas in turn so you know what each does.</span> |
| 146 | + </div> |
| 147 | + <div class="tour-buttons"> |
| 148 | + <button class="action-card" onclick={() => handleStartTour('start')}> |
| 149 | + <Icon name="compass" size={20} /> |
| 150 | + <span class="action-label">Start</span> |
| 151 | + </button> |
| 152 | + <button class="action-card" onclick={() => handleStartTour('modeling')}> |
| 153 | + <Icon name="shapes" size={20} /> |
| 154 | + <span class="action-label">Modeling</span> |
| 155 | + </button> |
| 156 | + <button class="action-card" onclick={() => handleStartTour('simulation')}> |
| 157 | + <Icon name="play-circle" size={20} /> |
| 158 | + <span class="action-label">Simulation</span> |
| 159 | + </button> |
| 160 | + </div> |
| 161 | + </div> |
| 162 | + |
| 163 | + <div class="separator"></div> |
| 164 | + |
135 | 165 | <div class="examples-section"> |
136 | 166 | <div class="examples-grid"> |
137 | 167 | {#each examples as example} |
|
228 | 258 | letter-spacing: 0.2px; |
229 | 259 | } |
230 | 260 |
|
| 261 | + .tour-section { |
| 262 | + display: grid; |
| 263 | + grid-template-columns: repeat(6, 1fr); |
| 264 | + gap: 8px; |
| 265 | + align-items: center; |
| 266 | + } |
| 267 | +
|
| 268 | + .tour-text { |
| 269 | + grid-column: 1 / 4; |
| 270 | + } |
| 271 | +
|
| 272 | + .tour-buttons { |
| 273 | + grid-column: 4 / -1; |
| 274 | + display: grid; |
| 275 | + grid-template-columns: repeat(3, 1fr); |
| 276 | + gap: 8px; |
| 277 | + } |
| 278 | +
|
| 279 | + .tour-text { |
| 280 | + display: flex; |
| 281 | + flex-direction: column; |
| 282 | + gap: 2px; |
| 283 | + line-height: 1.35; |
| 284 | + color: var(--text-muted); |
| 285 | + } |
| 286 | +
|
| 287 | + .tour-text strong { |
| 288 | + font-size: 10px; |
| 289 | + font-weight: 600; |
| 290 | + text-transform: uppercase; |
| 291 | + letter-spacing: 0.5px; |
| 292 | + } |
| 293 | +
|
| 294 | + .tour-text span { |
| 295 | + font-size: 11px; |
| 296 | + } |
| 297 | +
|
231 | 298 | .actions { |
232 | 299 | display: grid; |
233 | 300 | grid-template-columns: repeat(6, 1fr); |
|
278 | 345 |
|
279 | 346 | .examples-grid { |
280 | 347 | display: grid; |
281 | | - grid-template-columns: repeat(3, 1fr); |
| 348 | + grid-template-columns: repeat(2, 1fr); |
282 | 349 | grid-auto-rows: min-content; |
283 | 350 | align-items: start; |
284 | 351 | gap: 10px; |
|
383 | 450 | .banner-content { |
384 | 451 | padding-right: 90px; |
385 | 452 | } |
386 | | -
|
387 | | - .examples-grid { |
388 | | - grid-template-columns: repeat(2, 1fr); |
389 | | - } |
390 | 453 | } |
391 | 454 |
|
392 | 455 | @media (max-width: 500px) { |
|
0 commit comments