Kevin Powell - Community

KPC

Kevin Powell - Community

A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.

Join

front-end

resources

back-end

ui-ux

os-and-tools

help

CSS Vertical Text Alignment

I haven't messed with my website in a few months and I've been sick for 2 weeks. Trying to add a new section of buttons and my brain is frying trying to get the text to align. 😭 ``` .nav2{ background-color: #1C1C1C;...
No description

Setting overflow on child cuts off content and removes scroll behavior of nested grid

I have an (horizontal) overflow of hidden and some ellipses on some child inside a grid inside an other grid (or flex, doesn't matter), which squishes the content and thus removes the (vertical) scroll behavior of the inner grid. Removing the grid/flex from the outer container produces normal scroll, but then I can't distribute the height of the inner grids. Removing the overflow from the child also restores scroll behavior, but then I'm not responsive to long text and/or a narrow window. I've created a minimal reproduction here: https://play.vuejs.org/#eNrtV02P0zAQ/SuWTyA1LVC4hFAEqKDlwKJlJS65eO1p413HtmynyWrV/87kq23aqnwcUXKazJt582Ymspwn+sHa6aYAGtMkQG4VC7BIdaoJSYTcEK6Y9+9Sel0EcF+cFClFmOAzgK+0PoKPAm5MiVDiLdOLZWWBBxDJrHn9C+cMKUf+kX/kH/n/c/6B/c9H7c/bz+8HFS86/qy9kXPkHDlHzt9y7u3eSmaDO2biw6OqTUKmuwsmeWqzhfQY+RiTlYLqbeurzUhIh4emNDom3Kgi1x24xuSo54+cKX1MXq0cma9cH8EsumzLtm1vuQeFF1hz05c3G3ArZcoIFXjujFIdyZ1xAlxMXtqKeKMw704x/jDg3J3RJ83UIs/qbVtByQ4ssPBsPiGsCOZ5F5yzKspArrOAHbx5cdTDvt6CTHF3J2W50QF08OezYtx6iHgmlSD1Fk9mUMUkk0JAP+oykygZQznERJvSMdshAaoQ9XkxAaWk9bCri19Js3I6ocGjqJVcT++90fj70dRMKTe5lQrcta1X7FMa92pSyhSSfm18wRUw6f08A/5wxn/vq9qX0u8OPLgNpHSHBebWEFp4+eMbyj4AcyMKhdEXwBvA5Re1xjbsY6EFyj6Ia9Re5da4IPX61i8rXIHvm6qFNkNp4lOK/2CfLrS+lzufvu6GuaXbX2BikOQ= The vue part is irelevant, it's just a nice rapid prototyping playground with everything included in the url 🙂 How can I work around this unexpected behavior?...

Simple clock

Hello Can someone help me why it is not working? https://codepen.io/lanszelot/pen/yyyzPwL...

WordPress: The theme directory "oceanwp" does not exist .. on pages

WordPress Error: The theme directory "themeName" does not exist. This issue is happening on pages, not the homepage . Tried adding new pages, editing page names - nope. ...

Best way to get data for an upcoming events component?

So i'm building this website for a racing driver, and i would like to make a component for a section that shows the upcoming races/events in a grid, but i'm not sure what way would be best to get the data. I used Strapi as the CMS, along with Next.JS, but i recently started thinking if i should just use the facebook pages api, if it's easy enough to use and get access to, since he already posts the events as facebook events, but on the other hand i could just use strapi and make it easy for myself, but then he would have to add the events both on facebook and in strapi....

Beginner React movie list project - Needs suggestions and improvement

Hello everyone! I'm a beginner in React and I'm learning concepts like components, props, state, and event handling. I have built a small movie list project where I display a list of movies using a component. I have also added Like and Dislike functionality using useState. ...

Creating Database Plugins in Wordpress

I'm very much a front-end developer who has built a couple WordPress sites, but nothing requiring databases or needed to go into the backend of Wordpress. I need to rebuild a local government directory website that has all the information for 91 cities and towns in my state with all the local government employees contact information, populations, square miles and other info. I need to figure out how to build this myself or what plugins that might already exist that could help me.

What is a socket and how does it work?

Hello guys, I have a quick question, previously I wanted to know what a socket is and how it works. I read a bit about networking in general and then tried to understand how sockets work. So basically, from what I've understood: 1. A socket is just an endpoint that enables us to read data or write data (just like a file can be read from or written to.) 2. Now, in the TCP/IP model, a socket is created, we give it an IP and a Port number. Then TCP will just to its things, wrap all packets, ensure they are assembled in required order or retransmit lost packets etc....

<img> / <picture> in HTML or bg-image in CSS ?

Should this big image be used as an <img> tag in HTML or as a background-image in CSS? What is the correct way? It is a big part of the design, but it seems only decorative to me. Can you help me decide?
No description

pursuing university degree

i was wondering what university degree should i pursue

Making navigational page load quickly on mobile

Is there any reason why simple navigational pages would not load quickly on mobile? My mobile website will have the following for navigation... - Hamburger menu with a nested accordion menu...
No description

whenever i load the slider i made, the styling of var is only implemented on one slider & not others

so basically this i have made a slider & i loop over the images in the flex after populating (the after populating is for copying the first & the last image & put the & the opposite ends) ```js...
No description

