Slim Twig View rendering - CSS and JS not working

I’m trying to render a page on my website. I am using Slim Framework with Twig. When I put the HTML file in a different directory (other than Slim), it works perfectly.

But when I try to render it using Slim and Twig, I get this:

Seems like the CSS and the JS is not working. Also, if it works elsewhere, there must be something wrong with Twig and Slim. Here’s the source code of the HTML:
HTML Source Code

Not sure, but baseUrl() seems suspicious to me.
I think the correct Twig-View function name is base_path()

Thank you, I will try this.

I have solved this using:

  1. Changing the file extension to .html
  2. Using base_path() to get the base URL as suggested by @odan