diff options
| -rwxr-xr-x | index.html | 2 | ||||
| -rw-r--r-- | index.js | 13 |
2 files changed, 10 insertions, 5 deletions
@@ -289,7 +289,7 @@ <a href="#">see all 19 →</a> </div> <p style="margin: 12px 0 0; font-size: 11px; line-height: 1.55; opacity: 0.7; font-family: 'Plus Jakarta Sans', sans-serif;"> - all hand-curated. no algorithms, no follow-back debt. if you keep a homepage and want to be neighbors, <a class="aero-link" href="mailto:tyler@tylerhoang.xyz">drop a line</a>. + all hand-curated. no algorithms, no follow-back debt. if you keep a homepage and want to be neighbors, <a class="aero-link" id="neighbors-contact-link" href="#">drop a line</a>. </p> </div> </div> @@ -51,13 +51,18 @@ ); }); + function openWindow(id) { + const w = document.getElementById('w-' + id); + if (w) { w.style.display = ''; w.style.zIndex = (++window.__zTop || (window.__zTop = 100)); } + } + document.querySelectorAll('.icon').forEach(ic => { - ic.addEventListener('click', () => { - const w = document.getElementById('w-' + ic.dataset.open); - if (w) { w.style.display = ''; w.style.zIndex = (++window.__zTop || (window.__zTop = 100)); } - }); + ic.addEventListener('click', () => openWindow(ic.dataset.open)); }); + const dropALine = document.getElementById('neighbors-contact-link'); + if (dropALine) dropALine.addEventListener('click', e => { e.preventDefault(); openWindow('guestbook'); }); + // podcast RSS let podLoaded = false; async function loadPodcast() { |
