Skip to content

Commit e1133fd

Browse files
authored
Update index.html
1 parent 6d2d8a4 commit e1133fd

1 file changed

Lines changed: 83 additions & 61 deletions

File tree

index.html

Lines changed: 83 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,6 @@
5858
margin: 0 auto;
5959
}
6060

61-
.download-status {
62-
display: flex;
63-
justify-content: center;
64-
padding: 25px 0;
65-
background: rgba(15, 15, 30, 0.8);
66-
}
67-
68-
.status-card {
69-
background: linear-gradient(135deg, #ff5b5b, #6bb1ff);
70-
border-radius: 12px;
71-
padding: 20px 40px;
72-
text-align: center;
73-
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
74-
}
75-
76-
.status-card i {
77-
font-size: 2.5rem;
78-
margin-bottom: 15px;
79-
animation: pulse 2s infinite;
80-
}
81-
82-
@keyframes pulse {
83-
0% { transform: scale(1); }
84-
50% { transform: scale(1.1); }
85-
100% { transform: scale(1); }
86-
}
87-
8861
.content-area {
8962
padding: 30px;
9063
min-height: 500px;
@@ -168,16 +141,34 @@
168141
transform: translateY(1px);
169142
}
170143

171-
.version-grid {
172-
display: grid;
173-
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
174-
gap: 12px;
175-
margin-top: 15px;
176-
max-height: 300px;
177-
overflow-y: auto;
178-
padding: 10px;
144+
.version-sections {
145+
display: flex;
146+
flex-direction: column;
147+
gap: 20px;
148+
}
149+
150+
.version-section {
179151
background: rgba(20, 20, 36, 0.5);
180152
border-radius: 8px;
153+
overflow: hidden;
154+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
155+
}
156+
157+
.section-header {
158+
background: linear-gradient(90deg, #6bb1ff, #ff5b5b);
159+
padding: 12px 20px;
160+
font-size: 1.3rem;
161+
font-weight: 600;
162+
}
163+
164+
.section-content {
165+
padding: 15px;
166+
}
167+
168+
.version-grid {
169+
display: grid;
170+
grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
171+
gap: 10px;
181172
}
182173

183174
.version-item {
@@ -282,14 +273,6 @@ <h1>Ableton Live Direct Download</h1>
282273
<p class="subtitle">Get the exact version you need with one click</p>
283274
</header>
284275

285-
<div class="download-status">
286-
<div class="status-card">
287-
<i class="fas fa-cloud-download-alt"></i>
288-
<h2>Ready to Download</h2>
289-
<p>Select your preferences below</p>
290-
</div>
291-
</div>
292-
293276
<div class="content-area">
294277
<div class="step-title">
295278
<div class="step-icon"><i class="fas fa-download"></i></div>
@@ -321,9 +304,9 @@ <h2>Ready to Download</h2>
321304
</div>
322305

323306
<div class="form-group">
324-
<label>Select Version (sorted by major version):</label>
325-
<div class="version-grid" id="version-grid">
326-
<!-- Versions will be populated by JS -->
307+
<label>Select Version:</label>
308+
<div class="version-sections" id="version-sections">
309+
<!-- Version sections will be populated by JS -->
327310
</div>
328311
</div>
329312

@@ -431,25 +414,64 @@ <h2>Ready to Download</h2>
431414
return osValue;
432415
}
433416

434-
// Populate the version grid
435-
const versionGrid = document.getElementById('version-grid');
436-
let currentMajor = -1;
417+
// Group versions by major version
418+
function groupVersionsByMajor(versions) {
419+
const grouped = {};
420+
421+
versions.forEach(version => {
422+
const major = version.split('.')[0];
423+
if (!grouped[major]) {
424+
grouped[major] = [];
425+
}
426+
grouped[major].push(version);
427+
});
428+
429+
return grouped;
430+
}
431+
432+
// Populate the version sections
433+
const versionSections = document.getElementById('version-sections');
434+
const groupedVersions = groupVersionsByMajor(versions);
437435

438-
versions.forEach(version => {
439-
const versionItem = document.createElement('div');
440-
versionItem.className = 'version-item';
441-
versionItem.textContent = version;
442-
versionItem.dataset.version = version; // Store version in data attribute
436+
// Sort major versions descending
437+
const majorVersions = Object.keys(groupedVersions).sort((a, b) => b - a);
438+
439+
majorVersions.forEach(major => {
440+
const section = document.createElement('div');
441+
section.className = 'version-section';
442+
443+
const header = document.createElement('div');
444+
header.className = 'section-header';
445+
header.textContent = `Version ${major}.x`;
446+
447+
const content = document.createElement('div');
448+
content.className = 'section-content';
443449

444-
versionItem.addEventListener('click', () => {
445-
// Remove selected class from all items
446-
document.querySelectorAll('.version-item').forEach(item => {
447-
item.classList.remove('selected');
450+
const grid = document.createElement('div');
451+
grid.className = 'version-grid';
452+
453+
groupedVersions[major].forEach(version => {
454+
const versionItem = document.createElement('div');
455+
versionItem.className = 'version-item';
456+
versionItem.textContent = version;
457+
versionItem.dataset.version = version;
458+
459+
versionItem.addEventListener('click', () => {
460+
// Remove selected class from all items
461+
document.querySelectorAll('.version-item').forEach(item => {
462+
item.classList.remove('selected');
463+
});
464+
// Add selected class to clicked item
465+
versionItem.classList.add('selected');
448466
});
449-
// Add selected class to clicked item
450-
versionItem.classList.add('selected');
467+
468+
grid.appendChild(versionItem);
451469
});
452-
versionGrid.appendChild(versionItem);
470+
471+
content.appendChild(grid);
472+
section.appendChild(header);
473+
section.appendChild(content);
474+
versionSections.appendChild(section);
453475
});
454476

455477
// Download button event listener

0 commit comments

Comments
 (0)