G
G
Grep12020-04-25 17:13:50
Node.js
Grep1, 2020-04-25 17:13:50

How to correctly write the path to css for different routes?

The styles are in public/style/style.css
I registered a static on the public folder, i.e. when I go to 'domain/', my styles will be connected to the address /style/style.css and everything works, now I wrote a route for the address "domen.ru /panel/login" and styles in the browser began to be connected by "panel/style/style.css" i.e. they are not found on this page
The file that is rendered lies in views/admin The
header that I include in this file lies simply in the views folder .
Can you tell me how to make sure that the styles are always connected in the same way?
As I understand it, now it is looking for the panel folder in the public folder

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question