Spaces:
Running
Running
create a tab that will allow me to download the jpg
Browse files- index.html +39 -9
index.html
CHANGED
|
@@ -113,20 +113,50 @@
|
|
| 113 |
<i data-feather="download" class="mr-2"></i> Download A4 Poster
|
| 114 |
</button>
|
| 115 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
</div>
|
| 117 |
|
| 118 |
<script>
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
document.getElementById('downloadBtn').addEventListener('click', function() {
|
| 122 |
-
// Create download link
|
| 123 |
const link = document.createElement('a');
|
| 124 |
-
link.href =
|
| 125 |
-
link.download =
|
| 126 |
-
document.body.appendChild(link);
|
| 127 |
link.click();
|
| 128 |
document.body.removeChild(link);
|
| 129 |
-
}
|
| 130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
</body>
|
| 132 |
</html>
|
|
|
|
| 113 |
<i data-feather="download" class="mr-2"></i> Download A4 Poster
|
| 114 |
</button>
|
| 115 |
</div>
|
| 116 |
+
|
| 117 |
+
<!-- Download Section -->
|
| 118 |
+
<div class="bg-white rounded-2xl p-8 mb-12 course-card">
|
| 119 |
+
<h2 class="text-2xl font-bold text-blue-800 mb-6 text-center">Download Course Materials</h2>
|
| 120 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 121 |
+
<div class="border border-blue-100 rounded-xl p-6 hover:bg-blue-50 transition">
|
| 122 |
+
<div class="flex items-center mb-4">
|
| 123 |
+
<i data-feather="image" class="text-blue-600 mr-3"></i>
|
| 124 |
+
<h3 class="text-lg font-semibold">Course Poster</h3>
|
| 125 |
+
</div>
|
| 126 |
+
<p class="text-gray-600 mb-4">Download our A4 promotional poster</p>
|
| 127 |
+
<button onclick="downloadFile('caregiver-course-poster.jpg', 'New-Skills-Academy-Caregiver-Course.jpg')"
|
| 128 |
+
class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center">
|
| 129 |
+
<i data-feather="download" class="mr-2"></i> Download JPG
|
| 130 |
+
</button>
|
| 131 |
+
</div>
|
| 132 |
+
<div class="border border-blue-100 rounded-xl p-6 hover:bg-blue-50 transition">
|
| 133 |
+
<div class="flex items-center mb-4">
|
| 134 |
+
<i data-feather="file-text" class="text-blue-600 mr-3"></i>
|
| 135 |
+
<h3 class="text-lg font-semibold">Course Brochure</h3>
|
| 136 |
+
</div>
|
| 137 |
+
<p class="text-gray-600 mb-4">Detailed course information (PDF)</p>
|
| 138 |
+
<button onclick="downloadFile('caregiver-course-brochure.pdf', 'New-Skills-Academy-Course-Brochure.pdf')"
|
| 139 |
+
class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center">
|
| 140 |
+
<i data-feather="download" class="mr-2"></i> Download PDF
|
| 141 |
+
</button>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
</div>
|
| 145 |
</div>
|
| 146 |
|
| 147 |
<script>
|
| 148 |
+
function downloadFile(filePath, fileName) {
|
|
|
|
|
|
|
|
|
|
| 149 |
const link = document.createElement('a');
|
| 150 |
+
link.href = filePath;
|
| 151 |
+
link.download = fileName;
|
| 152 |
+
document.body.appendChild(link);
|
| 153 |
link.click();
|
| 154 |
document.body.removeChild(link);
|
| 155 |
+
}
|
| 156 |
+
feather.replace();
|
| 157 |
+
document.getElementById('downloadBtn').addEventListener('click', function() {
|
| 158 |
+
downloadFile('caregiver-course-poster.jpg', 'New-Skills-Academy-Caregiver-Course.jpg');
|
| 159 |
+
});
|
| 160 |
+
</script>
|
| 161 |
</body>
|
| 162 |
</html>
|