palera1n / palera.in

Palera1n's official website.
https://palera.in
GNU Affero General Public License v3.0
13 stars 13 forks source link

make stars look less jarring #41

Closed 0xilis closed 9 months ago

0xilis commented 9 months ago

when the site loads, it makes a request to get the current number of stars for the project and replaces it with the number. before this (or if it doesn't succeed), "starsHere" is shown. IMO, this looks very jarring; so, instead, we just show the star icon and nothing else prior to the request finishing, which IMO looks much more natural.

0xilis commented 9 months ago

By the way, I should note that I'm using zero-width spaces to ensure nothing breaks; you can't really see them since they're invisible, but they're there :P.

itsnebulalol commented 9 months ago

Has this been tested

0xilis commented 9 months ago

Has this been tested

works on my machine https://cdn.discordapp.com/attachments/1046464001372078214/1159239914739728464/Screen_Shot_2023-10-04_at_17.24.22.png?ex=65304d4d&is=651dd84d&hm=2b24b746103bb0eb5179bed5d47a53c3d64a07cd46b33e238c7cc763bbbf4b8e&

0xilis commented 9 months ago

technically, it may look even better if there was an animation when it appears rather than just popping in randomly, but I'm not good enough at frontend to know how to do that, plus I'm lazy and this should suffice for now. also, may be a good idea to cache the star count, but I don't know Astro...