H
H
Happy-Child2019-06-17 20:02:27
HTML
Happy-Child, 2019-06-17 20:02:27

Help with code review of layout?

Hello!
Please help with code review.
Here is the layout itself - https://serge.sivenkov.by/
Here are the sources - https://github.com/Happy-Child/Happy-Child.github.io
Please pay more attention to the sources. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2019-06-17
@Happy-Child

I think in this mini-project you no longer need to redo everything, but in the future, pay attention to:
Files:
- If you collect dependencies in a bundle, do not store their sources in a repository. They are not needed there. Keep only package-lock.json in the repository so that you can download the correct versions of everything.
- All build-related configs must be in the repository.
- It would be cool to separate the source code and the build result. Conditionally in the src and dist or build folders or whatever you call it. It will be more convenient.
Scripts (it's lazy to check the logic, so only in appearance):
- A lot of things in one file. Divide into small modules, it will be more convenient.
- Everything is very different. Quotes, tabs and spaces, even if-else you write differently all the time. Use one coding style. For starters, you can take from airbnb - it is quite popular.
Styles (didn't look at everything, I'm talking about a couple of files):
- I see a hodgepodge of CSS methodologies. Like BEM, but in some places some kind of game begins. Like this: "main-banner__title text-accent text-cormorant-bold d-block wow fadeInUp".
- The constant use of px-to-rem with different parameters mixed with just pixels requires too much attention to itself. Is it really needed there?
- There is an autoprefixer for prefixes. Don't waste time on them.
- To import animations from animate.css there is postcss-animation. Again, don't waste your time.
- If using color variables, don't mix them with hardcoded rgba and hex values.
- Magic numbers like calc(100% - 427px) should not be used or commented.
- Embed critical CSS in pages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question