I added a navbar.html.eex to my layout folder and this template is rendered from app.html.eex <%= render "navbar.html", conn: @conn, current_user: @current_user %>
in app.css:
@import 'navbar.css';
and it should point to my file: assets/css/navbar.css
But the file does not load, in my browser console I get: GET http://localhost:4000/css/navbar.css net::ERR_ABORTED with a 404 error.
I come from the Rails world and that’s how I was used to do but maybe there is another way of doing it in Phoenix. I can’t find a nice doc about managing css files in Phoenix so if anybody has some readings to recommend ! I’ll be grateful !
After I changed them a bit, (ìmport navbar.css rather than @import 'navbar.css';) The css contained in navbar.css is loaded in the big app.css in priv/static.
But when I inspect my document in the browser, I do not see my CSS, even though app.css was loaded.
Edit: OKKK so I just realised that there is noimport needed with brunch ! great.