Conversation
| "react-scripts": "5.0.1" | ||
| }, | ||
| "scripts": { | ||
| "predeploy": "npm run build", |
There was a problem hiding this comment.
is this inserted by github pages? Seems a bit inefficient to me :D
| function App() { | ||
| return ( | ||
| <div className="App"> | ||
| <HomePage id="Home" /> |
There was a problem hiding this comment.
HomePage seems odd naming to me for a single-page application! Maybe something like Hero, Heading, or something along these lines would fit better, depending on what the section actually contains.
| @@ -0,0 +1,21 @@ | |||
| .about-container { | |||
| <button className="button-1"> | ||
| <a href="#basics-section"> | ||
| <img src={MenuIcon1} alt="" /> | ||
| </a> | ||
| </button> | ||
| <button className="button-1"> | ||
| <a href="#intervals-section"> | ||
| <img src={MenuIcon2} alt="" /> | ||
| </a> | ||
| </button> | ||
| <button className="button-1"> | ||
| <a href="#major-scales-section"> | ||
| <img src={MenuIcon3} alt="" /> | ||
| </a> | ||
| </button> | ||
| <button className="button-1"> | ||
| <a href="#circle-of-fifths-section"> | ||
| <img src={MenuIcon4} alt="" /> | ||
| </a> | ||
| </button> |
There was a problem hiding this comment.
This here seems quite repetitive. We could probably use an array of objects for this, and render this via a array.map!
There was a problem hiding this comment.
| <button className="button-1"> | |
| <a href="#basics-section"> | |
| <img src={MenuIcon1} alt="" /> | |
| </a> | |
| </button> | |
| <button className="button-1"> | |
| <a href="#intervals-section"> | |
| <img src={MenuIcon2} alt="" /> | |
| </a> | |
| </button> | |
| <button className="button-1"> | |
| <a href="#major-scales-section"> | |
| <img src={MenuIcon3} alt="" /> | |
| </a> | |
| </button> | |
| <button className="button-1"> | |
| <a href="#circle-of-fifths-section"> | |
| <img src={MenuIcon4} alt="" /> | |
| </a> | |
| </button> | |
| const buttons = [{ href: "#basics-section", icon: <MenuIcon1 /> }, .....] | |
| {buttons.map((buttonItem) => | |
| <button className="button-1"> | |
| <a href={buttonItem.href}> | |
| <img src={buttonItem.icon} alt="" /> | |
| </a> | |
| </button> | |
| )} |
| <> | ||
| <div className="container" id="homepage"> | ||
| <div className="wrapper"> | ||
| <div className="home-title-1">Welcome to</div> |
There was a problem hiding this comment.
Instead of using classes like home-title-1 I think we could be a bit more descriptive.
In this case I would do something like home__title and home__subtitle or similarly. Can check BEM convention for CSS for more guidance https://getbem.com/naming/
There was a problem hiding this comment.
Oh right, and since these are headers, it would be better to use headings instead of a div. h1,h2,h3 etc.
| <> | ||
| <div className="padding-container" id="intervals-section"> | ||
| <div className="container-flex"> | ||
| <div className="title">Intervals</div> |
There was a problem hiding this comment.
we shouldn't use divs for everything. Divs are more like sectional dividers. For content like such, a paragraph or heading would make more sense semantically.
| <p>Half tone - H</p> | ||
| </div> | ||
| </div> | ||
| <div className="separation-line"></div> |
There was a problem hiding this comment.
Could use an hr tag and style it here, I think. Or maybe use borders on the previous or following elements to create a separation line.
| </button> | ||
| </div> | ||
| <div className="flex-text"> | ||
| <div>C D E F G A B C</div> |
There was a problem hiding this comment.
It would be great if you could create variables containing this data, and utilize a function like .map in order to dynamically generate the html for the whole file. Ideally we want to be as lazy as possible and try to avoid manual labour as much as possible. Try to use code to do these motivation-killing tasks for you.
| </button> | ||
| </div> | ||
| <div className="flex-text"> | ||
| <div>Bb C D Eb F G A Bb</div> |
There was a problem hiding this comment.
Yup this whole file could be generated dynamically almost.
| </button> | ||
| </div> | ||
| <div className="flex-text"> | ||
| <div>Bb C Db Eb F Gb Ab Bb</div> |
There was a problem hiding this comment.
Same as with major scales, use functions to generate the HTML. See it like this, we try to let our computers work for us, not the other way around. When you write repetitive code, ask yourself if you could create this code in an easier and dynamic way. If we don't strive for that, it would be like endlessly filling in excel tables by hand.
| @@ -0,0 +1,33 @@ | |||
| import "./App.css"; | |||
|
|
|||
| const Basics = () => { | |||
There was a problem hiding this comment.
components always capital letter, as well as the file name
| import "./App.css"; | ||
| import ScrollToTop from "./components/scrollToTop"; | ||
|
|
||
| const CircleOfFifths = () => { |
| @@ -0,0 +1,26 @@ | |||
| import "./about-style.css"; | |||
|
|
|||
| const About = () => { | |||
| import MenuIcon3 from "../assets/menu-icons-01.png"; | ||
| import MenuIcon4 from "../assets/menu-icons-04.png"; | ||
|
|
||
| const NavLinks = () => { |
| @@ -0,0 +1,17 @@ | |||
| import MenuIcon5 from "../assets/menu-icons-05.png"; | |||
|
|
|||
| const ScrollToTop = () => { | |||
There was a problem hiding this comment.
This sounds like a function, not like a component. I think we could rename this. If the first word in a name is an action, it is always a function usually. Plus the file name for components need to be capital letter
| import "./App.css"; | ||
| import NavLinks from "./components/nav-links"; | ||
|
|
||
| const Welcome = () => { |
| import About from "./components/about"; | ||
| import Welcome from "./homepage-welcome"; | ||
|
|
||
| const HomePage = () => { |
| @@ -0,0 +1,30 @@ | |||
| import "./App.css"; | |||
|
|
|||
| const Intervals = () => { | |||
| import "./table-style.css"; | ||
| import { Howl } from "howler"; | ||
|
|
||
| const MajorScales = () => { |
| import "./table-style.css"; | ||
| import { Howl } from "howler"; | ||
|
|
||
| const MinorScales = () => { |
No description provided.