Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Affix layout improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvislov committed Mar 14, 2013
1 parent bda4eeb commit d2c9ac9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/custom.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ window.onload = ->
delay 4000, -> $('.alert').fadeOut('slow')

# side bar
affixTop = $("#nav_top").outerHeight() + $("#nav_main").outerHeight() + $("header").outerHeight() + $(".content h1:first").outerHeight()
affixBottom = $(".sponsors").outerHeight() + parseInt($("#main_container").css("padding-bottom"))
affixTop = $("#nav_top").outerHeight() + $("#nav_main").outerHeight() + $("header").outerHeight() + $(".content h1:first").outerHeight() + parseInt($(".content h1:first").css('marginTop')) + parseInt($(".content h1:first").css('marginBottom'))
affixBottom = $(".sponsors").outerHeight() + parseInt($("#main_container").css("padding-bottom"))+ parseInt($(".border").css('marginTop'))
affixHeight = $(".b-affix:first").outerHeight()
docHeight = $(document).height()
bottomLimit = docHeight - affixBottom - affixHeight
Expand Down
5 changes: 3 additions & 2 deletions app/assets/stylesheets/custom/_events.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@

// bootstrap-affix
.b-affix {
width: 190px;
padding-bottom: 20px;
width: inherit;
box-sizing: border-box;
background-color: #f4f4f4 !important;
&.top {
position: fixed;
top: 4px;
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/web/shared/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%p
Copyright © 2012 – 2013
.span9
= render 'layouts/web/shared/social'
=# render 'layouts/web/shared/social'
.clearfix

= javascript_include_tag "application"

0 comments on commit d2c9ac9

Please sign in to comment.