Use DOMcontent loaded event listener for Eggring widget

This commit is contained in:
Helen Chong 2024-07-09 19:58:03 +08:00
parent 18124b820c
commit 06810b83c0
1 changed files with 18 additions and 30 deletions

View File

@ -103,36 +103,24 @@ date: 2023-01-28
<link rel="stylesheet" href="https://dykewrite.neocities.org/webring/onionring.css"> <link rel="stylesheet" href="https://dykewrite.neocities.org/webring/onionring.css">
</li> </li>
<li> <li>
<script src="https://eggring.neocities.org/js/hatring.js"></script> <script src="https://eggring.neocities.org/js/hatring.js"></script><script src="https://eggring.neocities.org/js/eggring-config.js"></script>
<script src="https://eggring.neocities.org/js/eggring-config.js"></script> <script>
<script>window.onload = function() { eggring.buildWidget(); };</script> document.addEventListener("DOMContentLoaded", function() { eggring.createLinks(); });
<nav id="eggring"></nav> </script>
<style> <nav class="webring">
#eggring { <p class="webring__name">🥚 <a id="eggringIndex" href="https://eggring.neocities.org/">The Eggring</a> 🥚</p>
background-color: white; <ul class="webring__links">
border-radius: 5px; <li class="webring__link">
border: 4px double #b08cdc; <a id="eggringPrev" href="https://confetticake.neocities.org/">Previous Site</a>
width: 20%; </li>
height: 75px; <li class="webring__link">
display: flex; <a id="eggringRand">Random Site</a>
flex-direction: column; </li>
} <li class="webring__link">
#eggring a { <a id="eggringNext" href="https://thecozy.cat/">Next Site</a>
color: #c8b175; </li>
display: flex; </ul>
justify-content: center; </nav>
}
#eggring a:hover { color: #c69827; }
#eggring img {
display: flex;
width: 40px;
}
.eggringName { white-space: nowrap; }
.eggringNav {
display: flex;
justify-content: space-between;
}
</style>
</li> </li>
<li> <li>
<div id='focusfirst-webring'> <div id='focusfirst-webring'>