Skip to content

Commit

Permalink
docs: changed theme
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed Jun 15, 2015
1 parent 638e798 commit dc34351
Show file tree
Hide file tree
Showing 12 changed files with 575 additions and 551 deletions.
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

SPHINX = sphinx-build -a -d ./doctrees/

html: *.rst fityk.css conf.py
html: *.rst fitheme/* fitheme/static/* conf.py
$(SPHINX) -b html . html
rm -f html/objects.inv html/.buildinfo

Expand Down
27 changes: 14 additions & 13 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-

# Sphinx v1.0.7
#
# sphinx-build -d ./doctrees/ -b html . html
needs_sphinx = '1.3'

import sys, os
sys.path.append(os.path.abspath('.'))
Expand All @@ -16,15 +14,12 @@
if os.getenv('READTHEDOCS'):
# RTD works better with index.html
html_additional_pages = { 'index': '_build/html/fityk-manual.html' }
# RTD has own layout.html. This hack is needed to use all layout.html files.
template_bridge = "fityk_ext.MyTemplateLoader"

templates_path = ['.']
html_theme_path = ['.']
source_suffix = '.rst'
source_encoding = 'utf-8'
master_doc = 'fityk-manual'
project = 'Fityk'
copyright = '2001-2015, Fityk Developers'
version = '1.3.0'
release = version
default_role = None
Expand All @@ -33,15 +28,21 @@
highlight_language = "fityk"
pygments_style = "trac"

html_theme = "sphinxdoc"
html_sidebars = {'index': [],
'screens': [],
'**': ['globaltoc.html', 'editlink.html', 'searchbox.html']}
#html_theme = "sphinxdoc"
html_theme = 'fitheme'

html_theme_options = {
#'analytics_id': UA-20519098-2
'github_blob': 'wojdyr/fityk/blob/master/doc',
'logo': 'fityk-logo.png',
'website': 'http://fityk.nieto.pl/',
'wiki': 'https://github.com/wojdyr/fityk/wiki',
}
html_sidebars = { 'index': [], 'screens': [], '**': ['side.html'] }
html_title = 'Fityk %s manual' % version
html_short_title = 'Manual'
html_favicon = 'fityk.ico'
html_static_path = ['fityk-banner.png', 'fityk.css', 'img/mouse16.png']
html_style = 'fityk.css'
html_static_path = ['fityk-logo.png', 'img/mouse16.png']
html_last_updated_fmt = '%Y-%m-%d'
html_use_smartypants = True
html_use_modindex = False
Expand Down
10 changes: 0 additions & 10 deletions doc/editlink.html

This file was deleted.

46 changes: 46 additions & 0 deletions doc/fitheme/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{%- extends "basic/layout.html" %}
{%- block extrahead %}
{{ super() }}
<meta name="viewport" content="width=device-width, initial-scale=1">
{% endblock %}

{% block relbar1 %}{% endblock %}
{%- block rootrellink %}{% endblock %}
{% block relbar2 %}
{%- if next %}
<div class="related" role="navigation" aria-label="related navigation">
Next: <a href="{{ next.link|e }}">{{ next.title|striptags|e }}</a>
</div>
{%- endif %}
{% endblock %}

{%- block footer %}
<div class="footer" role="contentinfo">
Updated on {{ last_updated }} with Sphinx {{ sphinx_version }}.
{%- if show_source and has_source and sourcename %}
| <a href="{{ pathto('_sources/' + sourcename, true)|e }}"
rel="nofollow">{{ _('Page source') }}</a>
{%- endif %}
{%- if theme_github_blob and sourcename %}
| <a href="https://github.com/{{ theme_github_blob }}/{{ sourcename[:-4] }}.rst"
rel="nofollow">{{ 'Edit on GitHub' }}</a>
{%- endif %}
</div>
{%- if theme_analytics_id %}
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ theme_analytics_id }}']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>
{%- endif %}
{%- endblock %}
29 changes: 29 additions & 0 deletions doc/fitheme/side.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{%- if theme_logo %}
<p class="logo">
<a href="{{ theme_website }}">
<img class="logo" src="{{ pathto('_static/' ~ theme_logo, 1) }}" alt="Logo"/>
</a>
</p>
{%- endif %}

<h3><a href="{{ pathto(master_doc) }}">Manual</a></h3>
{{ toctree() }}

{%- if theme_wiki %}
<ul>
<li class="toctree-l1">
<a class="reference external" href="{{ theme_wiki }}">Wiki</a>
</li>
</ul>
{%- endif %}

{%- if pagename != "search" and builder != "singlehtml" %}
<div id="searchbox" role="search">
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" size="12" />
<input type="submit" value="Search" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
{%- endif %}

0 comments on commit dc34351

Please sign in to comment.