Navigation Menu

Skip to content

Commit

Permalink
fix overlap of title, search box and fix version switch of /index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
harrah committed Oct 16, 2012
1 parent aac4ae8 commit e93d504
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion 0.12.1/docs/_static/docs.css
Expand Up @@ -4,7 +4,7 @@ a { color: #447281; }
a:hover { color: #73a600; text-decoration: none; }
.navbar-logo { visibility: visible; float: left; padding-top: 6px; margin-bottom: 18px;}
.main { position: relative; height: auto; margin-top: -18px; overflow: auto; }
.page-title { position: relative; top: 24px; font-family: 'Exo', sans-serif; font-size: 24px; font-weight: 400; color: rgba(255, 255, 255, 1); text-shadow:0 2px 0 #000000; width: 900px; min-height: 32px; }
.page-title { position: relative; top: 24px; font-family: 'Exo', sans-serif; font-size: 24px; font-weight: 400; color: rgba(255, 255, 255, 1); text-shadow:0 2px 0 #000000; width: 900px; min-height: 32px; z-index: -1; }
.main-container { background: #f2f2eb; min-height: 600px; padding-top: 20px; margin-top: 28px; padding-bottom: 40px; }
.container h1:first-of-type { display: none; visibility: hidden; margin-top: -36px; }
.pdf-link { float: right; height: 40px; margin-bottom: -15px; margin-top: -5px; }
Expand Down
12 changes: 6 additions & 6 deletions 0.12.1/docs/_static/set-versions.js
Expand Up @@ -43,18 +43,18 @@ $(document).ready(function() {
// but if it doesn't exist, go to the index for that version
select.change(function() {
var newV = $(this).val();
var newPath = newV + '/';
var oldLoc = document.location.href;

var changeVersion = function(oldPathname) {
var newPath = newV + '/';
var changed = oldPathname.replace(selected + '/', newPath).replace(snapshotPath, newPath).replace(releasePath, newPath);
// This occurs for unversioned files, specifically /index.html.
// Redirect to the versioned path in this case (won't work when previewing on the local filesytem)
if (changed == oldPathname) changed = newPath + docsPath + changed;
// This occurs for the unversioned /index.html. Redirect to the versioned path in this case.
if (changed == oldPathname)
changed = oldPathname.replace('index.html', newPath + docsPath + 'home.html');
return changed;
};
var home = function(pathname) { return 'index.html'; };
var newVersionIndex = function(pathname) { return newPath + docsPath + 'index.html'; };

gotoIfExists( mapPath(oldLoc, changeVersion), mapPath(oldLoc, home));
gotoIfExists( mapPath(oldLoc, changeVersion), mapPath(oldLoc, newVersionIndex) );
});
});
2 changes: 1 addition & 1 deletion 0.13.0-SNAPSHOT/docs/_static/docs.css
Expand Up @@ -4,7 +4,7 @@ a { color: #447281; }
a:hover { color: #73a600; text-decoration: none; }
.navbar-logo { visibility: visible; float: left; padding-top: 6px; margin-bottom: 18px;}
.main { position: relative; height: auto; margin-top: -18px; overflow: auto; }
.page-title { position: relative; top: 24px; font-family: 'Exo', sans-serif; font-size: 24px; font-weight: 400; color: rgba(255, 255, 255, 1); text-shadow:0 2px 0 #000000; width: 900px; min-height: 32px; }
.page-title { position: relative; top: 24px; font-family: 'Exo', sans-serif; font-size: 24px; font-weight: 400; color: rgba(255, 255, 255, 1); text-shadow:0 2px 0 #000000; width: 900px; min-height: 32px; z-index: -1; }
.main-container { background: #f2f2eb; min-height: 600px; padding-top: 20px; margin-top: 28px; padding-bottom: 40px; }
.container h1:first-of-type { display: none; visibility: hidden; margin-top: -36px; }
.pdf-link { float: right; height: 40px; margin-bottom: -15px; margin-top: -5px; }
Expand Down
12 changes: 6 additions & 6 deletions 0.13.0-SNAPSHOT/docs/_static/set-versions.js
Expand Up @@ -43,18 +43,18 @@ $(document).ready(function() {
// but if it doesn't exist, go to the index for that version
select.change(function() {
var newV = $(this).val();
var newPath = newV + '/';
var oldLoc = document.location.href;

var changeVersion = function(oldPathname) {
var newPath = newV + '/';
var changed = oldPathname.replace(selected + '/', newPath).replace(snapshotPath, newPath).replace(releasePath, newPath);
// This occurs for unversioned files, specifically /index.html.
// Redirect to the versioned path in this case (won't work when previewing on the local filesytem)
if (changed == oldPathname) changed = newPath + docsPath + changed;
// This occurs for the unversioned /index.html. Redirect to the versioned path in this case.
if (changed == oldPathname)
changed = oldPathname.replace('index.html', newPath + docsPath + 'home.html');
return changed;
};
var home = function(pathname) { return 'index.html'; };
var newVersionIndex = function(pathname) { return newPath + docsPath + 'index.html'; };

gotoIfExists( mapPath(oldLoc, changeVersion), mapPath(oldLoc, home));
gotoIfExists( mapPath(oldLoc, changeVersion), mapPath(oldLoc, newVersionIndex) );
});
});
1 change: 1 addition & 0 deletions 0.7.7/docs/home.html

0 comments on commit e93d504

Please sign in to comment.