Skip to content

Commit 3adb95f

Browse files
committed
🀄 work-in-progress Chinese docs for django-excel
0 parents  commit 3adb95f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2225
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*~
2+
.moban.hashes
3+

.moban.d/docs/source/cn-index.rst.jj2

+519
Large diffs are not rendered by default.

.moban.d/docs/source/conf.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends 'docs/source/conf.py.jj2' %}
2+
3+
{%block SPHINX_EXTENSIONS%}
4+
'sphinxcontrib.excel'
5+
{%endblock%}
6+
7+
8+
{%block custom_doc_theme%}
9+
import os # noqa
10+
import sys # noqa
11+
sys.path.append(os.path.abspath('_themes'))
12+
html_theme_path = ['_themes']
13+
html_theme = 'djangodocs'
14+
{%endblock%}

.moban.d/setup.rst.jj2

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
You will need to update your *settings.py*:
2+
3+
.. code-block:: python
4+
5+
FILE_UPLOAD_HANDLERS = ("django_excel.ExcelMemoryFileUploadHandler",
6+
"django_excel.TemporaryExcelFileUploadHandler")
7+

.moban.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
configuration:
2+
configuration_dir: "git://github.com/pyexcel/pyexcel-mobans!/config"
3+
template_dir:
4+
- "git://github.com/moremoban/pypi-mobans.git?submodule=true&branch=dev!/statics"
5+
- "git://github.com/moremoban/pypi-mobans.git?branch=dev&submodule=true!/templates"
6+
- "git://github.com/pyexcel/pyexcel-mobans.git!/templates"
7+
- "git://github.com/pyexcel/pyexcel-mobans.git!/statics"
8+
- "git://github.com/pyexcel-webwares/django-excel.git?branch=master!/"
9+
- ".moban.d"
10+
configuration: "git://github.com/pyexcel-webwares/django-excel.git?branch=master!/django_excel.yml"
11+
targets:
12+
- output: docs/source
13+
template_type: copy
14+
template: "docs/source/**"
15+
- delete!: docs/source/index.rst
16+
- "docs/source/index.rst": "docs/source/cn-index.rst.jj2"
17+
- "polls/views.py": "polls/views.py"
18+
- "sample-data.xls": "sample-data.xls"
19+

REAME.rst

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
django-excel
2+
=====================
3+
4+
中文文档

docs/source/_static/handsontable.full.min.css

+31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/source/_static/handsontable.full.min.js

