diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b3e5d19 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "html.format.wrapLineLength": 160 +} diff --git a/index.html b/index.html index 01ce500..1b54d10 100644 --- a/index.html +++ b/index.html @@ -185,6 +185,16 @@ const randomIndex = Math.floor(Math.random() * quotes.length); document.getElementById('quote').textContent = '« ' + quotes[randomIndex] + ' »'; }); + + fetch('static/buttons/_alts.json') + .then(response => response.json()) + .then(alts => { + document.querySelectorAll("div.footer.buttons img").forEach(img => { + const filename = img.src.split('/').pop(); + img.alt = alts[filename] || "no alt text available, sorry"; + }); + }) + .catch(error => console.error('error loading alt texts: ', error));