E
E
Evtera2020-05-28 20:00:54
css
Evtera, 2020-05-28 20:00:54

How to make multi-page sites using the same type of blocks?

Good afternoon. I laid out the main page, the customer asked me to make internal pages, but I have no experience in laying out multipage pages.
On the inner pages there are similar elements (footer. navigation with some changes). How to Use CSS Properly? Supplement the old one or create a new style file for each page? What should be taken into account?
If possible, I will be glad to link to an explanatory article.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
profesor08, 2020-05-28
@profesor08

Copy-paste html to a new file. Add the styles you want to the style file.

A
Anton Litvinenko, 2020-05-29
@AntonLitvinenko

I also ask myself the same question from time to time. And if for html it is quite possible to use copy-paste or, for example, gulp-rigger in the collector, then there is an eternal problem with styles. Especially if page layouts are added gradually. And especially if the ugly designer does not adhere to any system. And you did, for example, the features block on the main page and called the classes in a similar way, and then bam! The features page appears with similar but different elements. And in most cases, it's easier to copy-paste styles and change a little and the code grows, grows...
Bem is a good helper if the designer is adequate, and there are really reusable blocks in the layout.
I often use the chip with the addition of an additional class. This is aside bem, but not so globally

D
Dmitry Zhemchuzhnov, 2020-05-29
@alphaDzhem

Try using a template engine. For example jekyll.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question