Skip to content

Commit

Permalink
add sticky footer
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheldon committed Jul 3, 2014
1 parent cd38a16 commit feb2e25
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ gem 'thin'
gem 'pg'

gem 'haml-rails'
gem 'redcarpet'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'bourbon', '~> 3.2.3'
gem 'bootstrap-sass'
gem 'font-awesome-rails'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
Expand Down
7 changes: 6 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ GEM
faker (1.3.0)
i18n (~> 0.5)
ffi (1.9.3)
font-awesome-rails (4.1.0.0)
railties (>= 3.2, < 5.0)
formatador (0.2.5)
guard (2.6.1)
formatador (>= 0.2.4)
Expand Down Expand Up @@ -147,7 +149,7 @@ GEM
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.0)
minitest (5.3.4)
minitest (5.3.5)
multi_json (1.10.1)
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
Expand Down Expand Up @@ -205,6 +207,7 @@ GEM
ffi (>= 0.5.0)
rdoc (4.1.1)
json (~> 1.4)
redcarpet (3.1.2)
request_store (1.0.6)
rest-client (1.6.7)
mime-types (>= 1.16)
Expand Down Expand Up @@ -308,6 +311,7 @@ DEPENDENCIES
draper!
factory_girl_rails
faker
font-awesome-rails
guard-livereload
guard-rspec
guard-rubocop
Expand All @@ -324,6 +328,7 @@ DEPENDENCIES
rails_12factor
rails_layout
rb-fsevent
redcarpet
rspec-rails (~> 3.0.0)
sass-rails (~> 4.0.0)
sdoc
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/application.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

// Vendors
@import 'bootstrap'
@import 'font-awesome'

// Sections
@import 'sections/base'
@import 'sections/search'
@import 'sections/navigation'
@import 'sections/footer'
29 changes: 29 additions & 0 deletions app/assets/stylesheets/sections/_footer.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
$footer-height: 120px

html,
body
height: 100%

@media (min-width: $screen-sm)
#wrap
height: auto
margin-bottom: -$footer-height
min-height: 100%
padding-bottom: $footer-height + 20px

#footer
height: $footer-height
width: 100%

#footer
background-color: #f8f8f8
border-top: 1px solid #e7e7e7
color: #777777
margin-top: 30px
padding: 30px 0

h1
font-size: 18px

a
font-weight: bold
4 changes: 2 additions & 2 deletions app/assets/stylesheets/sections/_navigation.sass
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ nav.top-bar

.navbar
form[role=search]
@media (min-width: $screen-sm)
padding-right: 0
@media (max-width: $screen-sm)
border: none
display: block
margin: -52px -15px 0 45px
padding-bottom: 0
@media (min-width: $screen-sm)
padding-right: 0
20 changes: 20 additions & 0 deletions app/views/layouts/_footer.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.container
.row
.col-sm-6
:markdown
**Panlexicon** is a unique thesaurus that provides a quicker
and more intuitive process for finding the words you want.
.col-sm-6
%ul
%li
Follow our <strong>Word of the Day</strong> on&nbsp;
%a.twitter-link{ href: 'http://twitter.com/panlexicon' }<>
= fa_icon 'twitter-square'
Twitter
\.
%li
Send us an <strong>Email</strong> at&nbsp
%a.twitter-link{ href: 'mailto:info@panlexicon.com' }<>
= fa_icon 'child'
info@panlexicon.com
\.
15 changes: 9 additions & 6 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
= csrf_meta_tags
= render 'shared/google_analytics'
%body
%header
= render 'layouts/navigation'
%main{:role => "main"}
.container
= render 'layouts/messages'
= yield
#wrap
%header
= render 'layouts/navigation'
.main{:role => "main"}
.container
= render 'layouts/messages'
= yield
%footer#footer
= render 'layouts/footer'

0 comments on commit feb2e25

Please sign in to comment.