serverx-org / SERVER-X-101

Unite developers, create impactful products together
https://serverx.org.in
1 stars 1 forks source link

Missing Skeleton Loading Animations for Images #17

Closed gautamankoji closed 1 month ago

gautamankoji commented 1 month ago

The images on initial load don't look good, so there is a requirement for image skeleton loading:

Images loading issue on initial load:

Screenshot 2024-05-10 222156

Screenshot 2024-05-10 222209

gautamankoji commented 1 month ago

i am going to proceed with the second method; it is easier to implement and maintain as well. i believe it won't break as often.

two ways to deal with it, not sure which one to choose.

  1. make a custom image-skeleton component and wrap all images with that
  2. make img tag behave that way by adding css and js to handle the animation.

    • add and remove the skeleton class depending on load state of the image.
    • skeleton class will have the animation

second way would make things easier, i believe tried making it the first way till now, had to add the wrapper at many places, it broke stuff sometimes

Did you make the component in layouts/partials/component_name.html? And did you use that component by initializing it using Hugo syntax, i.e., {{ partial "component_name" }} or {{ partial "component_name.html" }}?

gautamankoji commented 1 month ago

SERVER-X-101/SERVER-X-101@7ff18e6af39d9dcd5814891aab0e04404cf44087 The issue has been resolved!