Skip to content

Commit b377998

Browse files
committed
Update and package them
1 parent 06e3d63 commit b377998

File tree

19 files changed

+123
-35
lines changed

19 files changed

+123
-35
lines changed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
recursive-include basic_theme *.ico *.js *.css *.png *.html *.eot *.svg *.ttf *.woff
2+
recursive-exclude * __pycache__
3+
recursive-exclude * *.py[co]

basic_theme/__init__.py

Whitespace-only changes.

basic_theme/base.html

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
<link rel="shortcut icon" href="{{ base_url }}/img/favicon.ico">
2525
{% endif %}
2626

27+
<!--
28+
You can include external assets of course, but be aware that it means the
29+
documentation may not work well offline.
30+
-->
31+
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
32+
33+
<link rel="stylesheet" href="{{ base_url }}/css/theme.css">
34+
2735
<!--
2836
extra_ess contains paths to CSS files in the users
2937
documentation directory or a list of CSS files defined in
@@ -78,29 +86,21 @@
7886

7987
<h1>This is an example theme.</h1>
8088

81-
<h2>Generate Navigation</h2>
89+
<h2>Documentation Navigation</h2>
90+
8291
<!--
8392
Create the navigation for the documentation.
93+
94+
Because we don't know how many levels deep the navigation is, it needs to
95+
be included in it's own file so it can be recursive. Otherwise the theme
96+
can also only support a specific number of levels.
97+
98+
See the nav.html file for more details about how this works.
8499
-->
85100
<ul>
86-
{% for nav_item in nav %}
87-
{% if nav_item.children %}
88-
<li>{{ nav_item.title }}
89-
<ul>
90-
{% for nav_item in nav_item.children %}
91-
<li class="{% if nav_item.active%}current{%endif%}">
92-
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
93-
</li>
94-
{% endfor %}
95-
</ul>
96-
</li>
97-
{% else %}
98-
<li class="{% if nav_item.active%}current{%endif%}">
99-
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
100-
</li>
101-
{% endif %}
102-
103-
{% endfor %}
101+
{% for nav_item in nav %}
102+
{% include "nav.html" %}
103+
{% endfor %}
104104
</ul>
105105

106106
<hr/>
@@ -126,11 +126,16 @@ <h2>Next and previous links</h2>
126126
-->
127127
{% if next_page or previous_page %}
128128
<div>
129-
{% if next_page %}
130-
<a href="{{ next_page.url }}" title="{{ next_page.title }}"/>Next Page</a>
131-
{% endif %}
132129
{% if previous_page %}
133-
<a href="{{ previous_page.url }}" title="{{ previous_page.title }}">Previous Page</a>
130+
<a href="{{ previous_page.url }}" title="{{ previous_page.title }}">&#8592; Previous Page</a>
131+
{% else %}
132+
&#8592; Previous Page
133+
{% endif %}
134+
-
135+
{% if next_page %}
136+
<a href="{{ next_page.url }}" title="{{ next_page.title }}"/>Next Page &#8594;</a>
137+
{% else %}
138+
Next Page &#8594;
134139
{% endif %}
135140
</div>
136141
{% endif %}
@@ -171,7 +176,7 @@ <h2>Show the table of contents for the current page</h2>
171176

172177
<hr/>
173178

174-
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
179+
Built with <a href="http://www.mkdocs.org">MkDocs</a>.
175180

176181
<!--
177182
MkDocs version : {{ mkdocs_version }}

basic_theme/css/theme.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.active a {
2+
color: red;
3+
font-weight: bold;
4+
}

basic_theme/js/theme.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/*
2+
* This JavaScript doesn't do anything. The file exists just to demonstrate
3+
* including static assets from the HTML in themes.
4+
*/

basic_theme/nav.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!--
2+
3+
-->
4+
{% if not nav_item.children %}
5+
<li {% if nav_item.active %}class="active"{% endif %}>
6+
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
7+
</li>
8+
{% else %}
9+
<li>
10+
{{ nav_item.title }}
11+
<ul>
12+
{% for nav_item in nav_item.children %}
13+
{% include "nav.html" %}
14+
{% endfor %}
15+
</ul>
16+
</li>
17+
{% endif %}

docs/about/contributing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Testing Page
2+
3+
See the [Home Page](/). All the other pages are for demonstration purposes
4+
with the navigation only.

docs/about/license.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Testing Page
2+
3+
See the [Home Page](/). All the other pages are for demonstration purposes
4+
with the navigation only.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Testing Page
2+
3+
See the [Home Page](/). All the other pages are for demonstration purposes
4+
with the navigation only.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Testing Page
2+
3+
See the [Home Page](/). All the other pages are for demonstration purposes
4+
with the navigation only.

0 commit comments

Comments
 (0)