After my Academic high school studies and the surprised that my website is being in the top searchs! So, I should have to update my cv to be more efficient And I had a lot of ideas to implement. So far my website - CV - has gone through three radical changes:
From the First Next Stage to the Current version there is a multiple things I have done:
Due to the slider that I wanted to do the screen being very small to display each section content So:
After reaching the end of the section of the slider the body has scrolled down to let you see my projects!
There are several challenges that was a very helpful for me
The home sider was a very unique feature. The slider was too much to interactivity, which made me think of a solution to the problem, which is that I want to reduce the number of client components.
So I used wrapper and children of the wrapper.
SliderWrapper: is the wrapper of the sections that wrapped the slider and Init the slider sections
SliderItem is the Wrapper of each section
Both SliderWrapper and SliderItem are the Client components that handle all the interactivity and logic of the slider
Anywhere I want I put SliderWrapper and Pass with the needed props. Mmmm the needed props sure contain activeItem that indicates the current slider item that may push me to put the state of the slider in the top level I mentioned before "Anywhere" But I get the solution: I put the state in SliderWrapper and used cloneElement from React to pass the activeElement prop
In the projects marquee I was facing two problems
Through calculations, I came up with a *mathematical equation that guarantees smoothness and stability of the marquee speed with the addition or deletion of dozens of projects. Let's clarify
I made a manual experience and I got that every 300 pixels take 6 seconds
Therefore, Speed of the animation = 348px/6sec = 58 px/sec
Therefore, Speed = Length/Time
In our case the length would be the width of the container of the marquee and the time is the animation duration
Now we can get the duration of the animation from 58=Width/Time, T = Width/58
Now The equation has the unknown Width.
The dilemma now is to reduce or even lack of JavaScript client code. So I decided to calculate the width manually to get the width of the marquee container before reaching the client browser
By this information I could calculate the marquee container even if it isn't rendered. By adding the gaps and the number of cards we get the final width equation: Width = 100 * cardsNo. + (16 * cardsNo) -1
We came up with all necessary things to solve Speed problem and fix a speed of 58px/sec
But we still have one problem
Basically, The Smoothness of the animation is the main target of the animation. If the animation isn't smooth so no need for animation The animation seemed to be crash after all the projects end So we solve this problem by start the all animation from the first of the screen
The MD for the previous Version 👇👇👇
This is the version number 10 of my CV, since ten is a special number So I decided to convert my whole website to Next js 13.4 After officially declaring it be stable
There are many features come with the latest version of Next.js 13.4 🔥 I built a dashboard to control my CV, the website includes:
IMAGINE all these stuff without even a single API route! Only Server Actions
No uses of built-in Image component because I hate it 😠