I coded in Visual Code. I was able to put it in Github and it works fine from GitHub pages, but when I copy my code into CodePen it doesn’t work the same at all. Is there an easy way to post my code challenge results? I had trouble using image file from external source. Had to do some research to find a solution to that, but CodePen still messes up my background image. I wish it wasn’t so hard getting stuff to work on CodePen that is so easy to do elsewhere. For one thing, to be able to simply put my image in a separate folder requires me to sign up for a Pro account. Can I simply submit my GitHub pages solution link?
I just went through my profile challenge timeline and I don’t see the Random Quote Generator challenge there at all. Has the name changed? That is what I was trying to submit through CodePen.
It purports to be able to use GitHub pages. So why not simply submit challenge solutions that way? Here’s my working GitHub page https://silvanet.github.io/testFamousQuotes/
See if you can figure out how to put it on CodePen and have it work.
I tried copying the index.html page into the html editor, the style.css page into the css editor, and the script.js page into the js editor.
First, CodePen html threw some error notification. Then I couldn’t use the image file because CodePen wants me to get a Pro account to be able to create an images folder.
I put the image on Imgur, but CodePen doesn’t use it as a background image.
That’s a lot of hoops to do something that is really quite easy on GitHub pages enabling me also to do local coding. CodePen may be great, but it is also extremely complicated and difficult to work with.
Everything else is working fine. Did you click on the GitHub pages link?
So it’s Imgur that is blocking the page? I don’t think so because it actually shows up, but not as background. Anyway, it does work on GitHub pages fine. I’m OK with something eventually not working. While researching I saw many pages that I’m assuming once worked when they were sent in, but two or three years later don’t work even on CodePen. I suspect that might be because APIs changed. Thanks. One person responded to my post that I’m not required to use CodePen for my projects and that all I need is a live version and publicly viewable code. I do have a hosting service. Any tips on making the code publicly viewable?
Thanks. I’ll try to use GitHub pages when I can then. Just out of curiosity, I saw a lot of people recommending using DropBox (that didn’t work), and Cloudinary. I tried that one and it does the same thing as the Imgur link. I get a band across the top of the page with part of the image, but not as a background. I’m assuming the code is alright since it works fine on GitHub (but what I did there was create an images folder and place the image in it. Here’s the style code that doesn’t work with either Imgur (but you said it may be blocking it - although I don’t understand how or why they would block only part of it and let a band show), or Cloudinary.
Here’s the style code:
background: url(https://res.cloudinary.com/silvanet/image/upload/v1529512384/samples/animals/myTest/mymountainpic.jpg) no-repeat center center fixed;
You may want to consider buying hosting, and getting your own domain. Honestly having your own playground (I’m using shared hosting now but plan on getting a vps site soon for practice. having your own playground really helps.
Codepen Pro is fairly low cost, then you can host images there.