Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +6 -4
templates/index.html
CHANGED
@@ -243,7 +243,8 @@
|
|
243 |
<div class="xl:col-span-2 glass-card p-6 fade-in">
|
244 |
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
245 |
<svg class="w-5 h-5 mr-2 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
246 |
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0
|
|
|
247 |
</svg>
|
248 |
Analysis Results
|
249 |
</h2>
|
@@ -603,12 +604,13 @@
|
|
603 |
cachedExamples.slice(0, 9).forEach((url) => {
|
604 |
const card = document.createElement('button');
|
605 |
card.type = 'button';
|
606 |
-
card.className = 'relative group rounded-xl overflow-hidden shadow hover:shadow-lg transition focus:outline-none focus:ring-2 focus:ring-indigo-500';
|
607 |
card.title = 'Use this example';
|
608 |
card.onclick = () => selectExample(url);
|
|
|
609 |
card.innerHTML = `
|
610 |
-
<img src="${url}" alt="
|
611 |
-
<div class="
|
612 |
`;
|
613 |
examplesContainer.appendChild(card);
|
614 |
});
|
|
|
243 |
<div class="xl:col-span-2 glass-card p-6 fade-in">
|
244 |
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
|
245 |
<svg class="w-5 h-5 mr-2 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
246 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 11-6 0 3 3 0 016 0z"></path>
|
247 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path>
|
248 |
</svg>
|
249 |
Analysis Results
|
250 |
</h2>
|
|
|
604 |
cachedExamples.slice(0, 9).forEach((url) => {
|
605 |
const card = document.createElement('button');
|
606 |
card.type = 'button';
|
607 |
+
card.className = 'relative group rounded-xl overflow-hidden shadow hover:shadow-lg transition focus:outline-none focus:ring-2 focus:ring-indigo-500 text-left';
|
608 |
card.title = 'Use this example';
|
609 |
card.onclick = () => selectExample(url);
|
610 |
+
const name = decodeURIComponent(url.split('/').pop() || 'example');
|
611 |
card.innerHTML = `
|
612 |
+
<img src="${url}" alt="${name}" class="w-full h-24 object-cover">
|
613 |
+
<div class="px-2 py-1 text-xs bg-white text-gray-700 truncate">${name}</div>
|
614 |
`;
|
615 |
examplesContainer.appendChild(card);
|
616 |
});
|