This commit is contained in:
Heli-o 2024-11-16 21:14:01 +01:00
commit 261b06ce54
4 changed files with 31 additions and 21 deletions

View file

@ -3,6 +3,9 @@ Here you can find services running on the server.
> [!error] Don't be a cunt, it ain't hard. > [!error] Don't be a cunt, it ain't hard.
> Any repeated abuse of services will be met with a ban. If too many bans get given out, services will be taken down. Any hacks/ddos attacks will also lead to taking down of services. > Any repeated abuse of services will be met with a ban. If too many bans get given out, services will be taken down. Any hacks/ddos attacks will also lead to taking down of services.
# Homarr instance
[home.derg.cz](https://home.derg.cz)
# BBS # BBS
software: MysticBBS software: MysticBBS

View file

@ -12,6 +12,8 @@ Also I am a furry. I am not sorry if it inconveniences you.
Feel free to DM me on any of the socials listed down below or all in [[Links]]. Feel free to DM me on any of the socials listed down below or all in [[Links]].
I never start conversation so it's up to you to start it. I never start conversation so it's up to you to start it.
Status page can be found at [stats.uptimerobot.com/4mEovYe8FC](https://stats.uptimerobot.com/4mEovYe8FC) and the public Homarr instance on [home.derg.cz](https://home.derg.cz).
# Quick Info about me # Quick Info about me
- **<span style="color:var(--secondary);">Age</span>**: <span id="age"></span> - **<span style="color:var(--secondary);">Age</span>**: <span id="age"></span>
<script> <script>

View file

@ -55,13 +55,13 @@ export default (() => {
return groups return groups
} }
// Function to render button content based on contentType // Updated renderButtonContent function
function renderButtonContent(button: any): preact.VNode | null { function renderButtonContent(button: any): preact.VNode | null {
const contentType = button.contentType || "image" // Default to 'image' const contentType = button.contentType || "image" // Default to 'image'
if (contentType === "image") { if (contentType === "image") {
return ( // Create the <img> element
<a href={button.url}> const imgElement = (
<img <img
src={button.image} src={button.image}
alt={button.alt} alt={button.alt}
@ -69,8 +69,15 @@ export default (() => {
loading="lazy" loading="lazy"
decoding="async" decoding="async"
/> />
</a>
) )
// If `button.url` is present, wrap the image in an `<a>` tag
if (button.url) {
return <a href={button.url}>{imgElement}</a>
} else {
// If no `url`, return the image element without wrapping
return imgElement
}
} else if (contentType === "iframe") { } else if (contentType === "iframe") {
const iframeAttrs = button.iframeAttributes || {} const iframeAttrs = button.iframeAttributes || {}
return <iframe src={button.url} title={button.title} {...iframeAttrs}></iframe> return <iframe src={button.url} title={button.title} {...iframeAttrs}></iframe>
@ -79,5 +86,6 @@ export default (() => {
return null return null
} }
} }
return Btn8831 return Btn8831
}) satisfies QuartzComponentConstructor }) satisfies QuartzComponentConstructor

View file

@ -30,7 +30,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/say-no-to-web3.gif", "image": "https://assets.derg.cz/buttons/say-no-to-web3.gif",
"url": "https://assets.derg.cz/buttons/say-no-to-web3.gif",
"alt": "Say no to web3! Keep the web free!", "alt": "Say no to web3! Keep the web free!",
"title": "Say no to web3! Keep the web free!", "title": "Say no to web3! Keep the web free!",
"type": "misc", "type": "misc",
@ -38,7 +37,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/queerpride.gif", "image": "https://assets.derg.cz/buttons/queerpride.gif",
"url": "https://assets.derg.cz/buttons/queerpride.gif",
"alt": "Queer pride!", "alt": "Queer pride!",
"title": "Queer pride!", "title": "Queer pride!",
"type": "misc", "type": "misc",
@ -46,7 +44,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/dragons-now.jpg", "image": "https://assets.derg.cz/buttons/dragons-now.jpg",
"url": "https://assets.derg.cz/buttons/dragons-now.jpg",
"alt": "Button witht the text \"dragons now!\" and a picture of a flying dragon", "alt": "Button witht the text \"dragons now!\" and a picture of a flying dragon",
"title": "DRAGONS NOW!", "title": "DRAGONS NOW!",
"type": "misc", "type": "misc",
@ -54,7 +51,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/paws.gif", "image": "https://assets.derg.cz/buttons/paws.gif",
"url": "https://assets.derg.cz/buttons/paws.gif",
"alt": "", "alt": "",
"title": "", "title": "",
"type": "misc", "type": "misc",
@ -62,7 +58,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/new-tab.gif", "image": "https://assets.derg.cz/buttons/new-tab.gif",
"url": "https://assets.derg.cz/buttons/new-tab.gif",
"alt": "Don't let this img be lonely", "alt": "Don't let this img be lonely",
"title": "Don't let this img be lonely", "title": "Don't let this img be lonely",
"type": "misc", "type": "misc",
@ -70,7 +65,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/newlambda.gif", "image": "https://assets.derg.cz/buttons/newlambda.gif",
"url": "https://assets.derg.cz/buttons/newlambda.gif",
"alt": "HL:New Lambda research facility", "alt": "HL:New Lambda research facility",
"title": "HL:New Lambda research facility", "title": "HL:New Lambda research facility",
"type": "misc", "type": "misc",
@ -78,7 +72,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/phonechump.gif", "image": "https://assets.derg.cz/buttons/phonechump.gif",
"url": "https://assets.derg.cz/buttons/phonechump.gif",
"alt": "Don't be a phone chump! Get a computer!", "alt": "Don't be a phone chump! Get a computer!",
"title": "Don't be a phone chump! Get a computer!", "title": "Don't be a phone chump! Get a computer!",
"type": "misc", "type": "misc",
@ -86,7 +79,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/narrow-head.gif", "image": "https://assets.derg.cz/buttons/narrow-head.gif",
"url": "https://assets.derg.cz/buttons/narrow-head.gif",
"alt": "Coming soon.", "alt": "Coming soon.",
"title": "C̴̼͗ǫ̶̒m̷͓͒ī̴̲ṇ̷̐g̶̹͛ ̶̣͗s̸̻͠ō̷̠o̵̝͐n̴̡̚.̷̼̆", "title": "C̴̼͗ǫ̶̒m̷͓͒ī̴̲ṇ̷̐g̶̹͛ ̶̣͗s̸̻͠ō̷̠o̵̝͐n̴̡̚.̷̼̆",
"type": "misc", "type": "misc",
@ -102,7 +94,6 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/transnow2.gif", "image": "https://assets.derg.cz/buttons/transnow2.gif",
"url": "https://assets.derg.cz/buttons/transnow2.gif",
"alt": "TRANS RIGHTS NOW!", "alt": "TRANS RIGHTS NOW!",
"title": "TRANS RIGHTS NOW!", "title": "TRANS RIGHTS NOW!",
"type": "misc", "type": "misc",
@ -110,10 +101,16 @@
}, },
{ {
"image": "https://assets.derg.cz/buttons/linkex.gif", "image": "https://assets.derg.cz/buttons/linkex.gif",
"url": "https://assets.derg.cz/buttons/linkex.gif",
"alt": "Link Exchange, run by people!", "alt": "Link Exchange, run by people!",
"title": "Link Exchange, run by people!", "title": "Link Exchange, run by people!",
"type": "misc", "type": "misc",
"contentType": "image" "contentType": "image"
},
{
"image": "https://assets.derg.cz/buttons/button-piracy.gif",
"alt": "Piracy Now!",
"title": "Piracy Now!",
"type": "misc",
"contentType": "image"
} }
] ]