Skip to content

Commit add9014

Browse files
committed
Update index.html
1 parent 43a7478 commit add9014

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

docs/index.html

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,8 @@ <h1>Alt Clouds</h1>
731731
try {
732732
const hostname = new URL(cloud.url).hostname;
733733
const logoUrl = `https://logo.clearbit.com/${hostname}`;
734-
// Simple: img tag that falls back to letter on error via CSS
735-
return `<img src="${logoUrl}" alt="${fallback}" style="width:100%;height:100%;object-fit:contain;" onload="this.style.display='block'" onerror="this.style.display='none';this.parentElement.setAttribute('data-logo','${fallback}');">`;
734+
// Use string concatenation to avoid nested template literal issues
735+
return '<img src="' + logoUrl + '" alt="' + fallback + '" style="width:100%;height:100%;object-fit:contain;" onload="this.style.display=\'block\'" onerror="this.style.display=\'none\';this.parentElement.setAttribute(\'data-logo\',\'' + fallback + '\');">';
736736
} catch {
737737
return fallback;
738738
}
@@ -861,21 +861,10 @@ <h1>Alt Clouds</h1>
861861
renderClouds();
862862
});
863863

864-
// Initialize
865-
function init() {
866-
initTheme();
867-
renderCategories();
868-
renderClouds();
869-
}
870-
871-
init();
872-
</script>
873-
</body>
874-
})
875864

876865
// Initialize on page load
877866
initTheme();
878-
loadClouds();
867+
loadClouds(); // Loads data, then calls renderCategories() and renderClouds()
879868
</script>
880869
</body>
881870
</html>

0 commit comments

Comments
 (0)