-
Notifications
You must be signed in to change notification settings - Fork 11
Lab 1
Gannon McGibbon edited this page May 4, 2017
·
10 revisions
- Fork this project.
- Clone your forked project (
git clone https://github.com/winnipegrb/just_chew.git). - Check out the
lab_1_prepbranch (git checkout lab_1_prep). - Follow the steps in the README to get the app running (vagrant works with default configuration).
- Open
app/views/layouts/_header.html.slim. - Replace the
.navbar-brandlink text with an image:
- Use the provided Just Chew logo (
app/assets/images/logo.png). - Specify a width of
80and a height40for the logo image. - The image should have an alt attribute value of
Logo.
- Add another nav item to the
.navbar-navlist:
- Make the nav item float to the right with the
.float-xs-rightclass. - The nav item link href should be an empty hash (
#). - The nav item text should be
Log In.
- Open
app/views/layouts/_footer.html.slim. - Replace the
.navbardiv with the following:
- Create a div with an ID of
#copyleft. - Inside the copyleft div, create another div with a class of
.navbar.nav-inline. - Inside the navbar div, render a copyleft icon with the current year.
- Above the copyleft div, add the following:
- Create a div with an ID of
#social-media. - Inside the social media div, create another div with a class of
.navbar.nav-inline. - Inside the navbar div, add the following links:
- Create 3 links with icons for
twitter,facebook, andgoogle-plus. - Make sure these links have a class of
nav-link. - Make sure these link icons have a class of
fa-2x.
- Create 3 links with icons for
- Open
app/views/application/welcome.html.slim. - Replace the
.welcomeheader with the following:
- Create a div with an ID of
#main-banner. - Inside the main banner div, create an h1 with a class of
.display-3and textOrder delivery or take-out!. - Below the title heading, create an h2 with a class of
.display-4and textChoose from a variety of local restaurants. - Below the subtitle heading, using SimpleForm, add the following:
- Create a search form with a method of
getand a class of.form-inline. - Add an address input to the form with the placeholder
123 Fake St.. - Add a submit button to the form with the value
Goand class.btn.btn-primary.
- Create a search form with a method of
- Open
app/views/application/welcome.html.slim. - Below the main banner, create a div with an ID of
#cardsand a class of.row. - Inside the cards div, add the following cards:
- Using the provided
#welcome_cardshelper, loop through cards. - Inside the cards loop, create a div with a class of
.col-xs-4. - Inside the column div, render the provided
_cardpartial passing the current card as a local variable.
Once you've completed all lab sections, run the project's test suite with bundle exec rspec. Once RSpec is finished, you will receive a percentage mark based on what tests pass and fail. If you got anything wrong, don't give up! Keep refactoring your code until all tests are passing.
- https://github.com/slim-template/slim#syntax-example
- http://guides.rubyonrails.org/action_view_overview.html#overview-of-helpers-provided-by-action-view
- http://api.rubyonrails.org/classes/ActionView/Helpers.html
- https://github.com/bokmann/font-awesome-rails#helpers
- https://github.com/plataformatec/simple_form#usage
- http://api.rubyonrails.org/classes/ActionView/PartialRenderer.html