interactive-harp
interactive-harp
KPCKevin Powell - Community
Created by interactive-harp on 6/27/2024 in #front-end
Can't center title - horizontally + vertically
No description
5 replies
KPCKevin Powell - Community
Created by interactive-harp on 8/10/2023 in #front-end
unique id - increment object name with 1, 2, 3 and etc
is there a way to create an object with a unique id/name each time, for example: I'm trying to create a circles object but want it to increment each time its created - circles1, circles2, and etc. On click I need this to happen:
let circles = 0; const circleCoordinates = []; function onClickFunc(){ circles++; circleCoordinates.push({circles : {x: mouseX, y: mouseY}}); console.log(circles); // doesnt create circles1 and etc, just circles obj }
How to solve this?
9 replies
KPCKevin Powell - Community
Created by interactive-harp on 5/30/2023 in #front-end
arrow function used within an object literal
why does arrow function cause an issue - this.make and this.model are undefined but "normal" function(){} when used, theres no issue of undefined properties in the object literal
let car = {
make: 'bmw',
model: '745li',
year: 2020,
getPrice: () => {
//perform some calc
return 5000;
},
printDescription: () =>
{
console.log(this.make, this.model) <- undefined with arrow functions
}
};
let car = {
make: 'bmw',
model: '745li',
year: 2020,
getPrice: () => {
//perform some calc
return 5000;
},
printDescription: () =>
{
console.log(this.make, this.model) <- undefined with arrow functions
}
};
44 replies
KPCKevin Powell - Community
Created by interactive-harp on 4/6/2023 in #front-end
Fonts not appearing in my network tab but getting no errors in my code
3 replies
KPCKevin Powell - Community
Created by interactive-harp on 4/6/2023 in #front-end
Display flex vertical alignment and responsiveness or position absolute?
11 replies
KPCKevin Powell - Community
Created by interactive-harp on 4/6/2023 in #front-end
Needed guidance on a loading page layout
2 replies
KPCKevin Powell - Community
Created by interactive-harp on 4/5/2023 in #front-end
How to name font color variables in scss/css
I have 3 font colors, how to name the variables? color-light color-mid-dark color-dark? color-primary color-secondary color-trinary?
33 replies
KPCKevin Powell - Community
Created by interactive-harp on 1/29/2023 in #front-end
advice on making first client website
Hello, Im making a website for a client and need advice on tech stack. I need backend to store content - thinking a headless cms like prisimic so client can upload own content as needed. But do I need React to fetch data with express? Or is Pug fine? Thank you.
4 replies
KPCKevin Powell - Community
Created by interactive-harp on 1/18/2023 in #front-end
Font looking very weird
5 replies
KPCKevin Powell - Community
Created by interactive-harp on 1/16/2023 in #os-and-tools
Vite issue with using local/custom fonts
I'm trying to load a custom font: @font-face { font-family: "Bellafair-Regular"; src: local("@/assets/fonts/Bellefair-Regular.ttf") format("truetype"); // src: local('Opensans-Bold'), url(@/assets/styles/fonts/OpenSans-Bold.ttf) format('truetype'); } getting this error with vite: Error: Dynamic require of "path" is not supported My vite config file: const path = require("path"); import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react(), dynamicImport(/* options */)], resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, }, }); How to fix?
7 replies
KPCKevin Powell - Community
Created by interactive-harp on 12/11/2022 in #ui-ux
Create a style guide after UX Design?
Hello everyone, Do you create a style guide after UX Design? Before UI Design is started? And add: 1. colors 2. typography 3. Paragraph vertical scaping 4. fonts Anything else? Thank you
2 replies
KPCKevin Powell - Community
Created by interactive-harp on 12/1/2022 in #front-end
How to create this text effect?
16 replies
KPCKevin Powell - Community
Created by interactive-harp on 11/30/2022 in #ui-ux
Icon creation - will pay
3 replies
KPCKevin Powell - Community
Created by interactive-harp on 11/29/2022 in #ui-ux
Please rate and give feedback for this design
8 replies
KPCKevin Powell - Community
Created by interactive-harp on 11/10/2022 in #front-end
Typeof question
why this is coming out as an object? let person = ["cheese", "hot"]; console.log(typeof person === "object"); <---- true console.log(this is any array? ${typeof person === "array"}); <---- false``
13 replies