Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO and TODOLIST test #2

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ _build/
__pycache__
.nox/
.ipynb_checkpoints/
.vs/
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ help:
live:
sphinx-autobuild --ignore _build -b dirhtml . _build/dirhtml/



.PHONY: help Makefile


# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
4 changes: 4 additions & 0 deletions _ext/Pechakucha/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .pechakucha_directive import PechaKuchaDirective


__all__ = ['PechaKuchaDirective']
46 changes: 46 additions & 0 deletions _ext/Pechakucha/pechakucha_directive.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from docutils import nodes
from sphinx.util.docutils import SphinxDirective
from docutils.parsers.rst import directives

class PechaKuchaDirective(SphinxDirective):
has_content = True
option_spec = {
'transition_time': directives.positive_int,
}

def run(self):
transition_time = self.options.get('transition_time', 3000)

container = nodes.container('', classes=['pechakucha-slideshow'])
container['data-transition-time'] = str(transition_time)

self.set_source_info(container)

for image_path in self.content:
image_node = nodes.image(uri=image_path, classes=['pechakucha-slide'])
figure_node = nodes.figure('', image_node, classes=['align-default'])
container += figure_node

# Add navigation buttons
nav_container = nodes.container('', classes=['pechakucha-controls'])
prev_button = nodes.raw('', '<button id="prev-slide">Previous</button>', format='html')
next_button = nodes.raw('', '<button id="next-slide">Next</button>', format='html')
nav_container.extend([prev_button, next_button])
container += nav_container

# Add progress indicator container
progress_container = nodes.container('', classes=['pechakucha-progress'])
container += progress_container

script_node = nodes.raw('', "<script src='_static/pechakucha.js'></script>", format='html')
container += script_node

return [container]


def setup(app):
app.add_directive("pechakucha", PechaKuchaDirective)
app.add_css_file('_static/pechakucha.css')
app.add_js_file('_static/pechakucha.js')

return {'version': '0.1', 'parallel_read_safe': True, 'parallel_write_safe': True}
11 changes: 11 additions & 0 deletions _ext/Pechakucha/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from setuptools import setup, find_packages

setup(
name='pechakucha',
version='0.1',
packages=find_packages(),
)

install_requires=[
'Sphinx',
],
135 changes: 0 additions & 135 deletions _ext/todo.py

This file was deleted.

Loading
Loading