Skip to content

Commit

Permalink
add gallery with corresponding controller action, route, and view
Browse files Browse the repository at this point in the history
  • Loading branch information
sjfox26 committed Mar 29, 2018
1 parent ec043b2 commit 6b19300
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 111 deletions.
291 changes: 205 additions & 86 deletions .idea/workspace.xml

Large diffs are not rendered by default.

18 changes: 12 additions & 6 deletions app/assets/stylesheets/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ header {
margin-right: 10px;
font-size: 1.5em;
color: #fff;
// text-transform: uppercase;
letter-spacing: -1px;
text-transform: uppercase;
font-weight: bold;
//letter-spacing: -1px;
padding-top: 9px;
// font-weight: bold;
font-family: Helvetica, Arial, Verdana, sans-serif;
Expand All @@ -56,8 +57,9 @@ header {
}

#phone_icon img{
width: 16px !important; //careful with !important - Hartl CSS tutorial
height: 16px !important;
width: 16px; //careful with !important - Hartl CSS tutorial
height: 16px;
padding-right: 2px;
}

#site_content{
Expand Down Expand Up @@ -97,7 +99,6 @@ header {
font-size: 1.0em;
}


/* HOME STYLES */
.front_page_container{
padding-left: 0;
Expand Down Expand Up @@ -160,6 +161,7 @@ header {
.about_tom_container{
margin-top: 20px;
//padding-left: 50px;

}

#about_tom{
Expand All @@ -186,6 +188,10 @@ header {
align-items: flex-end;
}

.tom_description_content{
padding-top: 15px;
}

.services_container{
margin-top: 20px;
//padding-left: 50px;
Expand All @@ -208,7 +214,7 @@ header {
margin-left: auto;
margin-right: auto;
height: 15vh;
padding: 15px 0px;
padding: 10px 0px;
}

/* typography */
Expand Down
3 changes: 3 additions & 0 deletions app/controllers/static_pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ def home

def about
end

def gallery
end
end
10 changes: 5 additions & 5 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
<div id="phone_number_header">
<div id="phone_icon">
<%= image_tag("phone_blue-phone-256.jpg", alt: "phone") %>
<%= image_tag("phone_icon.png", alt: "phone") %> <!--phone available under creative commons 3.0, https://www.iconfinder.com/icons/81145/mb_phone_icon-->
</div>
<b>630-669-2325</b>
</div>
Expand All @@ -15,15 +15,15 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to("Fox Decorating Co.", root_path, id: "logo", class:"navbar-brand") %>
<%= link_to("Fox Decorating", root_path, id: "logo", class:"navbar-brand") %>
</div>

<div class="collapse navbar-collapse" id="menuContent">
<ul class="nav navbar-nav navbar-right">
<li class="nav-item"><%= link_to("About", '#', class: "nav-link")%></li>
<li class="nav-item"><%= link_to("Services", '#', class: "nav-link")%></li>
<li class="nav-item"><%= link_to("Gallery", '#', class: "nav-link")%></li>
<li class="nav-item"><%= link_to("Contact Us", '#', class: "nav-link anchor")%></li>
<li class="nav-item"><%= link_to("Testimonials", '#', class: "nav-link")%></li>
<li class="nav-item"><%= link_to("About", '#', class: "nav-link")%></li>
<li class="nav-item"><%= link_to("Contact", '#', class: "nav-link anchor")%></li>
</ul><!--nav navbar-nav navbar-right-->
</div><!--collapse navbar-collapse-->
</div>
Expand Down
1 change: 1 addition & 0 deletions app/views/static_pages/gallery.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>StaticPages#gallery</h1>
21 changes: 7 additions & 14 deletions app/views/static_pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="front_page_container" style="margin-top:0px;">
<% if false %>
<div class="company_name">
<h2>Fox Decorating Co.</h2>
<h2>Fox Decorating</h2>
</div>
<% end %>

Expand All @@ -11,11 +11,13 @@

<div class="container_for_background">
<div class="content_container container">

<div class="row">
<div class="about_us_container col-sm-7">
<div class="about_us_container col-sm-7 align-items-center">
<div id="about_us">
<h3>Serving Chicagoland Since 1986</h3>
<% Faker::Lorem.paragraphs(3, false).each do |paragraph| %>
<br/>
<% Faker::Lorem.paragraphs(4, false).each do |paragraph| %>
<%= content_tag(:p, paragraph) %>
<% end %>
</div>
Expand All @@ -25,20 +27,11 @@
<div id="location_and_hours">
<h3>Location</h3>
<div class="location">

<div style='max-width: 100%;'>
<div id="map" style='width: 100%; height: 250px;'></div>
</div>

Serving Downers Grove, Naperville, Lisle, Glen Ellyn, Woodridge, Oak Brook, Burr Ridge, Aurora, and the rest of the Chicagoland area.
<br>
<br>
</div>
<div class="hours">
Hours by appointment
</div>
<div class="phone_number">
Phone: 630-669-2325
Serving Downers Grove, Naperville, Lisle, Glen Ellyn, Woodridge, Oak Brook, Burr Ridge, Aurora, and the
rest of the Chicagoland area.
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Rails.application.routes.draw do
root 'static_pages#home'
get '/about', to: 'static_pages#about'
get '/gallery', to: 'static_pages#gallery'
end

0 comments on commit 6b19300

Please sign in to comment.