forked from blek/world
1
0
Fork 0

add explanation about the online badge

This commit is contained in:
b1ek 2024-01-07 14:57:03 +10:00
parent 6536f27cd9
commit 86a23df7cc
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 11 additions and 1 deletions

View File

@ -30,7 +30,8 @@ I can also be reached via [telegram](https://t.me/bleki42).
</div> </div>
I also made a lil badge to show if i am currently online. Cool, huh? I also made a lil badge to show if i am currently online. Cool, huh?
<img src='https://online.blek.codes/gif' height='31px' width='88px' alt='A badge showing if i am online or not. Sorry, the only way to know it is to load the gif. It would be all greeny if i am online' /> <img src='https://online.blek.codes/gif' height='31px' width='88px' alt='A badge showing if i am online or not. Sorry, the only way to know it is to load the gif. It would be all greeny if i am online' />
<a href='/online-badge'>how does it work?</a>
## Webrings!! ## Webrings!!
I like webrings. I like webrings.

9
content/online-badge.md Normal file
View File

@ -0,0 +1,9 @@
+++
title = 'The funny badge'
+++
It is actually dead simple: there is a simple server running on `online.blek.codes` and a cron job on my laptop that sends POST requests every minute (a heartbeat protocol basically) and that server serves that gif on URL `online.blek.codes/gif`.
If the server didn't receive a heartbeat for a few minutes, it assumes that i am offline and serves the offline gif.
You can [add it to your website too](http://git.blek.codes/blek/online.git), but it will require a bit of tinkering and requires you to have a web server as well.