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

tabindex attribute on radio input

It seems like we need to have a name attribute on an input of type radio, otherwise, we can't tap through them, is this correct or am I doing something wrong?

Extracting date from a Wiki page

I need some guidance. I have a personal page, built with Astro Framework. Then there's a wiki page that has tables and data. What is the best approach for me to collect some of this data of this wiki page into a JSON, and from this JSON generate a JS that displays this information?...

How can i get api for this

how can i make like when someone use this discord bot to add a user ?? or if they add it to the server and the number to change

header missing in responsive mode

i have attached the video. To my understanding the header is moving out of bounds and its not showing when scrolled. if i give display none to countries forecast section the header appears, how to fix this?

How do I build a website like this using JS?

How can I code the kind of animation that is in this website - https://www.peopletonotion.com/ . I don't understand how this is built. Would love to learn it. Here, the Hero image is fixed as we scroll through the page....

Codepen auto complete feature query

Is there any way to bring auto complete feature in codepen.io? I miss this feature for css to avoid typo mistake.

Eslint: Unresolved Module Errors in "Monorepo"

Hi, I have set up a project containing two separate sub-projects, one for my headless CMS and one for the frontend. Before then all modules for custom paths (set up in the tsconfig.json) did correctly resolve, but now that the root is no longer in the project root, but in the astro sub-directory it can no longer resolve them. Everything still works, except for eslint complaining, and CMD-Clicking the paths opens the right file as well. ...

Sass @use won't import partial

I'm working on a project with vite. I'm trying to import a partial, but for some reason I keep getting an error saying can't find stylesheet to import File structure: ``` /src...

Best approach to add an SVG image positioned bottom of a ClipPath.

Hey guys and gals, Firstly, thanks for taking the time to checkout my question. Any help or insight is appreciated, spent a good part of today with no success unfortunately. We're currently building a basic portfolio site for a client. The client has provided a UI of what they want their website to look like (don't judge). The Problem:...

Why is my nav not responsive?

I don't know why my header is not responsive. I've been looking around for about an hour and I can't seem to find what's wrong. What's the problem with my code? I'm using tailwind for the styling, the rest is pure React. ```ts import React, { FC, ReactNode } from 'react' import DiscordLogo from './svg/DiscordLogo';...

Is it possible to combine the "Pool Design Pattern" and the "Immutable Design Pattern" in JS?

I'm working within a complex application that uses a lot of new instances of a given class in big loops (multiple million iterations per frame for image processing). To mitigate the (huge) impact on performances that the use of the garbage collector would provoke I am using the "Pool Design Pattern" (tl;dr: reusing the same instances when they are not used anymore to prevent garbage collection and the creation of new instances). The issue is, I need to apply a lot a consecutive operations on my instances, so to make sure I'm using an instance that has the value that I need at any given moment I want to add Immutability to the mix (tl;dr: when created, an instance's values can't be modified). If I want the pool of object to work I need to send the instances back to it (recycling). The process would look something like : ```ts const myObject = myObjectPool.getOne(/* some initialization parameters */); ...

page props undefined , `Subpage undefined` SVELTE

```js <script context="module"> export function load({fetch,params}){ console.log(params.id); let id =params.id;...

Keep getting error "Uncaught TypeError: Cannot read properties of null (reading 'classList')"

I'm making a js-actuated modal but I keep getting the error "Uncaught TypeError: Cannot read properties of null (reading 'classList')". This is my code: `<!DOCTYPE html> <html lang="en"> <head>...

CSS selector for a div followed by another?

Hello. I'm trying to create a CSS selector that would select a div followed by another one. Take a look here: https://codepen.io/CZghost/pen/poOrYze What I'm trying to do is this: I have a div with class labelced-message, and following is a div with class labelced-note. What I want to do is to select the message div, but only if there is a note div following (not directly). The reason why I want that is I'm making a MediaWiki template. Something similar to the ~ selector, but the other way around. Instead of an element preceded by another, I want to select an element followed by another. In other words I'm trying to select an element that has a sibling following. In other words something like this: div.labelced-note < div.labelced-message....

Background in page

Hello I put this picture on a background

Why does my Log say the Value is NaN?

well, i have this part of my code inside the js now everytime the loop runs it's supposed to generate a random value for x , y , vX , vY and r but when I log the value inside the loop it says all those variables r NaN this is the part ``` for(let i=0; i<100; i++){...

Opinions on this gsap parallax?

I've made this parallax section with gsap and it's just a bit stuttery/has issues with continuing to scroll as the image gets higher. I've pretty much topped out in terms of skill on this one I think, but I'm still not really happy with the results and was hoping for a bit of input 🙂 https://codepen.io/nwoodward/pen/zYJdKox?editors=1011...

Front end projects where its only empty divs, full of css and js. how is it done? without content

``` <div class="container"> <div class="calendar"> <div class="month"> <i class="fas fa-angle-left prev"></i> <div class="date">...

How to speed up the asynchronous multiple request in a single fetch link?

The code that I will post is working properly but the only problem that I did encounter, it is not yet optimized for fetching a lot of chunks data it tends to overload/lag. What kind of fetching should I use that is optimize for fetching a lot of data? I am clueless now. Thanks for the help guys ! 🙂 Note: ...

React Query state management

Can other states management tools be ignored over React Query being used for state management in a react application?