Skip to content

Commit

Permalink
Fix nav position on pages that don't use jquery.twoup
Browse files Browse the repository at this point in the history
  • Loading branch information
bloopletech committed Feb 15, 2013
1 parent 13f7828 commit 0df6b45
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 22 deletions.
7 changes: 2 additions & 5 deletions app/views/layouts/application.html.haml
@@ -1,11 +1,8 @@
!!! 5
%html.main{ :xmlns => "", :id => "#{@page_id || "#{controller.controller_name}-#{controller.action_name}"}" }
%html.main{ :xmlns => "", :id => "#{@page_id || "#{controller.controller_name}-#{controller.action_name}"}", "class" => @page_style }
%head
= render :partial => 'layouts/header'
- if @page_style == "manipulate"
= include_stylesheets :manipulate, :media => "all"
- else
= include_javascripts :application
= include_javascripts :application
%body
#wrapper
- if flash[:success]
Expand Down
12 changes: 7 additions & 5 deletions public/javascripts/application.js
@@ -1,9 +1,11 @@
$(function() {
$("#wrapper").twoup("1px solid silver");
$(window).resize(function() {
$.twoup.content.css("position", "relative");
$("#nav-wrapper").css("left", ($.twoup.column_width() - $("#nav-wrapper").width()) + "px");
}).resize();
if(!$("html").hasClass("manipulate")) {
$("#wrapper").twoup("1px solid silver");
$(window).resize(function() {
$.twoup.content.css("position", "relative");
$("#nav-wrapper").css("left", ($.twoup.column_width() - $("#nav-wrapper").width()) + "px");
}).resize();
}

/*setTimeout(function() {
scrollTo(200, 0);
Expand Down
12 changes: 0 additions & 12 deletions public/stylesheets/manipulate.css

This file was deleted.

5 changes: 5 additions & 0 deletions public/stylesheets/style.css
Expand Up @@ -47,6 +47,11 @@ h3 { font-size: 18px; margin-bottom: 0.6em; text-align: left; font-weight: bold;
z-index: 1000;
}

html.manipulate #nav-wrapper {
right: 20px;
top: 20px;
}

#nav-wrapper:hover > #nav { display: block; }

#nav {
Expand Down

0 comments on commit 0df6b45

Please sign in to comment.