Skip to content

Commit 5e25d84

Browse files
committedJan 19, 2016
New theme for gotgit (copy from gotgithub)
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
1 parent 67440c5 commit 5e25d84

File tree

8 files changed

+483
-4
lines changed

8 files changed

+483
-4
lines changed
 

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ gh-pages: clean html
134134
echo "Branch gh-pages not exists, forgot check it out?" >&2; \
135135
exit 1; \
136136
fi
137-
@echo '*' > _build/html/images/.gitignore
137+
#@echo '*' > _build/html/_images/.gitignore
138138
@git add -f _build/html; \
139139
tree=$$(git write-tree); \
140140
newhtml=$$(git ls-tree $$tree:_build | grep "html$$" | awk '{print $$3;}') ; \

‎_theme/gotgit/layout.html

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{#
2+
sphinxdoc/layout.html
3+
~~~~~~~~~~~~~~~~~~~~~
4+
5+
Sphinx layout template for the sphinxdoc theme.
6+
7+
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
8+
:license: BSD, see LICENSE for details.
9+
#}
10+
{% extends "basic/layout.html" %}
11+
12+
{# put the sidebar before the body #}
13+
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
14+
{% block sidebar2 %}{% endblock %}
15+
16+
{% set css_files = css_files + ["/stylesheets/master.css", "/stylesheets/syntax.css", "static/worldhello.css"] %}
17+
18+
{% block header %}
19+
<div id='header'>
20+
<h1><a href='/'>World Hello</a></h1>
21+
22+
<div id='menu'>
23+
<ul>
24+
<li><a href='/' id='home-link' title='Home'>首页</a></li>
25+
<li><a href='/blog.html' id='blog-link' title='Blog'>博客</a></li>
26+
<li><a href='/doc/' id='docs-link' title='Docs'>文章</a></li>
27+
<li><a href='/about.html' id='about-link' title='About'>关于</a></li>
28+
<li><a href='http://github.com/gotgit' target='_blank' title='GitHub' rel='me' id='github-link'>GitHub</a></li>
29+
<li><a href='http://weibo.com/gotgit' title='微博' target='_blank' id='weibo-link'>微博</a></li>
30+
</ul>
31+
</div>
32+
</div>
33+
{% endblock %}
34+
35+
{%- block footer %}
36+
<div class="footer">
37+
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="知识共享许可协议" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a>
38+
<br />
39+
全部内容以 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons 署名-非商业性使用-相同方式共享 3.0 协议发布</a>.
40+
<br />
41+
42+
{%- if show_copyright %}
43+
{%- if hasdoc('copyright') %}
44+
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
45+
{%- else %}
46+
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}。{% endtrans %}
47+
{%- endif %}
48+
{%- endif %}
49+
{%- if last_updated %}
50+
{% trans last_updated=last_updated|e %}最后更新于 {{ last_updated }}。{% endtrans %}
51+
{%- endif %}
52+
{%- if show_sphinx %}
53+
{% trans sphinx_version=sphinx_version|e %}使用 <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }} 创建。{% endtrans %}
54+
{%- endif %}
55+
56+
</div>
57+
{%- endblock %}

‎_theme/gotgit/static/contents.png

202 Bytes
Loading

‎_theme/gotgit/static/navigation.png

218 Bytes
Loading

‎_theme/gotgit/static/sphinxdoc.css

+403
Large diffs are not rendered by default.

‎_theme/gotgit/static/worldhello.css

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
body {
2+
min-width: 740px;
3+
width: 960px;
4+
margin: 0 auto;
5+
-moz-border-radius: 1.5em;
6+
-webkit-border-radius: 1.5em;
7+
border-radius: 1.5em;
8+
}
9+
10+
div.related {
11+
margin-top: 5px;
12+
margin-bottom: 0;
13+
}

‎_theme/gotgit/theme.conf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[theme]
2+
inherit = basic
3+
stylesheet = sphinxdoc.css
4+
pygments_style = friendly

‎conf.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# General information about the project.
4343
project = u'GotGit'
44-
copyright = u'2011, Jiang Xin'
44+
copyright = u'2011, 蒋鑫'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the
@@ -91,19 +91,20 @@
9191

9292
# The theme to use for HTML and HTML Help pages. See the documentation for
9393
# a list of builtin themes.
94-
html_theme = 'default'
94+
html_theme = 'gotgit'
9595

9696
# Theme options are theme-specific and customize the look and feel of a theme
9797
# further. For a list of options available for each theme, see the
9898
# documentation.
9999
#html_theme_options = {}
100100

101101
# Add any paths that contain custom themes here, relative to this directory.
102-
#html_theme_path = []
102+
html_theme_path = [ '_theme' ]
103103

104104
# The name for this set of Sphinx documents. If None, it defaults to
105105
# "<project> v<release> documentation".
106106
#html_title = None
107+
html_title = u'GotGit'
107108

108109
# A shorter title for the navigation bar. Default is the same as html_title.
109110
#html_short_title = None
@@ -215,6 +216,7 @@
215216
[u'Jiang Xin'], 1)
216217
]
217218

219+
language = 'zh_CN';
218220

219221
# -- Options for Epub output ---------------------------------------------------
220222

0 commit comments

Comments
 (0)
Please sign in to comment.