|
35 | 35 | <a class="fork" href="http://github.com/opdemand/deis"><img src="{{ pathto('_static/img/fork.png', 1) }}" alt="GitHub Fork Button"></a> |
36 | 36 | <div class="container"> |
37 | 37 | <div class="row"> |
38 | | - <div class="span3 hoop"> |
| 38 | + <div class="span3 hoop menu"> |
39 | 39 | <div class="nav-border top-spacing"> |
40 | 40 | <ul class="nav nav-list menu"> |
41 | 41 | <li><a href="/"><img class="logo" src="{{ pathto('_static/img/menu-logo.png', 1) }}" alt="deis logo"></a></li> |
|
67 | 67 | </div> |
68 | 68 | </div> |
69 | 69 |
|
70 | | - <div class="span6 hoop"> |
| 70 | + <div class="span6 hoop contents"> |
71 | 71 | <div class="doc-content">{% block body %}{% endblock %}</div> |
72 | 72 | </div> |
73 | 73 |
|
|
109 | 109 | </script> |
110 | 110 |
|
111 | 111 | <script> |
112 | | - $(function(){ |
113 | | - boxes = $('.hoop'); |
114 | | - maxHeight = Math.max.apply( |
115 | | - Math, boxes.map(function() { |
116 | | - return $(this).height(); |
117 | | - }).get()); |
118 | | - if (maxHeight < 923) { |
119 | | - boxes.height(923); |
120 | | - } else { |
121 | | - boxes.height(maxHeight); |
122 | | - } |
| 112 | + $(document).ready(function() { |
| 113 | + var maxHeight = -1; |
| 114 | + |
| 115 | + //find the tallest column |
| 116 | + $('.hoop').each(function() { |
| 117 | + if (maxHeight > $(this).height()) { |
| 118 | + |
| 119 | + } else { |
| 120 | + maxHeight = $(this).height(); |
| 121 | + tallest = $(this); |
| 122 | + } |
| 123 | + }); |
| 124 | + |
| 125 | + //Find the margin of the tallest item. If none, set to 0 |
| 126 | + var tallestMargin = parseInt(tallest.css('margin-top')); |
| 127 | + if(tallestMargin < 1 || isNaN(tallestMargin)) {tallestMargin = 0;} |
123 | 128 |
|
| 129 | + //Set the height of each of the columns |
| 130 | + $('.hoop').each(function() { |
| 131 | + if(maxHeight < 923) { |
| 132 | + $(this).height(923 + tallestMargin); |
| 133 | + } else { |
| 134 | + $(this).height(maxHeight + tallestMargin); |
| 135 | + } |
| 136 | + }); |
124 | 137 |
|
| 138 | + //remove the margin from the tallest column if it exists |
| 139 | + tallest.height(maxHeight - tallestMargin); |
| 140 | + |
| 141 | + //Set the margin above the social buttons in the left-hand menu |
125 | 142 | if (maxHeight > 800) { |
126 | | - newMargin = maxHeight - 451 - 133 - 30; |
| 143 | + newMargin = maxHeight - 451 - 133 - 30 + tallestMargin; |
127 | 144 | $('.social-menu').css({'margin-top': newMargin}) |
128 | 145 | } else { |
129 | | - $('.social-menu').css({'margin-top': 271}) |
| 146 | + $('.social-menu').css({'margin-top': 309}) |
130 | 147 | } |
131 | 148 | }); |
132 | 149 | </script> |
|
0 commit comments