This repository has been archived by the owner on Sep 9, 2018. It is now read-only.
/
index.html
282 lines (271 loc) · 13.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sphinxcontrib-fancybox’s documentation — sphinxcontrib-fancybox 1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/fancybox/jquery.fancybox.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/fancybox/jquery.fancybox.pack.js"></script>
<link rel="top" title="sphinxcontrib-fancybox 1 documentation" href="#" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li><a href="#">sphinxcontrib-fancybox 1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="sphinxcontrib-fancybox-s-documentation">
<h1>sphinxcontrib-fancybox’s documentation<a class="headerlink" href="#sphinxcontrib-fancybox-s-documentation" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="readme">
<h1>README<a class="headerlink" href="#readme" title="Permalink to this headline">¶</a></h1>
<p>Sphinx “fancybox” extension.</p>
</div>
<div class="section" id="fancybox">
<h1>Fancybox<a class="headerlink" href="#fancybox" title="Permalink to this headline">¶</a></h1>
<p>Fancybox is adaptation of the jQuery plugin <a class="reference external" href="http://fancyapps.com/fancybox">fancybox</a> in version <a href="#id2"><span class="problematic" id="id3">**</span></a>2.1.5*. Note that version
Fancybox v2 and later are distributed under a
<a class="reference external" href="http://creativecommons.org/licenses/by-nc/3.0/">Creative Commons Attribution-NonCommercial 3.0</a>
license.</p>
<p>Documentation: <a class="reference external" href="http://spinus.github.com/sphinxcontrib-fancybox/">http://spinus.github.com/sphinxcontrib-fancybox/</a></p>
<p>github: <a class="reference external" href="http://github.com/spinus/sphinxcontrib-fancybox/">http://github.com/spinus/sphinxcontrib-fancybox/</a></p>
<p>PYPI: <a class="reference external" href="http://pypi.python.org/pypi/sphinxcontrib-fancybox/">http://pypi.python.org/pypi/sphinxcontrib-fancybox/</a></p>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
<p>Instalation through pip:</p>
<div class="highlight-python"><div class="highlight"><pre>pip install sphinxcontrib-fancybox
</pre></div>
</div>
<p>or through github:</p>
<div class="highlight-python"><div class="highlight"><pre>git clone https://github.com/spinus/sphinxcontrib-fancybox
cd sphinxcontrib-fancybox
python setup.py install
</pre></div>
</div>
<p>Next, you have to add extension to <cite>conf.py</cite> in your sphinx project.</p>
<div class="highlight-python"><div class="highlight"><pre>extensions = [
...,
'sphinxcontrib.fancybox',
...]
</pre></div>
</div>
</div>
<div class="section" id="directives">
<h2>Directives<a class="headerlink" href="#directives" title="Permalink to this headline">¶</a></h2>
<p>fancybox:</p>
<blockquote>
<div><p>Fancybox directive place a thumbnail of picture you selected, and add some
<cite>fancies</cite>. If you click on image you get fullscreen box with that picture.</p>
<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre>.. fancybox:: picture.png
</pre></div>
</div>
<p>By default all images on one page are in the same group (you can navigate
pressing <cite>next</cite> and <cite>prev</cite> buttons around this group).
If you want to add picture to another group you have to set <cite>group</cite>
parameter, like:</p>
<div class="highlight-python"><div class="highlight"><pre>.. fancybox:: picture.png
:group: group2
</pre></div>
</div>
<p>You can change size of fancybox with ‘width’ and ‘height’ which are
passed as you set it:</p>
<div class="highlight-python"><div class="highlight"><pre>.. fancybox:: picture.png
:width: 100%
:height: 2em
</pre></div>
</div>
<p>You can add some description which will be rendered as <cite>title</cite> attribute:</p>
<div class="highlight-python"><div class="highlight"><pre>.. fancybox:: http://pictures.tld/picture.png
Some description
</pre></div>
</div>
<p>If you not set ‘width’ and ‘height’, defaults values are gathered from
<cite>conf.py</cite>. There are two parameters which you can adjust:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">fancybox_thumbnail_width</span>
<span class="n">fancybox_thumbnail_height</span>
</pre></div>
</div>
<p>Additionally you can set another css class with ‘class’ argument to
<cite>fancybox</cite> directive or set <cite>fancybox_thumbnail_class</cite> to add css class to
all <cite>fancybox</cite> directives.</p>
<p>All fancybox JS config options you can pass as dict to <cite>fancybox_config</cite> in
<cite>conf.py</cite> too.</p>
<p>For examples please look to documentation conf.py.</p>
</div></blockquote>
</div>
<div class="section" id="todo">
<h2>TODO<a class="headerlink" href="#todo" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>handling local files (not only remotes) (DONE)</li>
<li>option to copying remote graphics as statics</li>
<li>fallback for non html output (DONE)</li>
<li>nested parsing fix</li>
<li>JS should be handled only once, not on every image node</li>
<li>width and height parameters (currently the thumbnail is set to 100x100px) (DONE)</li>
<li>get default thumbnail size from config (DONE)</li>
<li>generate thumbnails for big images</li>
</ul>
</div>
<div class="section" id="questions-and-suggestions">
<h2>Questions and suggestions<a class="headerlink" href="#questions-and-suggestions" title="Permalink to this headline">¶</a></h2>
<p>If you have some suggstions, patches, problems - please write an email or
github message.</p>
</div>
</div>
<div class="section" id="examples">
<h1>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h1>
<div class="section" id="fancybox-remote-link">
<h2>0 - fancybox remote link<a class="headerlink" href="#fancybox-remote-link" title="Permalink to this headline">¶</a></h2>
<a alt="" class="fancybox" href="http://creoeninternet.com/wp-content/uploads/2011/06/wikipedia.png" rel="default" title="">
<img src="http://creoeninternet.com/wp-content/uploads/2011/06/wikipedia.png" width="150px" height="150px" />
<script type="text/javascript">
$(document).ready(function() {
$("a.fancybox").fancybox({"overlayShow": "false", "transitionOut": "elastic", "speedOut": 200, "transitionIn": "elastic", "speedIn": 600});
});
</script>
</a></div>
<div class="section" id="fancybox-non-standard-size">
<h2>1 - fancybox non standard size<a class="headerlink" href="#fancybox-non-standard-size" title="Permalink to this headline">¶</a></h2>
<a alt="" class="fancybox" href="_images/img.jpg" rel="default" title="">
<img src="_images/img.jpg" width="300px" height="100px" />
<script type="text/javascript">
$(document).ready(function() {
$("a.fancybox").fancybox({"overlayShow": "false", "transitionOut": "elastic", "speedOut": 200, "transitionIn": "elastic", "speedIn": 600});
});
</script>
</a></div>
<div class="section" id="fancybox-with-additional-class">
<h2>2 - fancybox with additional class<a class="headerlink" href="#fancybox-with-additional-class" title="Permalink to this headline">¶</a></h2>
<a alt="with css class" class="someclass fancybox" href="_images/img.jpg" rel="default" title="with css class">
<img src="_images/img.jpg" width="150px" height="150px" />
<script type="text/javascript">
$(document).ready(function() {
$("a.fancybox").fancybox({"overlayShow": "false", "transitionOut": "elastic", "speedOut": 200, "transitionIn": "elastic", "speedIn": 600});
});
</script>
</a></div>
<div class="section" id="fancybox-with-description-markup">
<h2>3 - fancybox with description (markup)<a class="headerlink" href="#fancybox-with-description-markup" title="Permalink to this headline">¶</a></h2>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">nested parsing of description is not working now, is rendered as
plaintext</p>
</div>
<a alt="Some description of image, yey! Can be multiline and it is very nice. And with link to somwhere." class="fancybox" href="_images/img.jpg" rel="default" title="Some description of image, yey! Can be multiline and it is very nice. And with link to somwhere.">
<img src="_images/img.jpg" width="150px" height="150px" />
<script type="text/javascript">
$(document).ready(function() {
$("a.fancybox").fancybox({"overlayShow": "false", "transitionOut": "elastic", "speedOut": 200, "transitionIn": "elastic", "speedIn": 600});
});
</script>
</a></div>
<div class="section" id="image-with-class-fancybox">
<h2>4 - image with class ‘fancybox’<a class="headerlink" href="#image-with-class-fancybox" title="Permalink to this headline">¶</a></h2>
<img alt="_images/img.jpg" class="fancybox" src="_images/img.jpg" />
</div>
<div class="section" id="fancybox-with-description">
<h2>5 - fancybox with description<a class="headerlink" href="#fancybox-with-description" title="Permalink to this headline">¶</a></h2>
<a alt="witaj to jest podpowiedz JEJ." class="fancybox" href="_images/img.jpg" rel="default" title="witaj to jest podpowiedz JEJ.">
<img src="_images/img.jpg" width="150px" height="150px" />
<script type="text/javascript">
$(document).ready(function() {
$("a.fancybox").fancybox({"overlayShow": "false", "transitionOut": "elastic", "speedOut": 200, "transitionIn": "elastic", "speedIn": 600});
});
</script>
</a></div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">sphinxcontrib-fancybox’s documentation</a></li>
<li><a class="reference internal" href="#readme">README</a></li>
<li><a class="reference internal" href="#fancybox">Fancybox</a><ul>
<li><a class="reference internal" href="#installation">Installation</a></li>
<li><a class="reference internal" href="#directives">Directives</a></li>
<li><a class="reference internal" href="#todo">TODO</a></li>
<li><a class="reference internal" href="#questions-and-suggestions">Questions and suggestions</a></li>
</ul>
</li>
<li><a class="reference internal" href="#examples">Examples</a><ul>
<li><a class="reference internal" href="#fancybox-remote-link">0 - fancybox remote link</a></li>
<li><a class="reference internal" href="#fancybox-non-standard-size">1 - fancybox non standard size</a></li>
<li><a class="reference internal" href="#fancybox-with-additional-class">2 - fancybox with additional class</a></li>
<li><a class="reference internal" href="#fancybox-with-description-markup">3 - fancybox with description (markup)</a></li>
<li><a class="reference internal" href="#image-with-class-fancybox">4 - image with class ‘fancybox’</a></li>
<li><a class="reference internal" href="#fancybox-with-description">5 - fancybox with description</a></li>
</ul>
</li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li><a href="#">sphinxcontrib-fancybox 1 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2012, Tomek Czyż.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
</div>
</body>
</html>