✨ add webring
Signed-off-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
29e9253851
commit
bf654334f1
3 changed files with 24 additions and 4 deletions
1
public/webring_dark.svg
Normal file
1
public/webring_dark.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill="none" height="300" stroke="#9AD3BB" stroke-linecap="square" stroke-width="28" width="300" xmlns="http://www.w3.org/2000/svg"><path d="M201.962 210a60 60 0 10-103.924-60l-50 86.603"/><path d="M98.038 210a60 60 0 10103.924-60l-50-86.603"/><path d="M150 120a60 60 0 100 120h100"/></svg>
|
After Width: | Height: | Size: 294 B |
1
public/webring_light.svg
Normal file
1
public/webring_light.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg fill="none" height="300" stroke="#3B2C29" stroke-linecap="square" stroke-width="28" width="300" xmlns="http://www.w3.org/2000/svg"><path d="M201.962 210a60 60 0 10-103.924-60l-50 86.603"/><path d="M98.038 210a60 60 0 10103.924-60l-50-86.603"/><path d="M150 120a60 60 0 100 120h100"/></svg>
|
After Width: | Height: | Size: 294 B |
|
@ -2,18 +2,36 @@
|
|||
const today = new Date();
|
||||
---
|
||||
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
|
||||
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
|
||||
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
|
||||
<script src="https://code.iconify.design/iconify-icon/1.0.7/iconify-icon.min.js"></script>
|
||||
|
||||
<script type="module" client:load>
|
||||
const themeImage = document.getElementById('themeImage');
|
||||
|
||||
const updateImageForTheme = () => {
|
||||
const currentTheme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
|
||||
themeImage.src = currentTheme === 'dark' ? '/webring_dark.svg' : '/webring_light.svg';
|
||||
};
|
||||
|
||||
// Initial update on page load
|
||||
updateImageForTheme();
|
||||
|
||||
// Listen for theme changes if your theme toggle updates a class or attribute
|
||||
const themeToggle = document.getElementById('themeToggle');
|
||||
if (themeToggle) {
|
||||
themeToggle.addEventListener('click', updateImageForTheme);
|
||||
}
|
||||
</script>
|
||||
|
||||
<footer class="flex justify-between py-5 mt-5 footerbg">
|
||||
<div>Sindre Kjelsrud © {today.getFullYear()}</div>
|
||||
<div class="social">
|
||||
<div class="flex social">
|
||||
<a href="https://github.com/SindreKjelsrud" aria-label="Link to my GitHub">
|
||||
<iconify-icon icon="ri:github-line" width="30" height="30" />
|
||||
</a>
|
||||
<a href="https://open.spotify.com/user/kjelsrud!" aria-label="Link to my Spotify">
|
||||
<iconify-icon icon="mdi:spotify" width="30" height="30" />
|
||||
</a>
|
||||
<a href="https://webring.xxiivv.com/#sid" target="_blank" rel="noopener">
|
||||
<img id="themeImage" height="30" width="30" src="/webring_light.svg" alt="XXIIVV webring"/>
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
Loading…
Reference in a new issue