Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage Card Animation #391

Closed
wants to merge 8 commits into from
Closed

Homepage Card Animation #391

wants to merge 8 commits into from

Conversation

Ayushmaanagarwal1211
Copy link

What kind of change does this PR introduce?

I have break the single image into different components and configured each image seperately and added animations to all images
I have also fixed the zindex so that when user hover on the image so the image looks like popping up

Issue Number: #390

Fixes #390
Snapshots/Videos:

bandicam.2024-08-04.17-02-03-384.mp4
bandicam.2024-08-04.16-54-57-796.mp4
bandicam.2024-08-04.17-02-38-117.mp4

Other information

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode @Doraemon012 Please review this and let me know if any changes

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211 Fix the issues in layout.

  1. Large screens:

image

  1. Small screens:

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode i fixed that but if it is not fixed please send the screen size i will work on that accordingly

image
image

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211

  1. There is no animation in some cards.
  2. When the user hovers on a card it blinks.
  3. When the user hovers on the card it increases z-index as intended but, if the user moves mouse out of the card, its z-index goes back to normal

Fix this.

2024-08-04.17-53-43.mp4

@Ayushmaanagarwal1211
Copy link
Author

bandicam.2024-08-04.19-15-14-133.mp4

@Tanay-ErrorCode i applied this animation to every image please check and it is changing the z-index on hovering

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211

  1. When the user hovers on a card it blinks.
  2. When the user hovers on the card it increases z-index as intended but, if the user moves mouse out of the card, its z-index goes back to normal. It should not go to previous state.

These two are still remaining.

@Ayushmaanagarwal1211
Copy link
Author

Ayushmaanagarwal1211 commented Aug 4, 2024

@Tanay-ErrorCode I am a little bit confuse Like i have added this blink animation to all those cards so i am sharing a video please see that and tell me where i am doing wrong so that i can fix it accordingly
And when user hovering on a card so i am increasing the z-index to highest and when remove i am reducing the zindex

bandicam.2024-08-04.22-30-15-713.mp4

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211

Analogy Explanation

Imagine you have a stack of cards, each with a different importance level. The most important card is on top, and the least important is at the bottom. The importance of each card is represented by its z-index, which determines how "in front" the card appears compared to others.

  1. Initial State:

    • You have four cards.
    • The z-index array [4, 3, 2, 1] indicates their current importance levels, with 4 being the highest and 1 the lowest.
  2. Hover Action:

    • When you hover over a card, it becomes the most important card (z-index 4).
    • The previous most important card (which had z-index 4) moves down to become the second most important (z-index 3), and so on.
  3. Visualizing with an Example:

    • Starting Point:
      • Cards: A, B, C, D
      • Z-Indices: A: 4, B: 3, C: 2, D: 1
    • First Hover:
      • You hover over card C.
      • New Order: C, A, B, D
      • Updated Z-Indices: C: 4, A: 3, B: 2, D: 1
    • Second Hover:
      • Now, you hover over card B.
      • New Order: B, C, A, D
      • Updated Z-Indices: B: 4, C: 3, A: 2, D: 1
  4. Dynamic Adjustment:

    • Each time you hover over a card, it moves to the top of the importance stack, and the other cards adjust their importance levels accordingly.

Summary

In essence, when you hover over a card, it takes the topmost position in terms of visibility (highest z-index), pushing down the previously topmost card and adjusting the visibility (z-index) of all other cards. This dynamic reordering ensures the hovered card is always most prominent.

Kindly fix it accordingly.

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode Ohk ok now i understood fixing this

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode Please check

bandicam.2024-08-05.10-18-36-062.mp4

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211 This is good. You need to fix the blinking problem, i.e. opacity first becomes 0 and then increases.

We need something like this:

2024-08-05.11-02-58.mp4

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode If i understood clearly you are saying this

bandicam.2024-08-05.11-26-40-434.mp4

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211 Observer the moment when the opacity becomes 0 just after hovering it. We don't need this type of blink

My.Video1.mp4

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode should i remove the opacity from 0 to 1

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211 Make it similar to the video I provided.

@Ayushmaanagarwal1211
Copy link
Author

Ok

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode please check again i fixed that

@Ayushmaanagarwal1211
Copy link
Author

Ayushmaanagarwal1211 commented Aug 5, 2024

bandicam.2024-08-05.20-50-18-800.mp4

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211 The latest commit isnt working, seems like some mistake, kindly fix it.

image

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211 Any updates?

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode yes I am fixing error please give me time for today

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode I fixed that check again

@Tanay-ErrorCode
Copy link
Owner

@Ayushmaanagarwal1211 Can you fix this image going out of the screen?

localhost_3000_(iPhone XR)

localhost_3000_(iPhone SE) (2)

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode i fixed that please check i reduced the sized of the images to minimum

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode please check

@Ayushmaanagarwal1211
Copy link
Author

@Tanay-ErrorCode what happened

Copy link
Collaborator

@Doraemon012 Doraemon012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@Ayushmaanagarwal1211 Please adjust the size according to the website.

@Ayushmaanagarwal1211 Ayushmaanagarwal1211 closed this by deleting the head repository Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Homepage card animation
3 participants