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.
> 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
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]].
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
- **<span style="color:var(--secondary);">Age</span>**: <span id="age"></span>
<script>

View file

@ -55,13 +55,13 @@ export default (() => {
return groups
}
// Function to render button content based on contentType
// Updated renderButtonContent function
function renderButtonContent(button: any): preact.VNode | null {
const contentType = button.contentType || "image" // Default to 'image'
if (contentType === "image") {
return (
<a href={button.url}>
// Create the <img> element
const imgElement = (
<img
src={button.image}
alt={button.alt}
@ -69,8 +69,15 @@ export default (() => {
loading="lazy"
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") {
const iframeAttrs = button.iframeAttributes || {}
return <iframe src={button.url} title={button.title} {...iframeAttrs}></iframe>
@ -79,5 +86,6 @@ export default (() => {
return null
}
}
return Btn8831
}) satisfies QuartzComponentConstructor

View file

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