MagicEmperor
KPCKevin Powell - Community
•Created by MagicEmperor on 4/20/2024 in #front-end
How can I go about implementing this flex layout
I found this amazing portfolio - https://yasio.dev/#work
On the first impression i thought it was a grid layout , but by inspecting it(quite literally) I found it was using flex box with different margin values ,
After a lot of brain storming I still cant figure out how can I dynamically generate this layout.
I am assuming this is not hard coded
TLDR; The same thing as in the link as it generates the same layout on refresh , i.e the placement of each projects remain the same
------------------------
each time their placement remains the same ,
i.e
if the list of projects is - [...proj1 , ...proj2]
the generated layout would place proj1 on x and proj2 on y
if the list of projects is - [...proj1 , ...proj2 , ...proj3]
the generated layout would place proj1 on x and proj2 on y and proj3 on z
so on and so forth
------------------------
your help is much appreciated
1 replies
KPCKevin Powell - Community
•Created by MagicEmperor on 4/12/2024 in #front-end
Framer motion component lags for me
i was creating a custom cursor element and i found this implementation -
https://codesandbox.io/p/sandbox/framer-motion-mouse-position-2b4sd?file=%2Fsrc%2FApp.js%3A78%2C11
i copy pasted the same code and when i run it , its not smooth at all and its laggy
i am using
bun and latest next js ,
my project is this links's component copy pasted and nothing else and it lags like this
8 replies
KPCKevin Powell - Community
•Created by MagicEmperor on 3/17/2024 in #front-end
Astro : How to import local images in framework components that will work in the build
For normal astro components, I can use import(...) in my <Image/> component ; however, in my use case, I am dynamically rendering content through JSON, and my file paths start from /src/assets/.... I am passing them as they are to my React components. They work just fine in development, but show an "image not found" error in the production build.
Any help is much appreciated , thank you
5 replies
KPCKevin Powell - Community
•Created by MagicEmperor on 2/27/2024 in #front-end
'Jotai' Best practices
I've been exploring Jotai to grasp its capabilities and use cases. I created a basic application for filtering a list and adding and removing items from it. Seeking opinions on whether my implementation aligns with best practices and effectively leverages Jotai's functionalities.
Store
display stuff
adding stuff
2 replies
KPCKevin Powell - Community
•Created by MagicEmperor on 11/21/2023 in #front-end
Self Positioning modal
I wanted advice on how should I go about this , should just simply calculate the space anytime an item is hovered with JS and add classes or is there any better CSS only way or any simpler approach
5 replies
KPCKevin Powell - Community
•Created by MagicEmperor on 11/7/2023 in #front-end
Slide-in animation snapping when opening the navigation drawer in mobile view
I am trying to clone the sidebar navigation from this website https://m3.material.io/ ,
How it is supposed to :
In the mobile view , when clicking on a menu item the menu slides off and the navigation drawer is revealed
What it does in my solution :
In my clone while opening the navigation drawer , it just snaps or disappears and after a little delay the navigation drawer is revealed
code pen : https://codepen.io/jn3ck-/pen/bGzqGEV
3 replies