Should we ignore both node_modules and package.json files when pushing to a remote repo?

Hello guys, sorry to disturb you all... I have a quick question. I read that when creating a github repository and when pushing js files that uses external node libraries, we should ignore the node_modules since this will affect performance. Should I still upload the package.json file?...

Can anyone recommend a good free form submission service that emails you from a website contact form

Can anyone recommend a good free form submission service that emails you from a website contact form

Swapping in inline form vs disabled/styled input

If I have a displayed element (lets say a name) that I want the user to be able to change, I see two options: 1) A display element (a div or something) and an inline form, with javascript showing one or the other based on clicking an edit button, cancelling the form, etc. 2) A input with classes/disabled that's swapped via interaction, so in one state it looks like an unstyled display element, and the other looks like an input. Is there any downside to the latter? If the form/input are both submitted via fetch anyway, is there any problem with just having an unstyled input?...

fixing the cls caused by scale on images

so i have this element on this page & this selector is responsible for the element ```css .accomodation-single-item-more-info-facilities .accomodation-single-item-facilities-benefits figure{ scale: 2; margin-block: 2rem;...
No description

Wireguard and non-VPN external connections

I'm using a raspberry pi with raspbian. It's permanently connected to a wireguard VPN (the VPN doesn't support port forwarding from the external VPN address). I also want to host something on the raspberry pi and make it accessible over my home internet. When the VPN is not connected: The service works from inside my network. The service works from outside my network. So the issue is not port forwarding from my modem to the pi...

I'm looking for smb to do early meetings in google-meet (9 - 10 AM GMT+2 CEST)

Just want to discuss at the beginning of the day with somebody what I'm going to do and also would like to know what are you coding Next.js TypeScript Tailwind meetings every day for 5-10 minutes...

Why are there so many JavaScript frameworks?

Hello guys, it's been sometime now that I have been using vanilla HTML/CSS/JS. I wanted to learn some frameworks just to see how all of that works and from what I've told, in real world/jobs, the majority of time, we use frameworks to do things. My first question is: What do we have so many frameworks from Next.JS to Angular.JS to Vue.JS to React.JS and so on please. Second is, if I need to learn a framework for JavaScript and also for CSS, are there any recommended frameworks please. (By the way HTML doesn't have any framework on its own? There are terms that I saw like pug, SASS etc I think, are these related to HTML ?)...

Need advice on caching data retrieved from useeffect in react

hey guys so im currently working on a project that will retrieve reddit posts and filter them by pain points similar to GummySearch but for a single niche to generate potential business ideas! the reason im building this is cuz i cant pay $60 for gummy search 😦 and i thought it would be cool to build my own version to use for free for a single niche anyways the problem is with the call to Reddit API now with useeffects in general the its called whenever the component mounts right but i dont want to do that. whats the best way to cache the posts retrieved from Reddits API on the client? i want to be refetching only after every 2 hours ! so say the user opens the app it fetches posts and then if the component unmounts and remounts i want to check if its been 2 hours since the last time, how can i do that check?? also where do i store the fetched posts? on local storage? do i save them to the database? ...
Next