I've been trying to create a Cesium viewer in my html on Django. I can't seem to incorporate the widgets, images, styles, etc. I'm not exactly sure how to get the entire build folder into the static folder in my django project since all the necessary widgets and things needed by Cesium are located in that particular file. I tried to do the @import url(Build/Cesium/Widgets) but it did not work. Any help is greatly appreciated!
Here is what I have so far:
Index.html
<html>
<head>
<title>Lab00</title>
</head>
<body>
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'mystyle.css' %}" />
<style>
@import url(/Build/Cesium/Widgets/widgets.css);
</style>
<!-- Use correct character set. -->
<meta charset="utf-8">
<!-- Tell IE to use the latest, best version. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
{% load staticfiles%}
<script src= {% static "js/Cesium.js" %} type="text/javascript"></script>
<div id="cesiumContainer"></div>
<script>
var viewer = new Cesium.Viewer('cesiumContainer');
</script>
</body>
</html>
mystyle.css
body {
background-color: lightblue;
color:purple;
font-family: "Tahoma";
}
#cesiumContainer {
width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
}
h1
{
color: navy;
background-color: green;
margin-left: 20px;
margin-right: 20px;
}
.dot
{
color:blue;
margin-right: 30px;
font-size: 40;
}
Nvm, I fixed it. You had to take the entire build folder and place the individual subfolders into the static/js folder in django.