1
votes

i'm new at nodejs and i'm working on this project, and still learning to render ejs templates , So guys i have this template i had downloaded to work on my nodejs project with "https://github.com/puikinsh/gentelella" i put my template folders and files in the views folder then in my route i called index.ejs(have changed the type of the file from index.html to index.ejs) then i tested the result was that my template was working but no css it was plain text and links , no images no style. so i'v guessed that it's not loading the bootstrap nor the custom css can you help me and tell me more on the simplest ways to render and how to solve this problem?

1

1 Answers

0
votes

Most of the stylesheets of this template are in the vendor folder, you have to copy that folder in your views folder as well.

<!-- Bootstrap -->
    <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="../vendors/nprogress/nprogress.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="../vendors/iCheck/skins/flat/green.css" rel="stylesheet">

    <!-- bootstrap-progressbar -->
    <link href="../vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <!-- JQVMap -->
    <link href="../vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/>
    <!-- bootstrap-daterangepicker -->
    <link href="../vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">

    <!-- Custom Theme Style -->
<link href="../build/css/custom.min.css" rel="stylesheet">

And make sure that href are pointing in the right folder.Also at the end of the index file there are also js files which point to the vendor folder, make sure to check those as well.