generated from csctd/sphinx-site-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25b3323
commit 2d8f7c4
Showing
12 changed files
with
198 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,4 @@ | ||
from docutils import nodes | ||
from docutils.parsers.rst import Directive | ||
from sphinx.util.docutils import SphinxDirective | ||
from .pechakucha_directive import PechaKuchaDirective | ||
|
||
class SlideshowDirective(SphinxDirective): | ||
has_content = True | ||
|
||
def run(self): | ||
container = nodes.container('', classes=['slideshow']) | ||
self.set_source_info(container) | ||
|
||
for image_path in self.content: | ||
image_node = nodes.image(uri=image_path) | ||
container += nodes.figure('', image_node) | ||
|
||
return [container] | ||
|
||
def setup(app): | ||
app.add_directive("slideshow", SlideshowDirective) | ||
app.add_css_file('slideshow.css') | ||
app.add_js_file('slideshow.js') | ||
|
||
return {'version': '0.1', 'parallel_read_safe': True, 'parallel_write_safe': True} | ||
__all__ = ['PechaKuchaDirective'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.