CSS files and images not being loaded

Brian Spiesman
2 Posts
Brian Spiesman posted this 29 September 2020
Ask a Question

I'm building an image classification web app and using nicepage along with digitalocean and nginx. The website looks great in the nicepage preview and the web app works fine when deployed but CSS and images aren't loaded after all of the html, css, and js files are exported to the templates directory of my site. I have an index.html (where images are uploaded) and a predict.html (where classification results are shown).

Here is the top of the index.html file:

<!DOCTYPE html>
<html style="font-size: 16px;">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="page_type" content="np-template-header-footer-from-plugin">
    <title>Home</title>
    <link rel="stylesheet" href="nicepage.css" media="screen">
<link rel="stylesheet" href="Home.css" media="screen">
    <script class="u-script" type="text/javascript" src="jquery.js" defer=""></script>
    <script class="u-script" type="text/javascript" src="nicepage.js" defer=""></script>
    <meta name="generator" content="Nicepage 2.26.5, nicepage.com">
    <link rel="icon" href="images/favicon.png">
    <link id="u-theme-google-font" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i|Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i">

This is the file structure of the web app:

home/brian/BMproject/templates/

The html, css, and js files that were exported by nicepage are all in the templates folder. The images folder is within "templates".

It was my understanding that the css/js files and the image folder just needed to be placed in the same directory as index.html and predict.html. What am I doing wrong? Any help appreciated.

I'm building an image classification web app and using nicepage along with digitalocean and nginx. The website looks great in the nicepage preview and the web app works fine when deployed but CSS and images aren't loaded after all of the html, css, and js files are exported to the templates directory of my site. I have an index.html (where images are uploaded) and a predict.html (where classification results are shown). Here is the top of the index.html file: <!DOCTYPE html> <html style="font-size: 16px;"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta charset="utf-8"> <meta name="keywords" content=""> <meta name="description" content=""> <meta name="page_type" content="np-template-header-footer-from-plugin"> <title>Home</title> <link rel="stylesheet" href="nicepage.css" media="screen"> <link rel="stylesheet" href="Home.css" media="screen"> <script class="u-script" type="text/javascript" src="jquery.js" defer=""></script> <script class="u-script" type="text/javascript" src="nicepage.js" defer=""></script> <meta name="generator" content="Nicepage 2.26.5, nicepage.com"> <link rel="icon" href="images/favicon.png"> <link id="u-theme-google-font" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i|Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i"> This is the file structure of the web app: home/brian/BMproject/templates/ The html, css, and js files that were exported by nicepage are all in the templates folder. The images folder is within "templates". It was my understanding that the css/js files and the image folder just needed to be placed in the same directory as index.html and predict.html. What am I doing wrong? Any help appreciated.
Vote to pay developers attention to this features or issue.
1 Reply
Order By: Standard | Newest
Support Team
Support Team posted this 30 September 2020

Hi Brian,

Try to check the path to the images that you do not see in the content with their real location on the server.
But we actually do not support custom modifications. If the exported site works fine without modifications and when exported in the root folder of the server, then everything should be working fine.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Brian, Try to check the path to the images that you do not see in the content with their real location on the server. But we actually do not support custom modifications. If the exported site works fine without modifications and when exported in the root folder of the server, then everything should be working fine. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments