From c55ac235c1d52ebb8c7f3dbc73ef8e29fbeb521d Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 6 Aug 2012 16:55:46 -0400 Subject: [PATCH 1/7] implement Google Custom Search and make page header/style consistent with main site. --- themes/mongodb/layout.html | 87 ++++++- themes/mongodb/pagenav.html | 3 +- themes/mongodb/static/mongodb-docs.css_t | 311 +++++++++++++++++++++++ 3 files changed, 392 insertions(+), 9 deletions(-) diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index cdbe66400a3..e28187a5fb6 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -6,11 +6,9 @@ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. -#} -{%- block doctype -%} +#}{%- block doctype -%} - {%- endblock %} {%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} {%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} @@ -115,12 +113,54 @@

{{ _('Navigation') }}

{%- endfor %} {%- endmacro %} +{%- macro homenav() %} +
+ +
+{%- endmacro %} + +{%- macro trymongo() %} + +{%- endmacro %} + {%- block htmltitle %} {{ title|striptags|e }}{{ titlesuffix }} {%- endblock %} - + + @@ -168,15 +208,45 @@

{{ _('Navigation') }}

{%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} +{%- block sitesearch %} + +{%- endblock %} -{%- block header %}{% endblock %} - -{%- block relbar1 %}{{ relbar() }}{% endblock %} +{%- block header %} +
+ +
+
+
+
+ +
+
+{%- block relbar1 %}{{ relbar(false) }}{% endblock %} +{%- endblock %} {%- block content %} {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} -
{%- block document %}
@@ -184,6 +254,7 @@

{{ _('Navigation') }}

{%- endif %}
+
{% block body %} {% endblock %}
{%- if render_sidebar %} diff --git a/themes/mongodb/pagenav.html b/themes/mongodb/pagenav.html index 8a26dd14bc0..3b1f8cfdfc7 100644 --- a/themes/mongodb/pagenav.html +++ b/themes/mongodb/pagenav.html @@ -16,6 +16,7 @@

