Sphinx "fancybox" extension
Project description
Sphinx “fancybox” extension.
Fancybox
Fancybox is adaptation of http://fancybox.net/ in version 1.3.4.
Documentation: http://spinus.github.com/sphinxcontrib-fancybox/
github: http://github.com/spinus/sphinxcontrib-fancybox/
PYPI: http://pypi.python.org/pypi/sphinxcontrib-fancybox/
Installation
Instalation through pip:
pip install sphinxcontrib-fancybox
or through github:
git clone https://github.com/spinus/sphinxcontrib-fancybox cd sphinxcontrib-fancybox python setup.py install
Next, you have to add extension to conf.py in your sphinx project.
extensions = [ ..., 'sphinxcontrib.fancybox', ...]
Directives
fancybox:
Fancybox directive place a thumbnail of picture you selected, and add some fancies. If you click on image you get fullscreen box with that picture.
Example:
.. fancybox:: picture.pngBy default all images on one page are in the same group (you can navigate pressing next and prev buttons around this group). If you want to add picture to another group you have to set group parameter, like:
.. fancybox:: picture.png :group: group2You can change size of fancybox with ‘width’ and ‘height’ which are passed as you set it:
.. fancybox:: picture.png :width: 100% :height: 2emYou can add some description which will be rendered as title attribute:
.. fancybox:: http://pictures.tld/picture.png Some descriptionIf you not set ‘width’ and ‘height’, defaults values are gathered from conf.py. There are two parameters which you can adjust:
fancybox_thumbnail_width fancybox_thumbnail_heightAdditionally you can set another css class with ‘class’ argument to fancybox directive or set fancybox_thumbnail_class to add css class to all fancybox directives.
All fancybox JS config options you can pass as dict to fancybox_config in conf.py too.
For examples please look to documentation conf.py.
TODO
handling local files (not only remotes) (DONE)
option to copying remote graphics as statics
fallback for non html output (DONE)
nested parsing fix
JS should be handled only once, not on every image node
width and height parameters (currently the thumbnail is set to 100x100px) (DONE)
get default thumbnail size from config (DONE)
generate thumbnails for big images
Questions and suggestions
If you have some suggstions, patches, problems - please write an email or github message.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for sphinxcontrib-fancybox-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5438b8b53766714214c5df4020e6533c520f4a0ba4c918a03cb4003a886afdfd |
|
MD5 | 18eaf76cf849f885307d5ea353970ab9 |
|
BLAKE2b-256 | 67c598872f5736059dec940bcef6f945f63288843131f61328f3f2ab9c68f6e7 |