From 8ca17d31d0e65776f9d9235dacfb5c0a1baefab0 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Wed, 24 Aug 2011 23:31:00 -0700 Subject: [PATCH 1/2] docs: 'guide' and 'api' top navbar entries; some fixes for header styling --- docs/branding/footer.html.in | 24 ++++++++++++++++++++++- docs/branding/header.html.in | 24 ++++++++++++++++++++--- docs/branding/media/css/style.css | 32 +++++++++++++++++-------------- 3 files changed, 62 insertions(+), 18 deletions(-) diff --git a/docs/branding/footer.html.in b/docs/branding/footer.html.in index 93c1ae4..b27cba9 100644 --- a/docs/branding/footer.html.in +++ b/docs/branding/footer.html.in @@ -7,7 +7,7 @@ $(function () { $("#toc").click(function(event) { // This to ensure clicks in the #toc don't make it up to the - // `closeTocOnBodyClick` handler. + // button handler. event.stopPropagation(); }); $("#toc a").click(function(event) { @@ -26,6 +26,28 @@ $(function () { target.slideToggle(100); event.stopPropagation(); }); + + $("#api").click(function(event) { + // This to ensure clicks in the #api don't make it up to the + // button handler. + event.stopPropagation(); + }); + $("#api a").click(function(event) { + $("#apibutton").click(); + }) + $("#apibutton").click(function() { + var target = $("#api"); + if (target.css("display") !== "block") { + $("body").bind("click.apiCloser", function(event) { + $("#apibutton").click(); + event.stopPropagation(); + }); + } else { + $("body").unbind("click.apiCloser"); + } + target.slideToggle(100); + event.stopPropagation(); + }); }); diff --git a/docs/branding/header.html.in b/docs/branding/header.html.in index db9ab8c..b1bc535 100644 --- a/docs/branding/header.html.in +++ b/docs/branding/header.html.in @@ -24,14 +24,32 @@