Skip to content

Commit 48b8fd5

Browse files
author
Sam Kleinman
committed
theme: updates and sidebar cleanup
1 parent d2ac670 commit 48b8fd5

File tree

7 files changed

+42
-52
lines changed

7 files changed

+42
-52
lines changed

conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,11 @@
102102
'repo_name': 'docs',
103103
'jira_project': 'DOCS',
104104
'google_analytics': 'UA-7301842-8',
105-
'is_manual': True,
106105
'project': 'manual',
107106
}
108107

109108
html_sidebars = {
110-
'**': ['pagenav.html', 'wikisidebar.html'],
109+
'**': ['pagenav.html', 'formats.html', 'translations.html', 'wikisidebar.html'],
111110
}
112111

113112
# -- Options for LaTeX output --------------------------------------------------

themes/mongodb/formats.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<h3>{{ _('Formats') }}</h3>
2+
<ul class="this-page-menu">
3+
{%- if show_source and has_source and sourcename %}
4+
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow">{{ _("This Page's Source") }}</a></li>
5+
{%- endif %}
6+
<li><a href="/{{ theme_manual_path }}/single/">{{ _('MongoDB Manual, Single HTML Page') }}</a></li>
7+
<li><a href="{{ theme_pdfpath }}" rel="nofollow">{{ _('MongoDB Manual, PDF Format') }}</a></li>
8+
<li><a href="{{ theme_epubpath }}" rel="nofollow">{{ _('MongoDB Manual, ePub Format') }}</a></li>
9+
</ul>

themes/mongodb/intrasites.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{%- if theme_project != 'about' %}
2+
<h3 style="padding-bottom: 1em;"><a href="http://docs.mongodb.org/about/">MongoDB.org</a></h3>
3+
{%- endif %}
4+
5+
{%- if theme_project != 'manual' %}
6+
<h3 style="padding-bottom: 1em;"><a href="http://docs.mongodb.org/manual/">MongoDB Manual</a></h3>
7+
{%- endif %}
8+
9+
{%- if theme_project != 'ecosystem' %}
10+
<h3 style="padding-bottom: 1em;"><a href="http://docs.mongodb.org/ecosystem/">MongoDB Ecosystem</a></h3>
11+
{%- endif %}

themes/mongodb/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,15 @@
144144
</div>
145145

146146
<div class="search-db"><gcse:searchbox></gcse:searchbox></div>
147+
{%- if theme_project != 'about' %}
147148
<div id="etp">
148149
<ul>
149150
<li>{{ githublink() }}</li>
150151
<li><a href="http://github.com/mongodb/{{ theme_repo_name }}" target="_blank" title="Fork the documentation on GitHub and contribute.">GitHub</a></li>
151152
<li><a href="{{ jiralink() }}" target="_blank" title="Report a problem with {{pagename|e}}.txt on Jira">Report a problem</a></li>
152153
</ul>
153154
</div>
155+
{%- endif %}
154156
</div>
155157
{%- endblock %}
156158

themes/mongodb/pagenav.html

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,7 @@
1-
{#
2-
cat basic/sourcelink.html basic/relations.html
3-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4-
5-
Sphinx sidebar template: "show source" link.
6-
7-
Sphinx sidebar template: relation links.
8-
9-
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
10-
:license: BSD, see LICENSE for details.
11-
#}
12-
131
<h3><a href="{{ pathto(master_doc) }}">{{ project }}</a>
14-
<small>(<a href="{{ pathto('genindex') }}">{{ _('Index') }}</a>)</small>
2+
{% if theme_project != 'about' %}
3+
<small><a href="{{ pathto('genindex') }}">{{ _('(Index)') }}</a></small>
4+
{% endif %}
155
</h3>
166

177
{{ toctree(maxdepth=-1) }}
18-
19-
{%- if theme_is_manual %}
20-
{%- if project != 'ecosystem' %}
21-
<h3>{{ _('Formats') }}</h3>
22-
<ul class="this-page-menu">
23-
{%- if show_source and has_source and sourcename %}
24-
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow">{{ _("This Page's Source") }}</a></li>
25-
{%- endif %}
26-
<li><a href="/{{ theme_manual_path }}/single/">{{ _('MongoDB Manual, Single HTML Page') }}</a></li>
27-
<li><a href="{{ theme_pdfpath }}" rel="nofollow">{{ _('MongoDB Manual, PDF Format') }}</a></li>
28-
<li><a href="{{ theme_epubpath }}" rel="nofollow">{{ _('MongoDB Manual, ePub Format') }}</a></li>
29-
</ul>
30-
{%- endif %}
31-
{%- endif %}
32-
33-
{%- if theme_is_manual %}
34-
{%- else %}
35-
<h3 style="padding-bottom: 1em;"><a href="http://docs.mongodb.org/manual/">MongoDB Manual</a></h3>
36-
{%- endif %}
37-
38-
<h3>Translations</h3>
39-
<ul class="translation-menu">
40-
{%- if theme_is_manual %}
41-
<li><a href="http://jp.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
42-
<li><a href="http://cn.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
43-
<!-- <li><a href="http://docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
44-
{%- elif theme_project == 'ecosystem' %}
45-
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
46-
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
47-
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
48-
{%- else %}
49-
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
50-
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
51-
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
52-
{%- endif %}
53-
</ul>

themes/mongodb/theme.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ manual_path = PATH
1111
repo_name = REPONAME
1212
jira_project = JIRA
1313
google_analytics = GACODE
14-
is_manual = MANUAL
1514
project = PROJECT

themes/mongodb/translations.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<h3>Translations</h3>
2+
<ul class="translation-menu">
3+
{%- if theme_project == 'manual' %}
4+
<li><a href="http://jp.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
5+
<li><a href="http://cn.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
6+
<!-- <li><a href="http://docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
7+
{%- elif theme_project == 'ecosystem' %}
8+
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
9+
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
10+
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
11+
{%- elif theme_project == 'meta-driver' %}
12+
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
13+
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
14+
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
15+
{%- endif %}
16+
</ul>

0 commit comments

Comments
 (0)