Review
Topics Covered: Sinatra
Exercises
Note: All exercises must live inside of your session0202_exercises/firstname_lastname/d3
folder. Today's homework should be inside of two separate folders, one for your personal_app and another for calculator_app
While inside of your session0202_exercises
directory, you can git add .
then git commit -m "Helpful commit message here"
and git push origin master
to submit your homework to GitHub. (Don't forget to use git status
along the way to check the state of your files in git)
- Build a sinatra app!
- Your app will have 3 pages: home, about, and contact
- Home: This page should have a brief personal description and a thumbnail of your profile picture.
- Link the summarized bio to your about page with a more... link
- About: Have a more expansive biography with some of your interests, education, etc. Include a full sized profile picture
- Contact: List your contact information here
- i.e., e-mail, linkedin, facebook, physical address, etc.
- Your website needs some sort of navigation on each page that allows the user to easily navigate back and forth between pages.
- Your website needs to have the root route set to Home.
- You will be presenting your apps in class tomorrow :)
Calculator app
- Build a sinatra app that acts as a calculator using url parameters as arguments
- i.e., Visiting
http://localhost:3000/add/4/7
, in your browser, would bring you to a page that displays text saying "The sum of 4 and 7 is 11!"
- Create routes and corresponding views for each calculator operation (add, multiply, subtract, divide, exponent)
- Create a home page with text explaining how to use your calculator app. Set this route as the root.
BONUS
- Add css styling to your personal profile app using the bootstrap framework
Great work! Now add and commit your work then push it to GitHub :)