Welcome back!!! So far we have built out our rails back end for our application. In this post we will create our user interface. If you haven’t done so already please check out part one to this app found at. https://vincentservio.medium.com/creating-a-flash-card-app-part1-8f2ad6954331post.
Many of the variables that we will be using will stem from that post.
Begin by Cd’ing into FastCard folder(or whatever you named your Flash Card parent folder). Enter
than cd into that folder and enter the following commands
touch index.js index.html style.css
This will create our basic file structure to start our app. As we progress we will add and replace some of the variable names. Open folder in your IDE and head over to the HTML file to start our app. If you enter
! in your HTML file, it should generate some HTML mark up to get us started.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial- scale=1.0"> <title>Document</title> </head> <body> </body></html>
Now that we have our HTML markup in place lets connect our other two files to our HTMl files. In the <head> tags place the following line of code to associate the css file that we created.
<link rel="stylesheet" href="style.css" />
<div id="main"></div><script src="index.js"></script>
Now we can take a break from our HTML file for a bit and head on over to our index.js file.