Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems running codepen project on local machine

I'm trying to get https://codepen.io/SpacecaseArtist/project/editor/DQWYxo onto my local machine to play around with it.

I clicked export at the bottom right, and downloaded the zip. I extracted the zip into a folder, and then opened index.html on my browser. When I open it, I'm greeted with a scrollable, blank page with a title and nothing else.

My first thought was that there must be some misimported assets, so I looked into the index.html file, and saw:

<script src="//s3-us-west-2.amazonaws.com/s.cdpn.io/138941/draggble.min.js"></script>
<script src="//s3-us-west-2.amazonaws.com/s.cdpn.io/138941/teenmax.min.js"></script>
<script src="//s3-us-west-2.amazonaws.com/s.cdpn.io/138941/waypoints.min.js"></script>
<script src="//s3-us-west-2.amazonaws.com/s.cdpn.io/138941/classy.js"></script>

Is there something with these .cdpn.io cns that makes it so that I can't run it on my local machine? How can I go around this?

like image 949
Adam.V Avatar asked Feb 18 '19 03:02

Adam.V


Video Answer


1 Answers

Just add a local path:

<script src="path/to/file.js"></script>

The above are partial absolute links - to make them work, you need Internet and to add https: before the //:

<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/138941/draggble.min.js"></script>
like image 180
Jack Bashford Avatar answered Oct 20 '22 23:10

Jack Bashford