{{ _('Manual') }}

  • Contents: {{ project|e }} Manual Contents
  • Index: {{ project|e }} Manual Index
  • +{% macro searchbox() %} - +{% endmacro %}

    {{ _('Formats') }}

      {%- if show_source and has_source and sourcename %} diff --git a/themes/mongodb/static/mongodb-docs.css_t b/themes/mongodb/static/mongodb-docs.css_t index efce136a259..23c5e5e340d 100644 --- a/themes/mongodb/static/mongodb-docs.css_t +++ b/themes/mongodb/static/mongodb-docs.css_t @@ -65,6 +65,7 @@ div.footer a { div.related { background-color: #402817; margin-bottom: 10px; + margin-top: 10px; color: #fff; font-size: 0.9em; @@ -298,3 +299,313 @@ p.first { margin-bottom: 0px !important; margin-top: 10px !important; } + +/* header-db */ +div.spread { + margin: 0 auto; + width: 100%; + min-width: 975px; +} + +div.split { + width: 950px; + margin: 0 auto; + text-align: left; +} + +#header-db { + height: 126px; + background-color: #402817; + background-image: url(http://media.mongodb.org/back-header.png); + background-repeat: no-repeat; + background-position: top center; +} + +#header-db div#logo { + margin-left: -4px; + padding-top: 20px; +} + +#breadcrumbsback { + padding: 1em 0 .8em 0; + background-color: #f6f4cd; +} + +#breadcrumbsback div.split { + overflow: hidden; +} + +ol#breadcrumbs { + margin-left: -14px; +} + +#breadcrumbs li { + background:transparent url(http://media.mongodb.org/icon-breadcrumbs.png) no-repeat auto 1px center; + display:inline; + float:left; + line-height:1.8em; + margin:0 0.33em 0 0; + padding-left:15px; + white-space:nowrap; + line-height: 1.4em; +} + +#breadcrumbs { + color:#158f35; +} + +#main-db { + padding-top: 2.5em; + padding-bottom: 2em; + background-image: url(http://media.mongodb.org/back-body.png); + background-repeat: repeat-x; +} + +div#top-right { + position: absolute; + top: -3px; + right: 10px; + *z-index: 10; +} + +div#top-right ul#header-menu-bar { + margin-top: 0; + padding-left: 20px; + height: 38px; + background-image: url(http://media.mongodb.org/trans-user-left.png); + background-repeat: no-repeat; +} + +div#top-right div.user-right { + float: right; + height: 38px; + min-width: 186px; + margin: 0; + padding: 0 20px 0 0; + font-size: 85%; + background-image: url(http://media.mongodb.org/trans-user-right.png); + background-position: top right; + background-repeat: no-repeat; +} + +div#top-right div.user-right li.normal { + float: left; + padding: 8px 1em 0 0; + height: 38px; + background-image: url(http://media.mongodb.org/trans-user-back.png); + background-repeat: repeat-x; + list-style-type: none; + font-size: 93%; + color: #c48c55; +} + +div#top-right div.user-right a, div#top-right div.user-right a:visited { + border-right: 1px solid #663f12; + padding-right: 1em; + color: #aa814d; + font-weight: normal; +} + +div#top-right div.user-right li.last, div#top-right div.user-right a.last, div#top-right div.user-right a.last:visited { + padding-right: 0; + border-right: none; +} + +.quick-search { + margin: 0; + padding: 0; +} +#quick-search input { + float: right; +} +.quick-search input { + border: none; + margin: 0; + padding: 0; +} +input.blank-search, +.quick-search .placeholded { + color: #666; +} +input.blur { + color: #666; +} +input[type="text"]:disabled { + color: #333; +} +#quick-search-query { + width: 13em; +} + +div.search-db { + position: absolute; + top: 54px; + right: 8px; + width: 246px; + height: 31px; + background-image: url(http://media.mongodb.org/back-search-input.png); + background-repeat: no-repeat; + *z-index: 1; +} + +input#quick-search-query { + -webkit-appearance:none; + background-color: transparent !important; + position: relative; + top: 7px; + width: 230px; + border: none; + font-size: 73%; + color: #dbcaaf; +} + +input#quick-search-query:active { + border:none !important; +} + +#quick-search .placeholded { + color: #dbcaaf; +} + +input.blur { + color: #666; +} +input[type="text"]:disabled { + color: #333; +} +#quick-search-query { + width: 13em; +} + +div.search-db { + position: absolute; + top: 54px; + right: 8px; + width: 246px; + height: 31px; + background-image: url(http://media.mongodb.org/back-search-input.png); + background-repeat: no-repeat; + *z-index: 1; +} + +input#quick-search-query { + -webkit-appearance:none; + background-color: transparent !important; + position: relative; + top: 7px; + width: 230px; + border: none; + font-size: 73%; + color: #dbcaaf; +} + +input#quick-search-query:active { + border:none !important; +} + +#quick-search .placeholded { + color: #dbcaaf; +} + +#home-nav { + padding: 0; + background-color: #f6f4cd; +} + +#home-nav a:active, #home-nav a:focus { + outline: none; +} + +div.split ul.home-nav { + margin: 0; + height: 62px; + padding: 15px 0 4px 0; + width: 980px; +} + +div.split ul.home-nav li { + float: left; + margin: 0; + padding: 0; + list-style-type: none; + list-style-image: none; +} + +ul.home-nav li.docs { + width: 276px; +} + +ul.home-nav li.docs a, ul.home-nav li.docs a:visited { + float: left; + background: url(http://www.mongodb.org/static/images/home_nav.png) -11px -63px; + width: 209px; + height: 54px; +} + +ul.home-nav li.docs a:hover { + float: left; + background: url(http://www.mongodb.org/static/images/home_nav.png) -11px 0; + width: 209px; + height: 54px; +} + +ul.home-nav li.try { + width: 238px; +} + +ul.home-nav li.try a, ul.home-nav li.try a:visited { + float: left; + background: url(http://www.mongodb.org/static/images/home_nav.png) -274px -63px; + width: 176px; + height: 54px; +} + +ul.home-nav li.try a:hover { + float: left; + background: url(http://www.mongodb.org/static/images/home_nav.png) -274px 0; + width: 176px; + height: 54px; +} + +ul.home-nav li.downloads { + width: 245px; +} + +ul.home-nav li.downloads a, ul.home-nav li.downloads a:visited { + float: left; + background: url(http://www.mongodb.org/static/images/home_nav.png) -497px -63px; + width: 185px; + height: 54px; +} + +ul.home-nav li.downloads a:hover { + float: left; + background: url(http://www.mongodb.org/static/images/home_nav.png) -497px 0; + width: 185px; + height: 54px; +} + +ul.home-nav li.drivers { + width: 192px; +} + +ul.home-nav li.drivers a, ul.home-nav li.drivers a:visited { + float: left; + background: url(http://www.mongodb.org/static/images/home_nav.png) right -63px no-repeat; + width: 194px; + height: 54px; +} + +ul.home-nav li.drivers a:hover { + float: left; + background: url(http://www.mongodb.org/static/images/home_nav.png) right 0 no-repeat; + width: 194px; + height: 54px; +} + +ul.home-nav li .hidden {visibility:hidden;} +div#docs-header {width:950px;} +div#main-db.hidden {display:none;} +div#header-db {background-repeat: repeat-x;} +div#header-db div.split {float:left;} +div.gsc-control-cse-en, div.gsc-control-cse {padding:0!important;} From 1f965f548c3c32112d31484265725a40062b0fe4 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 6 Aug 2012 17:35:24 -0400 Subject: [PATCH 2/7] Cleanup changes for google cse, smaller logo, tighten header spacing --- themes/mongodb/layout.html | 5 +-- themes/mongodb/static/mongodb-docs.css_t | 42 ++++-------------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index e28187a5fb6..0d19a77505b 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -234,11 +234,12 @@

      {{ _('Navigation') }}

    -
    + +
    diff --git a/themes/mongodb/static/mongodb-docs.css_t b/themes/mongodb/static/mongodb-docs.css_t index 23c5e5e340d..a764a5fd9e3 100644 --- a/themes/mongodb/static/mongodb-docs.css_t +++ b/themes/mongodb/static/mongodb-docs.css_t @@ -64,8 +64,8 @@ div.footer a { div.related { background-color: #402817; - margin-bottom: 10px; - margin-top: 10px; + margin-bottom: 0.9em; + margin-top: 0.9em; color: #fff; font-size: 0.9em; @@ -314,7 +314,7 @@ div.split { } #header-db { - height: 126px; + height: 85px; background-color: #402817; background-image: url(http://media.mongodb.org/back-header.png); background-repeat: no-repeat; @@ -322,7 +322,7 @@ div.split { } #header-db div#logo { - margin-left: -4px; + margin-left: 6px; padding-top: 20px; } @@ -443,7 +443,7 @@ div.search-db { right: 8px; width: 246px; height: 31px; - background-image: url(http://media.mongodb.org/back-search-input.png); +# background-image: url(http://media.mongodb.org/back-search-input.png); background-repeat: no-repeat; *z-index: 1; } @@ -477,36 +477,6 @@ input[type="text"]:disabled { width: 13em; } -div.search-db { - position: absolute; - top: 54px; - right: 8px; - width: 246px; - height: 31px; - background-image: url(http://media.mongodb.org/back-search-input.png); - background-repeat: no-repeat; - *z-index: 1; -} - -input#quick-search-query { - -webkit-appearance:none; - background-color: transparent !important; - position: relative; - top: 7px; - width: 230px; - border: none; - font-size: 73%; - color: #dbcaaf; -} - -input#quick-search-query:active { - border:none !important; -} - -#quick-search .placeholded { - color: #dbcaaf; -} - #home-nav { padding: 0; background-color: #f6f4cd; @@ -608,4 +578,4 @@ div#docs-header {width:950px;} div#main-db.hidden {display:none;} div#header-db {background-repeat: repeat-x;} div#header-db div.split {float:left;} -div.gsc-control-cse-en, div.gsc-control-cse {padding:0!important;} +div.gsc-control-cse-en, div.gsc-control-cse {padding:0!important;} \ No newline at end of file From fd2e0813ec3962678e6342c364d5efe6e5002fc3 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Wed, 8 Aug 2012 09:56:36 -0400 Subject: [PATCH 3/7] Updated with latest Google CSE --- themes/mongodb/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index 0d19a77505b..7d1d2898c6b 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -211,7 +211,7 @@

    {{ _('Navigation') }}

    {%- block sitesearch %}