+89
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{%- extends "epub/epub-cover.html" %}
2+
3+
{% block content %}
4+
<div class="epub-cover">
5+
<h1>Django Documentation</h1>
6+
<h2><em>Release {{ release }}</em></h2>
7+
<h3>{{ copyright }}</h3>
8+
<p>{{ last_updated }}</p>
9+
</div>
10+
{% endblock %}
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
h1 { margin-top: 0; }
2+
3+
/* Keep lists a bit narrow to maximize page estate regarding width. */
4+
ol, ul {
5+
margin: 0;
6+
padding: 0 0 0 1.3em;
7+
}
8+
9+
/* Images should never exceed the width of the page. */
10+
img { max-width: 100%; }
11+
12+
/* Don't display URL after links, this is not print. */
13+
.link-target { display: none; }
14+
15+
/* This is the front cover page of the book. */
16+
.epub-cover { text-align: center; }
17+
.epub-cover h1 { margin: 4em 0 0 0; }
18+
.epub-cover h2 { margin: 1em 0; }
19+
.epub-cover h3 { margin: 3em 0 2em 0; }
20+
21+
/* Code examples should never exceed the width of the page, so wrap instead. */
22+
pre, span.pre { white-space: pre-wrap; }
23+
24+
pre {
25+
background-color: #f6f6f6;
26+
border: 0;
27+
padding: 0.5em;
28+
font-size: 90%;
29+
}
30+
31+
/* Header for some code blocks. */
32+
.snippet-filename {
33+
background-color: #393939;
34+
color: white;
35+
margin: 0;
36+
padding: 0.5em;
37+
font: bold 90% monospace;
38+
}
39+
.snippet-filename + .highlight > pre,
40+
.snippet-filename + pre {
41+
margin-top: 0;
42+
}
43+
44+
a:link, a:visited { color: #396623; }
45+
a:hover { color: #1d3311; }
46+
47+
/* Use special styled note boxes from the default theme, but with the left side
48+
fitted after the icon, to allow text resizing with breaking. */
49+
.note, .admonition {
50+
background-position: 9px 0.8em;
51+
background-repeat: no-repeat;
52+
padding: 0.8em 1em 0.8em 65px;
53+
margin: 1em 0;
54+
border: 0.01em solid black;
55+
}
56+
57+
.note, .admonition { background-image: url(docicons-note.png); }
58+
div.admonition-philosophy { background-image: url(docicons-philosophy.png); }
59+
div.admonition-behind-the-scenes { background-image: url(docicons-behindscenes.png); }
60+
.admonition.warning { background-image: url(docicons-warning.png); }
61+
62+
.admonition-title {
63+
font-weight: bold;
64+
margin: 0;
65+
}
66+
67+
.admonition .last { margin-bottom: 0; }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[theme]
2+
inherit = epub
3+
stylesheet = epub.css
4+
pygments_style = trac
5+
6+
[options]
7+
relbar1 = false
8+
footer = false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% extends "basic/genindex.html" %}
2+
3+
{% block bodyclass %}{% endblock %}
4+
{% block sidebarwrapper %}{% endblock %}
+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
{% extends "basic/layout.html" %}
2+
3+
{%- macro secondnav() %}
4+
{%- if prev %}
5+
&laquo; <a href="{{ prev.link|e }}" title="{{ prev.title|e }}">previous</a>
6+
{{ reldelim2 }}
7+
{%- endif %}
8+
{%- if parents %}
9+
<a href="{{ parents.0.link|e }}" title="{{ parents.0.title|e }}" accesskey="U">up</a>
10+
{%- else %}
11+
<a title="{{ docstitle }}" href="{{ pathto('index') }}" accesskey="U">up</a>
12+
{%- endif %}
13+
{%- if next %}
14+
{{ reldelim2 }}
15+
<a href="{{ next.link|e }}" title="{{ next.title|e }}">next</a> &raquo;
16+
{%- endif %}
17+
{%- endmacro %}
18+
19+
{% block extrahead %}
20+
{# When building htmlhelp (CHM format) disable jQuery inclusion, #}
21+
{# as it causes problems in compiled CHM files. #}
22+
{% if builder != "htmlhelp" %}
23+
{{ super() }}
24+
<script type="text/javascript" src="{{ pathto('templatebuiltins.js', 1) }}"></script>
25+
<link rel="stylesheet" type="text/css" href="_static/handsontable.full.min.css">
26+
<script src="_static/handsontable.full.min.js"></script>
27+
<style>
28+
body{font-family:Helvetica,sans-serif;margin:2 0 0 0}.tab{margin-bottom:0px !important;text-align:center;list-style:none;padding:0 0 0 10px;line-height:24px;height:26px;overflow:hidden;font-size:12px;font-family:verdana;position:relative;margin:0}.tab li{margin-left:0px !important;margin-top:2px !important;float:left;height:24px;border:1px solid #aaa;background:#d1d1d1;background:linear-gradient(top, #ececec 50%, #d1d1d1);display:inline-block;position:relative;z-index:0;border-top-left-radius:6px;border-top-right-radius:6px;box-shadow:0 3px 3px rgba(0,0,0,0.4),inset 0 1px 0 #fff;text-shadow:0 1px #fff;margin:0 -5px;padding:0 20px}.tab li.active{background:#fff;color:#333;z-index:2}.tab li:before{left:-6px;border-width:0 1px 1px 0;box-shadow:2px 2px 0 #d1d1d1}.tab li:after{right:-6px;border-width:0 0 1px 1px;box-shadow:-2px 2px 0 #d1d1d1}.tab a{color:#555;text-decoration:none !important}.tab:before{position:absolute;content:" ";width:100%;bottom:0;left:0;border-bottom:1px solid #aaa;z-index:1}.tabcontent{margin-top:-1px}
29+
</style>
30+
<script type="text/javascript">
31+
(function($) {
32+
if (!django_template_builtins) {
33+
// templatebuiltins.js missing, do nothing.
34+
return;
35+
}
36+
$(document).ready(function() {
37+
// Hyperlink Django template tags and filters
38+
var base = "{{ pathto('ref/templates/builtins') }}";
39+
if (base == "#") {
40+
// Special case for builtins.html itself
41+
base = "";
42+
}
43+
// Tags are keywords, class '.k'
44+
$("div.highlight\\-html\\+django span.k").each(function(i, elem) {
45+
var tagname = $(elem).text();
46+
if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
47+
var fragment = tagname.replace(/_/, '-');
48+
$(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
49+
}
50+
});
51+
// Filters are functions, class '.nf'
52+
$("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
53+
var filtername = $(elem).text();
54+
if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
55+
var fragment = filtername.replace(/_/, '-');
56+
$(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
57+
}
58+
});
59+
});
60+
})(jQuery);
61+
</script>
62+
{% endif %}
63+
{% endblock %}
64+
65+
{% block document %}
66+
<div id="custom-doc" class="{% block bodyclass %}{{ 'yui-t6' if pagename != 'index' else '' }}{% endblock %}">
67+
<div id="hd">
68+
<h1><a href="{{ pathto('index') }}">{{ docstitle }}</a></h1>
69+
<div id="global-nav">
70+
<a title="Home page" href="{{ pathto('index') }}">Home</a> {{ reldelim2 }}
71+
<a title="Table of contents" href="{{ pathto('contents') }}">Table of contents</a> {{ reldelim2 }}
72+
<a title="Global index" href="{{ pathto('genindex') }}">Index</a> {{ reldelim2 }}
73+
<a title="Module index" href="{{ pathto('py-modindex') }}">Modules</a>
74+
</div>
75+
<div class="nav">{{ secondnav() }}</div>
76+
</div>
77+
78+
<div id="bd">
79+
<div id="yui-main">
80+
<div class="yui-b">
81+
<div class="yui-g" id="{{ pagename|replace('/', '-') }}">
82+
{% block body %}{% endblock %}
83+
</div>
84+
</div>
85+
</div>
86+
{% block sidebarwrapper %}
87+
{% if pagename != 'index' %}
88+
<div class="yui-b" id="sidebar">
89+
{{ sidebar() }}
90+
{%- if last_updated %}
91+
<h3>Last update:</h3>
92+
<p class="topless">{{ last_updated }}</p>
93+
{%- endif %}
94+
</div>
95+
{% endif %}
96+
{% endblock %}
97+
</div>
98+
99+
<div id="ft">
100+
<div class="nav">{{ secondnav() }}</div>
101+
</div>
102+
</div>
103+
{% endblock %}
104+
105+
{% block sidebarrel %}
106+
<h3>Browse</h3>
107+
<ul>
108+
{% if prev %}
109+
<li>Prev: <a href="{{ prev.link }}">{{ prev.title }}</a></li>
110+
{% endif %}
111+
{% if next %}
112+
<li>Next: <a href="{{ next.link }}">{{ next.title }}</a></li>
113+
{% endif %}
114+
</ul>
115+
<h3>You are here:</h3>
116+
<ul>
117+
<li>
118+
<a href="{{ pathto('index') }}">{{ docstitle }}</a>
119+
{% for p in parents %}
120+
<ul><li><a href="{{ p.link }}">{{ p.title }}</a>
121+
{% endfor %}
122+
<ul><li>{{ title }}</li></ul>
123+
{% for p in parents %}</li></ul>{% endfor %}
124+
</li>
125+
</ul>
126+
{% endblock %}
127+
128+
{# Empty some default blocks out #}
129+
{% block relbar1 %}{% endblock %}
130+
{% block relbar2 %}{% endblock %}
131+
{% block sidebar1 %}{% endblock %}
132+
{% block sidebar2 %}{% endblock %}
133+
{% block footer %}{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% extends "basic/modindex.html" %}
2+
{% block bodyclass %}{% endblock %}
3+
{% block sidebarwrapper %}{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% extends "basic/search.html" %}
2+
{% block bodyclass %}{% endblock %}
3+
{% block sidebarwrapper %}{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import url(reset-fonts-grids.css);
2+
@import url(djangodocs.css);
3+
@import url(homepage.css);

0 commit comments

Comments
 (0)