From b6622392c19370368f1bbaf24f345bfdd9a479f0 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Fri, 19 Oct 2012 12:55:51 -0400 Subject: [PATCH 1/4] remove blank lines, spaces, add G+ profile, refactor javascript --- themes/mongodb/layout.html | 244 ++++++++++++++----------------------- 1 file changed, 91 insertions(+), 153 deletions(-) diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index d208a2075d1..942dd64eb41 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -1,4 +1,4 @@ -{# +{#- basic/layout.html ~~~~~~~~~~~~~~~~~ @@ -6,7 +6,7 @@ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. -#}{%- block doctype -%} +-#}{%- block doctype -%} {%- endblock %} @@ -22,17 +22,13 @@ {%- else %} {%- set titlesuffix = "" %} {%- endif %} - {%- macro githublink() -%} -Edit this Page +Edit this Page {%- endmacro -%} - {%- macro jiralink() -%} https://jira.mongodb.org/secure/CreateIssueDetails!init.jspa?pid=10380&issuetype=4&priority=4&summary=Comment+on%3a+%22{{ pagename | escape }}%2Etxt%22 {%- endmacro -%} - {%- macro relbar(show_logo=True) %} - {%- endmacro %} - {%- macro sidebar() %} {%- if render_sidebar %}
@@ -84,7 +79,6 @@
{%- endif %} {%- endmacro %} - {%- macro script() %} {%- for scriptfile in script_files %} - + {%- endfor %} {%- endmacro %} - {%- macro css() %} - - + + {%- for cssfile in css_files %} - + {%- endfor %} -{%- endmacro %} - -{%- macro homenav() %} -
- -
-{%- endmacro %} - -{%- macro trymongo() %} - -{%- endmacro %} - +{%- endmacro -%} - - {%- block htmltitle %} - {{ title|striptags|e }}{{ titlesuffix }} - {%- endblock %} - - - - - - {%- if pagename == 'index' %} - - {%- else %} - - {%- endif %} - + +{%- block htmltitle %} +{{ title|striptags|e }}{{ titlesuffix }} +{%- endblock %} + + + + +{%- if pagename == 'index' %} + +{%- else %} + +{%- endif -%} {{ metatags }} {{ css() }} {%- if not embedded %} @@ -174,36 +123,36 @@ {%- endblock -%} {%- if favicon %} - + {%- endif %} {%- endif %} {%- block linktags %} {%- if hasdoc('about') %} - + {%- endif %} {%- if hasdoc('genindex') %} - + {%- endif %} {%- if hasdoc('search') %} - + {%- endif %} {%- if hasdoc('copyright') %} - + {%- endif %} - + + {%- if parents %} - + {%- endif %} {%- if next %} - + {%- endif %} {%- if prev %} - + {%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} {%- block sitesearch %} - {%- endblock %} - - + + {%- block header %}
- +
-
- -
+
+ +
{%- endblock %} {%- block content %} - {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} -
- {%- block document %} -
- {%- if render_sidebar %} -
- {%- endif %} -
+{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} +
+{%- block document %} +
+{%- if render_sidebar %} +
+{%- endif %} +
- {% block body %} {% endblock %} -
- {%- if render_sidebar %} -
- {%- endif %} -
- {%- endblock %} - - {%- block sidebar2 %}{{ sidebar() }}{% endblock %} -
-
+{% block body %} {% endblock %} +
+{%- if render_sidebar %} +
+{%- endif %} +
+{%- endblock %} +{%- block sidebar2 %}{{ sidebar() }}{% endblock %} +
+
{%- endblock %} - {%- block footer %} - + +{%- endblock %} +{%- block marketosrc %} + {%- endblock %} - -{%- block analytics %} -{%- endblock %} +{%- endblock -%} {%- block marketo %} - - -{%- endblock %} +try { mktoMunchkin("017-HGS-593"); } catch(e) {} +{% endblock -%} {%- block jiracollector -%} - -{%- endblock %} \ No newline at end of file From e6d95e41c199c4542b4f37e2e24754059181c6fd Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Fri, 19 Oct 2012 12:57:38 -0400 Subject: [PATCH 2/4] minor blanks thing --- themes/mongodb/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index 942dd64eb41..ac33b76dc7d 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -93,7 +93,7 @@ {%- endfor %} {%- endmacro %} -{%- macro css() %} +{%- macro css() -%} {%- for cssfile in css_files %} @@ -106,7 +106,7 @@ {{ title|striptags|e }}{{ titlesuffix }} {%- endblock %} - + {%- if pagename == 'index' %} From ff293e79db735a6348afde031ac04e3529f24010 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 22 Oct 2012 17:07:47 -0400 Subject: [PATCH 3/4] Tweaks to clean up html template, remove blank lines in places --- themes/mongodb/layout.html | 12 ++---------- themes/mongodb/page.html | 13 +++++++++++++ themes/mongodb/theme.conf | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 themes/mongodb/page.html diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index ac33b76dc7d..a0453af8cd9 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -1,12 +1,4 @@ -{#- - basic/layout.html - ~~~~~~~~~~~~~~~~~ - - Master layout template for Sphinx themes. - - :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. --#}{%- block doctype -%} +{%- block doctype -%} {%- endblock %} @@ -268,4 +260,4 @@ {%- endblock -%} - \ No newline at end of file + diff --git a/themes/mongodb/page.html b/themes/mongodb/page.html new file mode 100644 index 00000000000..9b2f00da818 --- /dev/null +++ b/themes/mongodb/page.html @@ -0,0 +1,13 @@ +{# + basic/page.html + ~~~~~~~~~~~~~~~ + + Master template for simple pages. + + :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- extends "layout.html" -%} +{% block body %} + {{ body }} +{% endblock %} diff --git a/themes/mongodb/theme.conf b/themes/mongodb/theme.conf index 0a731109d0d..59eaa9dd8fd 100644 --- a/themes/mongodb/theme.conf +++ b/themes/mongodb/theme.conf @@ -7,4 +7,4 @@ pygments_style = sphinx branch = BRANCH pdfpath = PDFPATH epubpath = EPUBPATH -manual_path = PATH \ No newline at end of file +manual_path = PATH From 862c0261c1d7d1aed90f5d16d632d213a9eca87b Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Mon, 22 Oct 2012 18:01:25 -0400 Subject: [PATCH 4/4] Additional tweaks to html cleanup, imbed Google Code jquery --- themes/mongodb/layout.html | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/themes/mongodb/layout.html b/themes/mongodb/layout.html index a0453af8cd9..61e36b960f0 100644 --- a/themes/mongodb/layout.html +++ b/themes/mongodb/layout.html @@ -81,16 +81,20 @@ HAS_SOURCE: {{ has_source|lower }} }; - {%- for scriptfile in script_files %} + {%- for scriptfile in script_files %} +{% if scriptfile == '_static/jquery.js' %} + +{%- else -%} - {%- endfor %} +{%- endif -%} +{%- endfor %} {%- endmacro %} -{%- macro css() -%} +{%- macro css() %} - {%- for cssfile in css_files %} +{%- for cssfile in css_files %} - {%- endfor %} +{%- endfor %} {%- endmacro -%} @@ -257,7 +261,7 @@ jQuery("#jirafeedback").click(function(e) {e.preventDefault();showCollectorDialog();}); jQuery("#jirafooter").click(function(e) {e.preventDefault();showCollectorDialog();}); }}; -{%- endblock -%} +{%- endblock %}