Orchest(Ping for replies)
Orchest(Ping for replies)
KPCKevin Powell - Community
Created by Orchest(Ping for replies) on 5/20/2024 in #front-end
How to implement responsive layout that's height dependent?
hey, how would you implement a website layout whose layout is dependent/responsive on height(e.g 100vh)? For example, the content grows its size as the height of the screen grows. What unit would you use for paddings, margins, and font sizes?
16 replies
KPCKevin Powell - Community
Created by Orchest(Ping for replies) on 5/15/2024 in #front-end
Keen slider issue
anyone here tried keen-slider? Why does this example of scroll navigation of pages seem to be buggy? Like sometimes it takes a few scrolls before it activates https://codesandbox.io/s/github/rcbyr/keen-slider-sandboxes/tree/v6/navigation-controls/scroll-wheel-controls/react-typescript?file=/src/App.tsx
1 replies
KPCKevin Powell - Community
Created by Orchest(Ping for replies) on 5/9/2024 in #front-end
Overflowing child on top of a parent container that has an overflow scroll
hey, does anyone know how instagram does this? The comment box, which we can consider as the parent container, has an overflow, however, its elements like the tooltip, when you hover over a user profile, is able to exceed or get on top of its parent container. How does one does this? Is the tooltip fixed? Cause from what I know absolutely positioned element cannot exceed its parent container especially if the container has an overflowscroll https://streamable.com/6zgie6
2 replies
KPCKevin Powell - Community
Created by Orchest(Ping for replies) on 1/17/2024 in #back-end
How to convert Buff to File Without locally saving it
How do you convert buff to a file? I have an endpoint that modifies images uploaded, and that endpoint returns buffs. Afterwards, I need these buffs to be uploaded in which I will call a service to do that, and the service I'm using requires File to upload the image. How would I do it so that the image is not saved and just passed to the function?
const imgBuff = images[0].image;

/* I need to save it as a variable and be passed as an imageFile, instead of saving it */
const fs = require('fs');
fs.writeFile('./image.jpg', Buffer.from(), (err) => {
if (err) throw err;
console.log('The file has been saved!');
});

await uploadImage(imageFile)
const imgBuff = images[0].image;

/* I need to save it as a variable and be passed as an imageFile, instead of saving it */
const fs = require('fs');
fs.writeFile('./image.jpg', Buffer.from(), (err) => {
if (err) throw err;
console.log('The file has been saved!');
});

await uploadImage(imageFile)
2 replies
KPCKevin Powell - Community
Created by Orchest(Ping for replies) on 12/16/2023 in #front-end
Absolute/Relative positioning overflow
No description
6 replies