Skip to content

Commit e48b264

Browse files
committed
Updated jQuery page height detection. Updated styling: added rollover functionality. #29
1 parent 3a48716 commit e48b264

14 files changed

Lines changed: 128 additions & 138 deletions

docs/theme/deis/layout.html

Lines changed: 8 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
3333
<![endif]-->
3434

35-
<a class="fork" href="http://github.com/opdemand/deis"><img src="{{ pathto('_static/img/fork.png', 1) }}" alt="GitHub Fork Button"></a>
35+
<a class="fork" href="http://github.com/opdemand/deis"><div class="forkImage"></div></a>
3636
<div class="container">
3737
<div class="row">
38-
<div class="span3 hoop menu">
38+
<div class="span3 column_calc menu">
3939
<div class="nav-border top-spacing">
4040
<ul class="nav nav-list menu">
4141
<li><a href="/"><img class="logo" src="{{ pathto('_static/img/menu-logo.png', 1) }}" alt="deis logo"></a></li>
@@ -61,18 +61,19 @@
6161
</div>
6262

6363
<div class="byline-menu">
64-
<a href="" ><span class="cloud-logo"></span></a>
64+
<span class="cloud-logo"></span>
6565
<p>Deis is a project by<br>OpDemand</p>
6666
</div>
6767
</div>
6868
</div>
6969

70-
<div class="span6 hoop contents">
70+
<div class="span6 column_calc contents">
7171
<div class="doc-content">{% block body %}{% endblock %}</div>
7272
</div>
7373

7474

75-
<div class="span2 offset1 docs-sidebar hoop">
75+
<div class="span2 offset1 docs-sidebar column_calc">
76+
<div class="docs-border"></div>
7677
{{ toctree(collapse=False, maxdepth=3) }}
7778
</div>
7879

@@ -106,138 +107,8 @@
106107
ga('send', 'pageview');
107108

108109
</script>
109-
110-
<script>
111-
$(document).ready(function() {
112-
var maxHeight = -1;
113-
114-
//find the tallest column
115-
$('.hoop').each(function() {
116-
if (maxHeight < $(this).height()) {
117-
maxHeight = $(this).height();
118-
tallest = $(this);
119-
}
120-
});
121-
122-
//Find the margin of the tallest item. If none, set to 0
123-
var tallestMargin = parseInt(tallest.css('margin-top'));
124-
if(tallestMargin < 1 || isNaN(tallestMargin)) {tallestMargin = 0;}
125-
126-
//Set the height of each of the columns
127-
$('.hoop').each(function() {
128-
if(maxHeight < 923) {
129-
maxHeight = 923;
130-
$(this).height(maxHeight + tallestMargin);
131-
} else {
132-
$(this).height(maxHeight + tallestMargin);
133-
}
134-
});
135-
136-
//Remove margin from height on Docs Sidebar
137-
$('.docs-sidebar').height(maxHeight - 145);
138-
139-
//remove the margin from the tallest column if it exists
140-
//tallest.height(maxHeight - tallestMargin);
141-
142-
//Set the margin above the social buttons in the left-hand menu
143-
if (maxHeight > 800) {
144-
newMargin = maxHeight - 451 - 133 - 30 + tallestMargin;
145-
$('.social-menu').css({'margin-top': newMargin})
146-
} else {
147-
$('.social-menu').css({'margin-top': 309})
148-
}
149-
150-
//Remove <ul> from Releases
151-
$('.toctree-l1 > a').each(function(){
152-
if($(this).html() == "Releases") {
153-
console.log($(this).html());
154-
}
155-
});
156-
157-
//Check URL
158-
var path = window.location.href;
159-
var pathName = path.split('/');
160-
var num = pathName.length - 3;
161-
var gettingstarted, terms, client, server, contributing;
162-
163-
switch(pathName[num]) {
164-
case 'gettingstarted':
165-
//case at Getting Started
166-
$('.toctree-l1 > a').each(function(){
167-
if($(this).html() == "Getting Started") {
168-
$(this).parent().attr('state', 'open');
169-
$(this).attr('state', 'open');
170-
}
171-
});
172-
break;
173-
case 'terms':
174-
//case at Terms
175-
$('.toctree-l1 > a').each(function(){
176-
if($(this).html() == "Terms") {
177-
$(this).parent().attr('state', 'open');
178-
$(this).attr('state', 'open');
179-
}
180-
});
181-
break;
182-
case 'client':
183-
//case at Client Reference
184-
$('.toctree-l1 > a').each(function(){
185-
if($(this).html() == "Client Reference") {
186-
$(this).parent().attr('state', 'open');
187-
$(this).attr('state', 'open');
188-
}
189-
});
190-
break;
191-
case 'server':
192-
//case at Server Reference
193-
$('.toctree-l1 > a').each(function(){
194-
if($(this).html() == "Server Reference") {
195-
$(this).parent().attr('state', 'open');
196-
$(this).attr('state', 'open');
197-
}
198-
});
199-
break;
200-
case 'contributing':
201-
//case at Contributing
202-
$('.toctree-l1 > a').each(function(){
203-
if($(this).html() == "Contributing") {
204-
$(this).parent().attr('state', 'open');
205-
$(this).attr('state', 'open');
206-
}
207-
});
208-
break;
209-
case 'releases':
210-
//code this out when releases gets filled out
211-
break;
212-
default:
213-
214-
}
215-
216-
//Doc Sidebar: Create accordion
217-
var allPanels = $('.toctree-l1 > ul');
218-
allPanels.hide();
219-
220-
$('.toctree-l1 > a').each(function(){
221-
if($(this).parent().attr('state') == 'open') {
222-
$(this).attr('state', 'open');
223-
$(this).next().show();
224-
}
225-
});
226-
227-
$('.toctree-l1 > a:first-child').click(function() {
228-
if($(this).siblings().size() > 0 && $(this).attr('state') != 'open') {
229-
allPanels.slideUp();
230-
$(this).next().slideDown();
231-
$('.toctree-l1 > a').attr('state', 'closed');
232-
$(this).attr('state', 'open');
233-
return false;
234-
}
235-
if ($(this).attr('state') == 'open') {
236-
return false;
237-
}
238-
});
239-
});
240-
</script>
110+
<script src="{{ pathto('_static/js/checkURL.js', 1) }}"></script>
111+
<script src="{{ pathto('_static/js/adjustments.js', 1) }}"></script>
241112

242113

243114
</body>

web/static/css/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/static/img/404.png

5.05 KB
Loading

web/static/img/aws-ec2.png

14.1 KB
Loading

web/static/img/blog-social.png

3.03 KB
Loading

web/static/img/cover-image.png

22.5 KB
Loading

web/static/img/favicon.png

324 Bytes
Loading

web/static/img/fork.png

-128 Bytes
Loading
-8.57 KB
Binary file not shown.
-12.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)