Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Update and package them
Browse files Browse the repository at this point in the history
  • Loading branch information
d0ugal committed Jun 27, 2015
1 parent 06e3d63 commit b377998
Show file tree
Hide file tree
Showing 19 changed files with 123 additions and 35 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive-include basic_theme *.ico *.js *.css *.png *.html *.eot *.svg *.ttf *.woff
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
Empty file added basic_theme/__init__.py
Empty file.
53 changes: 29 additions & 24 deletions basic_theme/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
<link rel="shortcut icon" href="{{ base_url }}/img/favicon.ico">
{% endif %}

<!--
You can include external assets of course, but be aware that it means the
documentation may not work well offline.
-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">

<link rel="stylesheet" href="{{ base_url }}/css/theme.css">

<!--
extra_ess contains paths to CSS files in the users
documentation directory or a list of CSS files defined in
Expand Down Expand Up @@ -78,29 +86,21 @@

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

<h2>Generate Navigation</h2>
<h2>Documentation Navigation</h2>

<!--
Create the navigation for the documentation.
Because we don't know how many levels deep the navigation is, it needs to
be included in it's own file so it can be recursive. Otherwise the theme
can also only support a specific number of levels.
See the nav.html file for more details about how this works.
-->
<ul>
{% for nav_item in nav %}
{% if nav_item.children %}
<li>{{ nav_item.title }}
<ul>
{% for nav_item in nav_item.children %}
<li class="{% if nav_item.active%}current{%endif%}">
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="{% if nav_item.active%}current{%endif%}">
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
</li>
{% endif %}

{% endfor %}
{% for nav_item in nav %}
{% include "nav.html" %}
{% endfor %}
</ul>

<hr/>
Expand All @@ -126,11 +126,16 @@ <h2>Next and previous links</h2>
-->
{% if next_page or previous_page %}
<div>
{% if next_page %}
<a href="{{ next_page.url }}" title="{{ next_page.title }}"/>Next Page</a>
{% endif %}
{% if previous_page %}
<a href="{{ previous_page.url }}" title="{{ previous_page.title }}">Previous Page</a>
<a href="{{ previous_page.url }}" title="{{ previous_page.title }}">&#8592; Previous Page</a>
{% else %}
&#8592; Previous Page
{% endif %}
-
{% if next_page %}
<a href="{{ next_page.url }}" title="{{ next_page.title }}"/>Next Page &#8594;</a>
{% else %}
Next Page &#8594;
{% endif %}
</div>
{% endif %}
Expand Down Expand Up @@ -171,7 +176,7 @@ <h2>Show the table of contents for the current page</h2>

<hr/>

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>.
Built with <a href="http://www.mkdocs.org">MkDocs</a>.

<!--
MkDocs version : {{ mkdocs_version }}
Expand Down
4 changes: 4 additions & 0 deletions basic_theme/css/theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.active a {
color: red;
font-weight: bold;
}
4 changes: 4 additions & 0 deletions basic_theme/js/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
* This JavaScript doesn't do anything. The file exists just to demonstrate
* including static assets from the HTML in themes.
*/
17 changes: 17 additions & 0 deletions basic_theme/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
-->
{% if not nav_item.children %}
<li {% if nav_item.active %}class="active"{% endif %}>
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
</li>
{% else %}
<li>
{{ nav_item.title }}
<ul>
{% for nav_item in nav_item.children %}
{% include "nav.html" %}
{% endfor %}
</ul>
</li>
{% endif %}
4 changes: 4 additions & 0 deletions docs/about/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
4 changes: 4 additions & 0 deletions docs/about/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
4 changes: 4 additions & 0 deletions docs/about/release-notes/version-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
4 changes: 4 additions & 0 deletions docs/about/release-notes/version-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
13 changes: 8 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# MkDocs Basic Theme

This is a very basic theme for MkDocs with the goal of
demonstrating all of the features with minimal HTML and CSS.
This is a very basic theme for MkDocs with the goal of demonstrating all of
the features with minimal HTML and CSS.

The actual contents of this documentation is very minimal.
Rather, you should look at the .html files in the `basic_theme`
directory to see the example of the theme.
## Adapting this theme

If you want to use this theme as a base to create your own, it is best to
download or fork the theme and start to modify it

Make sure you read the MkDocs documentation regarding writing custom themes.
3 changes: 0 additions & 3 deletions docs/page.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/sub/page.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/user-guide/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
4 changes: 4 additions & 0 deletions docs/user-guide/custom-themes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
4 changes: 4 additions & 0 deletions docs/user-guide/deploying-your-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
4 changes: 4 additions & 0 deletions docs/user-guide/styling-your-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
4 changes: 4 additions & 0 deletions docs/user-guide/writing-your-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testing Page

See the [Home Page](/). All the other pages are for demonstration purposes
with the navigation only.
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from setuptools import setup, find_packages

VERSION = '1.0'


setup(
name="mkdocs-basic-theme",
version=VERSION,
url='http://www.mkdocs.org',
license='BSD',
description='Minimal theme for MkDocs',
author='Dougal Matthews',
author_email='[email protected]',
packages=find_packages(),
include_package_data=True,
entry_points={
'mkdocs.themes': [
'basictheme = basic_theme',
]
},
zip_safe=False
)

0 comments on commit b377998

Please sign in to comment.