This progress bar is on the bottom of https://join-lemmy.org Does it automatically update when people donate to either the Liberapay, Patreon, or Open Collective? Is this progress bar open source so lemmy servers can implement it to show their donation\costs amounts?
It’s just a static image. At the end of every month, a guy logs into all the donation sites, punches the numbers into a calculator, calculates how many more pixels needs to be added, then fires up MS Paint and paints the progress bar and uploads it to the website. ^(/s)
The only way.
It seems to be manually updated.
https://github.com/LemmyNet/joinlemmy-site/blob/main/src/shared/donation_stats.ts
Oh, so is the progress bar just an image or is it code that can update the progress based on the manually inputted values?
Seems like something that could be automated using SVGs
Seems like something a donation could fund.
The main donate block of items is here: https://github.com/LemmyNet/joinlemmy-site/blob/main/src/shared/components/common.tsx#L129
Follow the chain and you’ll see it’s just using the
progress
html element.
https://github.com/LemmyNet/joinlemmy-site/blob/main/src/shared/donation_stats.ts
And here’s the code to update the stats
https://github.com/LemmyNet/joinlemmy-site/blob/main/update_donations.mjs
Does it automatically update when people donate to either the Liberapay, Patreon, or Open Collective?
It seems not. It’s updated each time the website owner
rebuilds the front pagerunsnpm run update_donations
.Its run and updated in a cronjob every hour.
Yes, it automatically updates every hour. Its just an html progress bar based on a coded goal, and the current donation amounts from given platforms.
Thats awesome! it would be great if you could make a post about it so instance admins would be aware of it and know they can implement it on their homepage so users can ensure their instance is sustainably funded