Also, I made a carousel on codepen and it worked great, but its not working on Atom. is there a language i forgot to install to make it work?
Just in case you haven’t figured it out from the help above, I’ll make it super easy. Create a .html file and a .js file in the same folder. The .html file needs to have html, body, and head tags and also reference your .js file. These parts are handled out of sight by codepen, everything you write in the codepen HTML section is put between body tags.
You definitely dont need node.js running for this. Just open the .html file in your browser.
If you want to continue using Sublime or Atom, I would suggest previewing your progress in the browser. As Jay said above, create the files and edit them in Sublime or Atom, and then open the .html file in the browser to view.
If you want to have more integration between the editor and previewing, you may want to check out Brackets. It is Adobe’s text editor that has a very good preview feature.
The reason I’m using atoms preview feature is because I couldn’t figure out how to preview my progress via the browser, I tried googling it for awhile by couldn’t find a solid answer. If it’s something simple, would you mind explaining how to do it?
A couple years ago I picked up RoR for a few months and remember that t was simple to preview my progress through a localhost:4000? Tried to research that as well but saw a lot of different answers that didn’t work for me
@Tyrantt47 - I know you said you like using Atom. If you want an editor that makes it really easy to preview what you’re working on, I’d recommend using Brackets. It has this Live Preview button right in the editor. When you click it, the page you’re working on gets opened inside your default browser. It has tons of extensions to add style and functionality to the editor. I included a screenshot to show that all you have to do to preview your site is to click that little “lightning bolt” on the top right of the editor screen.
You may have figured it out by now because this thread is several days old, but for anyone else who is having trouble opening a file in their browser first you find the html file in your computer. Then you can either drag it to your browser of choice to open it or right click, hover over “open with”, and select your browser of choice.
I am having similar problems with Atom. I wanted to shift away from CodePen but I can’t get Atom to work like CodePen at all. I have researched every preview package available and I still can’t get Atom’s in browser preview to inject my css file. It is useless if I can’t see what my page looks like! But is Brackets better about this type of thing? Thanks.
Yeah, I have tried referencing it in every way possible. As long as the file is local and not online it won’t load in the page preview(which is based from an HTML file that is also local. Right next to my CSS file.)